|
-
Listening on a dynamic texbox?
Is it possible to act of the changed value of a dynamic textbox using AS3? I'm using the code which I believe is right (it's not producing errors), but it just won't work. Here's the code:
Code:
Code:
function moveHolderO(evt:Event):void{
addEventListener(Event.ENTER_FRAME, moveHolderOpen);
function moveHolderOpen(evt:Event):void{
if(gamertagHolder.x>stage.stageWidth-350){
gamertagHolder.x -= 10;
}
}
}
gamertagHolder.gamertag.addEventListener(Event.CHANGE, listenMoveHolder);
function listenMoveHolder(evt:Event):void{
addEventListener(Event.ENTER_FRAME, moveHolderO);
}
So if you need a brief explaination of what this does, it grabs a gamertag (Xbox Live) from a text string in a file, if the text has changed, the Flash notices the change, and tells the movieclip holding the dynamic text box to smoothly move out from the right of the screen (350px) revealing the new name. 2 seconds later the box disappears again. Any help appreciated!
-
listening for a change event (provided gamertagHolder.gamertage is the actual TextField instance) should work - I think the problem is in your nested enter frames. This looks like you're just tweening the textfield off the left side of the stage (?) if so you should just grab TweenLite and let that handle all the timing and sequencing.
Please use [php] or [code] tags, and mark your threads resolved 8)
-
 Originally Posted by neznein9
listening for a change event (provided gamertagHolder.gamertage is the actual TextField instance) should work - I think the problem is in your nested enter frames. This looks like you're just tweening the textfield off the left side of the stage (?) if so you should just grab TweenLite and let that handle all the timing and sequencing.
Ok, thanks, I'll give that a try.
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
|