-
createTextField - can it trigger a Function?
Hi, by creating text field with createTextField, is there a way that on clicking/releasing the text field a function will be triggered (an event handler) - i want to creat dynamically textFields so that clicking on them will trigger/activate a function.
Each of the text field has a different parameter to pass to the function.
Thanks in advance,
Maya.
-
Keeper of Brooms and Jars
If i were you I would put an mc about the size of the text box behind the textfield and assign it functions using the press/release handlers. An easy way to do this would be to create a movieclip with both the hit dection mc and the text field inside. Then you can drag and drop as many of these as you need (or use attachMovie). Be sure you get the paths to the variables correct - in nesting mcs and textfields, sometimes the paths get obscurred. Just be deliberate and think it through. If all else fails, come back to the board.
-
Thanks, this is the way it is implemented at the moment, i was thinking maybe thre is a way of doing it evolving only the textField.
I guess not... :-(
Thanks again.
-
Keeper of Brooms and Jars
well, you could try an onMouseDown handler and then check to see if the mouse is within the bounds of the textfield. although ive never tried a getBounds on a textfield, i dont see why it shouldnt work.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|