MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 669

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

contentPath
indicates the content to load into the scroll pane. This value can be a relative path to
a local SWF or JPEG file, or a relative or absolute path to a file on the Internet. It can also be the
linkage identifier of a movie clip symbol in the library that is set to Export for ActionScript.
hLineScrollSize
indicates the number of units a horizontal scroll bar moves each time an arrow
button is clicked. The default value is 5.
hPageScrollSize
indicates the number of units a horizontal scroll bar moves each time the track
is clicked. The default value is 20.
hScrollPolicy
displays the horizontal scroll bars. The value can be
value is
.
auto
scrollDrag
is a Boolean value that determines whether scrolling occurs (
when a user drags on the content within the scroll pane. The default value is
vLineScrollSize
indicates the number of units a vertical scroll bar moves each time a scroll arrow
is clicked. The default value is 5.
vPageScrollSize
indicates the number of units a vertical scroll bar moves each time the scroll bar
track is clicked. The default value is 20.
vScrollPolicy
displays the vertical scroll bars. The value can be
value is
.
auto
You can write ActionScript to control these and additional options for a ScrollPane component
using its properties, methods, and events. For more information, see
on page
671.
Creating an application with the ScrollPane component
The following procedure explains how to add a ScrollPane component to an application while
authoring. In this example, the scroll pane loads a SWF file that contains a logo.
To create an application with the ScrollPane component:
Drag a ScrollPane component from the Components panel to the Stage.
1.
In the Property inspector, enter the instance name myScrollPane.
2.
In the Property inspector, enter logo.swf for the contentPath parameter.
3.
Select Frame 1 in the Timeline, open the Actions panel, and enter the following code:
4.
scrollListener = new Object();
scrollListener.scroll = function (evt){
txtPosition.text = myScrollPane.vPosition;
}
myScrollPane.addEventListener("scroll", scrollListener);
completeListener = new Object;
completeListener.complete = function() {
trace("logo.swf has completed loading.");
}
myScrollPane.addEventListener("complete", completeListener);
,
, or
. The default
on
off
auto
) or not (
true
.
false
,
, or
. The default
on
off
auto
"ScrollPane class"
ScrollPane component
)
false
669

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents