F > FScrollPane.loadScrollContent

 

FScrollPane.loadScrollContent

Availability

Flash Player 6.

Usage

myScrollPane.loadScrollContent(URL [, funcName, location])

Parameters

URL A string specifying the URL of a SWF or JPEG file to load into the scroll pane.

funcName A string specifying the name of the handler function to execute when the contents of the scroll pane loads. If the location parameter is not specified, this function must be in the same Timeline as the component instance.

location A path reference to a data object, movie clip, or Timeline that contains the specified function. This parameter is optional and defaults to the parent Timeline of the component.

Returns

Nothing.

Description

Method; specifies the URL of a SWF or JPEG file to display in the scroll pane. The optional funcName and location parameters allow you to specify a change handler function to call when the content loads.

The URL must be in the same subdomain as the URL where the Flash movie currently resides. To use SWF or JPEG files in the Flash Player or test the movie in the Flash authoring environment, you must store all SWF or JPEG files in the same folder, and their filenames cannot include folder or disk drive specifications.

Calling this method overrides the Scroll Content parameter value set in authoring.

See FScrollBar.setChangeHandler for more information and examples of using change handler functions.

Example

The following code loads a JPEG located on a server into display1.

display1.loadScrollContent("http://www.YourWebServer.com/Nice.jpg");

The following code loads a JPEG located on a server and specifies the change handler function load located in the grandparent Timeline of the component display1.

display1.loadScrollContent("http://www.YourWebServer.com/Nice.jpg" , "load" , _parent._parent);
function load(component){

//content is loaded
component.setScrollPostion(10,10);
}

See also

FScrollPane.getPaneHeight, FScrollPane.setScrollContent