View comments | RSS feed

ScrollPane.refreshPane()

Availability

Flash Player 6 (6.0 79.0).

Edition

Flash MX 2004.

Usage

scrollPaneInstance.refreshPane()

Parameters

None.

Returns

Nothing.

Description

Method; refreshes the scroll pane after content is loaded. This method reloads the content. You could use this method if, for example, you've loaded a form into a scroll pane and an input property (for example, a text field) has been changed by ActionScript. In this case, you would call refreshPane() to reload the same form with the new values for the input properties.

Example

The following example refreshes the scroll pane instance sp:

sp.refreshPane(); 

Comments


MM tech writer said on Sep 1, 2004 at 11:02 AM :
refreshPane() behaves as stated in the Description above.

Try this: place a ScrollPane in a FLA and set the contentPath to the name of a local jpeg in the same folder as the FLA, for example MyPicture.jpg. Give the ScrollPane the instance name mySP.
Now place a Button component on the Stage with the instance name b1. In frame 1, place the following ActionScript:
form = new Object();
form.click = function(eventObj){
mySP.refreshPane();
}
b1.addEventListener("click", form);

Control > Test Movie. When you click the button, you should see the image reload in the ScrollPane.

For further assistance, please refer to the web forums: http://webforums.macromedia.com/flash

Best Regards.
nu_foo said on Sep 27, 2004 at 4:45 AM :
I think the confusion comes from the fact that with v1 components, refreshPane() got the Scrollpane to remeasure the content and layout scrollers appropriately, whereas in v2 components, refreshPane() actaully reloads the content.
Allewar said on Oct 6, 2004 at 7:41 PM :
LOL, after implementig my ridiculous solution, and after posting it as if it were the coolest thing in the world, I found the solution with a method of the scrollPane component, curiously not listed in the ScrollPane class topic.

Thanks to Paul Nevins for this.

When the dynamic cintent has finished loading, just call the onComplet() method of the scrollPane. myScrollPane.onComplete(). Just like that, no arguments required.
It works, and it works great.
homo ludens said on Jul 14, 2005 at 9:22 AM :
Allewar you saved my life... i spent whole day to find the solution... i got other one but didn't work with current app...

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00002780.html