Groups | Blog | Home
all groups > flash actionscript > may 2007 >

flash actionscript : Activating a button


doodah
5/25/2007 7:56:31 PM
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!
cpgenius
5/25/2007 8:17:13 PM
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");
doodah
5/25/2007 9:08:52 PM
megds
5/26/2007 2:51:33 AM
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 ...
doodah
6/4/2007 4:24:30 PM
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.


dzedward
6/4/2007 4:29:17 PM
doodah
6/5/2007 2:45:33 AM
kglad
6/5/2007 3:31:48 AM
:



btnName.buttonMode=true;
btnName.addEventListener(MouseEvent.MOUSE_DOWN,f);
function f(evt:MouseEvent) {
mc.gotoAndStop("label"); // where mc is your movieclip
doodah
6/5/2007 3:45:27 AM
kglad
6/5/2007 3:53:48 AM
AddThis Social Bookmark Button