yes that is working fine On 1/7/07, ntasky <[EMAIL PROTECTED]> wrote:
thanks very much, yes that helps :) maxVPosition is not present in the documentation And i had also the same bug for the layout, which now i can fix Nicolas ----- Original Message ----- From: "Hans Wichman" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" <[email protected]> Sent: Sunday, January 07, 2007 10:18 AM Subject: Re: [Flashcoders] control the scroll of a scrollPane component V2 > 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 _______________________________________________ [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

