Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

input text

New Here ,
Mar 27, 2021 Mar 27, 2021

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?

157
Translate
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
Community Expert ,
Apr 09, 2021 Apr 09, 2021
LATEST

i don't see an event listener. eg,

 

buton_85.addEventListener(MouseEvent.CLICK, onButton_85);

Translate
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