-
Items from 1 scene interfearing with my menu ... bloomin tie-fighters
When my game ends and goes back 2 the main menu, i still have enemy craft/ships still scrolling across the menu screen
Any 1 got any ideas 2 stop this? iv tried putting stop(); in frames i thought wud stop it but they insist on scrolling across my menu even tho the menus in a diff scene.
Is there a way 2 stop these ships scrolling once there scene has finished???
Any feedback much appreciated .... thanks 2 every1 whose helped me so far btw
CoopZ x
-
if those are dynamically created you have to remove them the way you created them see: removeMovieClip().
gparis
-
Below is the code i used to create the enemys, wat wud u suggest as the removeclip code. Sorry im all new to this flash business.....CoopZ
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" );
}
}
-
this is not the code to create the MCs. Just to move them and detect collisions. There must be somewhere a duplication.
gparis
-
i think this is code then (touch wood) erm so could you please tell me how the removeclip code should look like and where abouts it wants putting. thank you ever so much CoopZ x
numEnemy=3;
for (i=2; i<=numEnemy; i++){
enemy1.duplicateMovieClip( "enemy"+i, i+100 );
}
score=0;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|