Copy link to clipboard
Copied
hi everyone, can anyone help me code input.text and go to another play frame.
I'm using AS3. consists of an input box and a search button
function onButton_85(e:MouseEvent):void
{
switch (input1.text)
{
case "sun" :
gotoAndPlay(15);
break;
case "moon":
gotoAndPlay(25);
break;
default:
gotoAndStop(46);
break;
}
}
My serch button is name "buton_85" and my input box is name "input1".
when I use this code there is no error notification, but my search button doesn't work, I've tried changing the code but it doesn't work. is my code wrong?
Copy link to clipboard
Copied
i don't see an event listener. eg,
buton_85.addEventListener(MouseEvent.CLICK, onButton_85);
Find more inspiration, events, and resources on the new Adobe Community
Explore Now