When I run in debug and look at my variables, I can drill down and see a particular variable from which I would like to recover the value. The value that I am looking for is the y coordinate of a TextArea field. I need to be able to do this when the current focus object is a button which triggers the function in which I wish to recover this value. The drill down looks like this:
|
outerForm |
mx.containers.Form (@4a2cc29) |
|||||
|
[inherited] |
||||||
|
focusManager |
mx.managers.FocusManager (@42bd3c1) |
|||||
|
lastFocus |
mx.controls.TextArea (@d786851) |
|||||
|
[inherited] |
||||||
|
y |
63 [0x3f] |
|||||
The field of which I want the y coordinate is in a child module and the button triggering the function is in the parent module. While in the parent module I was able to drill down to the desired item on the variable page of debug (as shown above). At the time that I am trying to get the information, I do not know the id of the TextArea object. In other words as someone presses a 'next' or 'previous' button on the parent module, I want to navigate to the appropriate object in the child module. The setting focus of the object is no problem, but as some of the objects are off the screen, my ultimate goal is to move the scroll bar, and I need the y coordinate of the object to determine how much to move the scroll bar.
Is there a way to get this value when it is not the current focus item?
Comments
Instead of using the y position, have you tried using event.currentTarget.scrollPosition instead? Try using a ScrollEvent in response to the parent event. Want to post some code for the parent and the module (generic) and I can help look at it for you.