I need help! This is for school, it's important!! The animation within my symbol doesn't finish before everything moves onto the next scene.
Heyy! I got a bit of a problem I got a deadline in 5 hours and I need to make a virtual reality Everything is going great except one thing, and it needs to be fixed. I have a counter in a scene, if it reaches three it goes on to the next scene. it counts every time it clicks on a mouse event. I added the mouse events to symbols and those symbols are animations, I putted the animation within, so when you click on one it does something. the problem I have is, when the counter reaches 3 it instantly moves on to the next scene instead of finishing the symbol animation first. so how do I let the movie clip finish before it moves on to the next frame? I've been searching google for hours and I know I'm a bit late. I really need the help and I appreciate it a lot!! I'll leave my action script code down here if it helps any. |
var Teller = 0;
{if (Teller == 3)
MovieClip(root).gotoAndStop(3);}
import flash.events.MouseEvent;
spacemaan.buttonMode = true;
spacemaan.mouseChildren = false;
spacemaan.addEventListener(MouseEvent.CLICK, startspacemaanAnimatie)
function startspacemaanAnimatie(evt: MouseEvent) {
spacemaan.removeEventListener(MouseEvent.CLICK, startspacemaanAnimatie)
spacemaan.play();
Teller++;
if (Teller >= 3) {
MovieClip(root).gotoAndStop(3);
}
}
Gebouw.buttonMode = true;
Gebouw.mouseChildren = false;
Gebouw.addEventListener(MouseEvent.CLICK, startGebouwAnimatie)
function startGebouwAnimatie(evt: MouseEvent) {
Gebouw.removeEventListener(MouseEvent.CLICK, startGebouwAnimatie)
Gebouw.play();
Teller++;
if (Teller >= 3) {
MovieClip(root).gotoAndStop(3);
}
}
flower.buttonMode = true;
flower.mouseChildren = false;
flower.addEventListener(MouseEvent.CLICK, startflowerAnimatie)
function startflowerAnimatie(evt: MouseEvent) {
flower.removeEventListener(MouseEvent.CLICK, startflowerAnimatie)
flower.play();
Teller++;
var mySound:Sound = new PlantGrowing();
mySound.play();
}