input text

New Here ,
Mar 27, 2021 Mar 27, 2021

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?

Views

72

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

LATEST

i don't see an event listener. eg,

 

buton_85.addEventListener(MouseEvent.CLICK, onButton_85);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines