Guest_imported
New member
- Jan 1, 1970
- 0
Hi
I was wondering if anyone could help me with my flash project. I am having a lot of trouble trying to stop animation going onto the next scene.
I have a game in a project I am creating and it is coconuts that you shoot at crocodiles. The problem is that the amimation of the crocodiles wont stop
and they keep going onto the next scene accross the top of everything on the scene. So I have crocodiles going over my next scene...if you get what I mean LOL
Here is my actionscript for the crocodiles which wont stop......is there something I should do because I'm not to good at actionscripting.
Thanks Gabriella
onClipEvent (load) {
function reset(){
this._x=600;
this._y=random(200)+100;
enemySpeed=random(4)+1;
this.gotoAndStop(1);
}
reset();
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart){
this._x-=enemySpeed+_root.mainGround.groundSpeed;
} else {
this._x-=enemySpeed;
}
if (this._x<-10) {
reset();
}
if (this.hitTest( _root.spaceship ) ){
_root.gotoAndStop ( "gameOver" );
}
}
I was wondering if anyone could help me with my flash project. I am having a lot of trouble trying to stop animation going onto the next scene.
I have a game in a project I am creating and it is coconuts that you shoot at crocodiles. The problem is that the amimation of the crocodiles wont stop
and they keep going onto the next scene accross the top of everything on the scene. So I have crocodiles going over my next scene...if you get what I mean LOL
Here is my actionscript for the crocodiles which wont stop......is there something I should do because I'm not to good at actionscripting.
Thanks Gabriella
onClipEvent (load) {
function reset(){
this._x=600;
this._y=random(200)+100;
enemySpeed=random(4)+1;
this.gotoAndStop(1);
}
reset();
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart){
this._x-=enemySpeed+_root.mainGround.groundSpeed;
} else {
this._x-=enemySpeed;
}
if (this._x<-10) {
reset();
}
if (this.hitTest( _root.spaceship ) ){
_root.gotoAndStop ( "gameOver" );
}
}