Help me on scripting pls

Started by: Razen | Replies: 2 | Views: 515

Razen
2

Posts: 51
Joined: Dec 2013
Rep: 10

View Profile
Oct 8, 2014 7:42 AM #1251388
i am trying to create a menu which when i click a button switches to another scene im on actionscript 2
and heres my code

Renz.onRelease = function(){
gotoAndPlay("sceneTwo", 2);
};

pls help :/
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 10, 2014 12:07 AM #1252257
Make sure the symbol that you're trying to click is a "button". If it isn't: try adding _root. before your gotoAndPlay.

If it still doesn't work, delete that code you have, make sure your symbol is a button, click on your button, open up actions and apply this code:

on(release){
_root.gotoAndStop(2);
}

I don't know why you're switching between scenes, no one uses them. Just use the second frame on the timeline or whatever.
Razen
2

Posts: 51
Joined: Dec 2013
Rep: 10

View Profile
Oct 10, 2014 1:29 PM #1252496
the but i have fixed it with this code thx anyway

on (release) {
gotoAndPlay (2);
}