Skip to main content
Daniel 0_o
Known Participant
November 3, 2009
Question

TLF reset scroll position (AS2)

  • November 3, 2009
  • 1 reply
  • 858 views

hi

I'm trying to reset the scroll position in each load of XML:

myTLF.verticalScrollPosition = 0;

or

myTLF.minScrollPosition = 0;

or

myTLF.scroll = 0;

however i get an error "undefined property"

is there other property name that i should use?

thx

This topic has been closed for replies.

1 reply

Adobe Employee
November 3, 2009

I think I need a few more details to be able to help you.What type of object is "myTLF"? The code snippet you post should work fine if "myTLF" is a ContainerController, but won't work if it is, for instance, a TextFlow.

So, if you have this:

var myTLF:ContainerController = textFlow.flowController.getControllerAt(0);

myTLF.verticalScrollPosition = 0;

That will set the controller's scroll position to the start of the flow.

Hope this helps,

- robin

Daniel 0_o
Known Participant
November 3, 2009

thx for your replay robin:

var _textFlow:TextFlow;

_textFlow = myTLF.textFlow;

myTLF.verticalScrollPolicy = ScrollPolicy.ON;

myTLF.verticalScrollPosition.scrollPosition=0;

_textFlow.flowComposer.updateAllContainers();

myTLF is a flash component

and i had a typo in the title it is AS3