Hi,
i used the following piece of code to scroll to the bottom of the scrollpane
each time new content was added.
Note that the scrollpane contained a textclip called answerclip. Each time
text was added to the answerclip, the scrollpane needs to scroll.
//next line is needed to fix layout bug in flash
var myHeight = this.answerClip._height;
this.scrollPane.invalidate(); //make sure scrollbars update
//ease to text new
this.onEnterFrame = function () {
if (Math.abs (this.scrollPane.vPosition - this.scrollPane.maxVPosition) >
5) {
this.scrollPane.vPosition += (
this.scrollPane.maxVPosition-this.scrollPane.vPosition)/4;
} else {
this.scrollPane.vPosition = this.scrollPane.maxVPosition;
delete this.onEnterFrame;
}
}
Not the highest quality of code:) but it might help you.
Look into the documentation for the events supported by the scrollpane.
greetz
JC
On 1/7/07, ntasky <[EMAIL PROTECTED]> wrote:
Hi,
How can I can control the scroll of a scroll pane content ?
In V1 version i could use :
myScrollPane.vPosition = myScrollPane.maxVPosition;
but i found nothing on V2 version.
Plus because my content is dynamic, is there an event that allows me to
know
when the scrollBar appears in the scrollPane ?
thanks by advance,
Nicolas
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com