Skip to main content
May 25, 2007
Question

Activating a button

  • May 25, 2007
  • 4 replies
  • 608 views
Hi. I'm completely rusty with actionscript, having been away from it for a few years. In Flash MX I was able to create a button and use the simple gotoandStop("frame label") language for a text button. Now, in CS3, I'm unable to use that language, as the actionscript window says something like "Unable to apply actions to current content" for the button. Can somebody please write for me the script needed to activate a simple text button to go to (on release) and stop at a certain frame in the movie until I can get up to speed with the latest actionscript rules? I'd be eternally grateful!
This topic has been closed for replies.

4 replies

kglad
Community Expert
Community Expert
June 5, 2007
you're welcome.
Damon Edwards
Inspiring
June 4, 2007
apply the actions on an actions layer, not the button itself.
June 5, 2007
Thanks! Now all I have to do is figure out how to write the actionscript for it, which has probably changed as well.
kglad
Community Expert
Community Expert
June 5, 2007
:

Participant
May 26, 2007
im also lost!! i think flash mx was really friendly and for me is also difficult i was away only a few months and now im lost..
I have to redesign my web page that was almost finish on mx so what is really helping me .. im taking action scrip 3.0 course online go to wwww.lynda.com and u can suscribe for a month is cheap and really helps.. anyway if i can help u let me know.. i just started today ...
June 4, 2007
Well, I'm still unable to get a simple button to work, since when I select the button instance on the stage, the Actions pane says "Current content cannot have actions applied to it." Help!!! How am I going to apply actions to my little button? Life made more sense with Flash MX.

Inspiring
May 25, 2007
I don't have CS3, so I'm not sure if this is 100%, but you should be able to just put:

btnName.onPress = function(){
gotoAndStop("label");
}
May 25, 2007
Thanks so much! I'll try that.