mercredi 15 février 2017

dynamic txtField issue in different frames in Actionscript 3

I have one input name txt field and log in button in PAGE 1(Frame 1), next button PAGE 2(Frame 2) and lastly, another dynamic txt box PAGE 3(Frame 3). I wanted the name of the user to appear in dynamic txt box in Frame 3 only.

The user must proceed first in frame 2 (page without dynamic txtbox) before going to frame 3 which have a the dynamic txtbox. I have tried inserting a dynamic txtbox in PAGE TWO/FRAME 2 and hide it (using .visible=false;) but when I turn on its visibility in FRAME 3, the name is not appearing anymore. This is my code so far:

FRAME 1/PAGE 1:

var myName:String = "";

function handleClick(Event:MouseEvent):void
{
    myName = boxOne.text;
    gotoAndStop("logIn")
    else 
}
btn_LogIn.addEventListener(MouseEvent.MOUSE_UP, handleClick);

FRAME 3/PAGE 3:

boxTwo.text = myName;

Aucun commentaire:

Enregistrer un commentaire