Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-03-2004, 04:05 PM   #1
Large Member
maccer's Avatar
Join Date: Jun 2001
Posts: 186
Send a message via AIM to maccer Send a message via Yahoo to maccer
Default tabIndex and scrollPains

I have built a form which contains various components. the form is nested within the scrollpane. i would like the form to scroll as the user either tabs or gives focus to the components -so the user does not have to manally scroll? make sense?

i have attached the fla to better explain what i mean, does anybody know if it is possible or how to best implement something like this?

Attached Files
File Type: zip tabIndexTest.zip (467.4 KB, 150 views)
maccer is offline   Reply With Quote
Old 11-05-2004, 06:27 PM   #2
Asleep At The Keyboard
mcmcom's Avatar
Join Date: Jun 2004
Location: Toronto, Canada
Posts: 2,528

First of all, you can get the x and y positions of the components (inside the scrollPane). So say you have 5 items, 2 are visible right now and 3 are below the viewable area of the scrollPane.

Item 1. X=0 Y=0 <--this one shows up right away
Item2 X=0 Y=50 <-- this one also shows up
Item3 X=0 Y=150 <--- Doesnt show
Item4 X=0 Y=200 again doesnt show
Item5 X=0 Y=250 doesnt show

So when you tab through your components your gonna need to know what item your on and its properties, then move the scrollPane down.

So try using the onGetFocus event (or whatever its called)
and do something like

_root.myScrollPane.setScrollPosition(pathtoControl ._x, pathtoControl._y);

This should move the scrollPane scrollers DOWN to where the x and y of whatever instance are located. You may need to play with it to make it show up centered (or not right at the top) and the event may need to be changed.

but that should work.

Now if anyone can tell ME how to get X&Y Pos of a textSnapshot object. THAT WOULD BE SOMETHING!
mcmcom is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:29 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.