instructions.htmld8" d*H zIX zN y {4 d zTEXTR*ch|ƭSmessage=How to use AutoScroller

AutoScroller is a Flash 5 Smart Clip that will link to an external text file and automatically place scroll up/down and slider buttons aligned to the corners of the text field.

To do this, however, requires extensive use of movie clips, because Flash's ActionScripting can only position and size movies -- that's why all the buttons and fields are placed in movies.

To use AutoScroller, you'll need to:

1. Modify the Up and Down symbols and the Slider movie if you don't like the appearance of the buttons.

2. Modify the MessageWrapperMovie to change the size and shape of the text field.

3. Change the clip parameter variable called url, which is the location of the text file.

Step One
Pretty simple, just double click the up and down symbols and edit them. However, if you make the symbols significantly larger (more than a pixel or two), you'll also need to edit the Up and Down buttons.

There is a layer called Frame in the Up/Down buttons that defines the boundaries of these buttons. There is an invisible box (transparent ink for the outline) that's 30-by-30 pixels in this layer. You can resize this box if you make larger Up/Down symbols.

You can also edit the Thumb button and the Slider movie similarly. There are also Frame layers in these objects.

If you edit the frame objects, make sure you use an even number of pixels for these objects -- 28-by-28 pixels, 32-by-32 and so on.

Step Two
Again, pretty simple, however, MessageWrapperMovie is a movie with a text variable inside. The text variable is named message and you shouldn't change the name without changing all the ActionScripting that refers to it.

And, just like the buttons, there is a frame around the text variable that is slightly larger than the text field. There are two reasons for this frame. One, it's difficult to make a text field that's an integer -- you'll often get a text field that 192.1 pixels wide, and that ".1" can throw off the alignment of the buttons if you choose to make the frames visible.

Two, the frame gives you a bit of a border around the text field and also gives you something to fill, if you wanted to have a black background and white text.

If you edit the frame object, make sure you use an even number of pixels.

Step Three
AutoScroller refers to an external text file, probably sitting on a server. The url variable is the path to this text file. If it's on a server, the path would be something like "http://www.yourserver.com/instructions.html."

There is another clip parameter, pageScroll, that controls how many lines are scrolled when you use the PageUp/Down keys on your keyboard.

How to access the contents of the scroll field

If you need to access the contents of the text field within the SmartClip, you'll need to name the movie that's created when you drag that SmartClip out of the library and onto the stage. If you name the movie "Instructions," you can refer to the text field by writing "Instructions.Message.message." That's because there's a movie inside the SmartClip called Message. And that movie contains a text field variable called "message."

Referring to an internal variable

It is possible to make SmartClip refer to a variable within the Flash movie, rather than an external text file. To do this, you need to set the url parameter to empty, and set the someVariable parameter to a variable used somewhere in the Flash movie (of course, that variable would have had to already be defined). For instance, if I had a variable called "userguide" that is on the main timeline, then set the someVariable parameter to "_parent.userguide"

Referring to an internal variable, however, makes it difficult to include html formatting. You could try escaping the text in the variable and unescaping it before it's inserted into the message variable.

Jennifer Petkus, October 2000 hhFH MonacoX2 w 2,6,6ƭR*chMonaco  Helvetica ConfidentialHhhF<BFMPSRBBSTL: