FP: How to Create a Script for the Marquee Control
ID: Q167595
|
The information in this article applies to:
-
Microsoft FrontPage 97 for Windows with Bonus Pack
SUMMARY
You can use the Marquee control to add a dynamic look to your Web pages. This
article describes a method to use a control that scrolls a separate page
within the current page and creates two buttons that allow you to control
the scrolling speed of the marquee.
NOTE: You can combine ActiveX controls to add greater functionality to
your Web pages than would be possible with a single control.
MORE INFORMATIONWARNING: ANY USE OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN
RISK. Microsoft provides this code "as is" without warranty of any
kind, either express or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular
purpose.
Use the following steps to create a control that scrolls a separate
page and uses two buttons to control the scrolling speed of the
marquee:
- Open a Web page in FrontPage Editor.
- On the Insert menu, point to Other Components, and then click
ActiveX control.
- In the Pick A Control list box, click MarqueeCtl Object.
- In the Name box, enter a name for the MarqueeCtl Object. For
example, type "Marquee" (without the quotation marks).
- Click Properties.
- In the Object Parameters dialog box, click Add.
- In the Name box, enter "szURL" (without the quotation marks). Under
Value, in the Data box, enter the following Uniform Resource
Locator (URL):
http://www.microsoft.com
- Click OK two times.
- In the ActiveX Control Properties dialog box, click Extended.
- Click Add.
- In the Name box, enter "TYPE" (without the quotation marks). In the
Value box, enter "application/x-oleobject" (without the quotation
marks). Click OK.
- Click OK two more times.
- On the Insert menu, point to Form Field, and then click Push
Button.
- Right-click the form field, and then click Form Field Properties.
- In the Name box, enter "BtnFast" (without the quotation marks). In
the Value/Label box, enter "Fast"(without the quotation marks).
Click Normal. Click OK.
- Repeat steps 13 and 14.
- In the Name box, enter "BtnSlow" (without the quotation marks). In
the Value/Label box, enter "Slow" (without the quotation marks).
Click Normal. Click OK.
- Right-click the form area, and click Script Wizard.
- In the Event pane, double-click BtnSlow, and then click onClick.
In the Action pane, double-click Marquee, and then double-click
ScrollDelay.
The following code appears in the Script pane:
Sub BtnSlow_Onclick
Marquee1.ScrollDelay
- Place the insertion point immediately following the
"Marquee1.ScrollDelay" code and type "=200" (without the quotation
marks), so that the code looks like this:
Sub BtnSlow_Onclick
Marquee1.ScrollDelay=200
- In the Event pane, double-click BtnFast, and then click onClick.
In the Action pane, double-click Marquee, and then double-click
ScrollDelay.
The following code appears in the Script pane:
Sub BtnFast_Onclick
Marquee1.ScrollDelay
- Place the insertion point immediately following the
"Marquee1.ScrollDelay" code and type "=0" (without the quotation
marks), so that the code looks like this:
Sub BtnSlow_Onclick
Marquee1.ScrollDelay=0
- Click OK.
When you view the page in a Web browser, the Microsoft World Wide Web
home page will scroll within the current Web page.
Additional query words:
fp97, marquee, fpscript
Keywords : kbcode kbinterop kbdta fpedit fphtml
Version : windows:97
Platform : WINDOWS
Issue type : kbhowto
|