2 Replies Latest reply on Sep 17, 2006 12:25 PM by La Bestia

    Making text clickable to perform an action

    La Bestia Level 1
      Really newbie question here. I created a button out of text that I want it to perform a certain action. Once they click on it I want the movie to start playing. Right now I have a stop() action on the first frame of the timeline or else the tween will just play.
      onclick go to and play movie?? something like that. Also would I place this action under the symbol I created for the text? Thanks guys.
        • 1. Re: Making text clickable to perform an action
          kglad Adobe Community Professional & MVP
          you can attach actionscript directly to your button - place it on the main timeline and use code like

          on(press){
          _root.play();
          }


          or better would be to attach code to the main timeline after placing it on the main timeline and giving it an instance name (in the properties panel, say btn1). you could then use something like

          btn1.onPress=function(){
          _root.play();
          }

          p.s. both codes assume it's the _root timeline that you want to play.
          • 2. Re: Making text clickable to perform an action
            La Bestia Level 1
            Great it worked! Now is there a way to make the tween play in reverse? Basically the last thing you helped me with made this window disappear off screen. But it will not show up again unless page is refreshed. So I want to put some sort of button there so the window can come back. Basically making the tween play in reverse.

            Thanks again!!