Flash help please
- Started
- Last post
- 3 Responses
- ian
Howdy folks,
Im trying to do a game in flash, Im not a programmer but I have a basic grasp of actionscipt.Basically, Ive got a target in a 10 frame mc in different places on the different frames. when a target is hit it plays a little animation and then I want it to randomly go to another frame of the mc to bring up another target. Im using this code on the last frame of the animation:
what_number = Number(random(11))+2;
tellTarget ("/deer") {
gotoAndStop(/:what_number);
}But it aint working! Any help please.
- unfittoprint0
deprecated syntax. use this instead:
what_number = Number(random(11))+2;
deer.gotoAndStop(what_number);
- ian0
I shall try it! Cheers man.
- ian0
D'oh! It wont work!
OK, heres the deal, the script is on a key frame on the main timeline which randomises the target mc and that works fine. When I put the script at the end of the little animation which resides inside the target mc it doesnt randomise. when you hit the target it plays the animation and nothing else.
What am I doing wrong?