Stop a game scrolling
I have a game that is a basic side scrolling space shooter. But I want it to eventually stop. I have a score through dynamic text and i am wondering how i can stop the game.
use variables
don't know which code you use for the scrolling part but you could use a condition. for example:
set : stopgame= false
then in the scrolling code:
if (stopgame==false)
//scrolling code
when you want the scrolling to stop just set the var stopgame to true.
The textfield has nothing to do with it, it's just a display..
gparis
Don't quite understand
The code for the scrolling ground is.
onClipEvent (load) {
ground.duplicateMovieClip("ground2", 100);
ground2._x = ground._x+ground._width;
groundStartx = this._x;
groundSpeed = 10;
}
onClipEvent (enterFrame) {
if (_root.spaceship.scrollStart == true) {
this._x -= groundSpeed;
if (this._x<=(groundStartx-ground._width)) {
this._x = groundStartx-groundSpeed; }
}
}
ok, then just set groundSpeed to 0
gparis
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