Stop a game scrolling
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Stop a game scrolling

  1. #1
    Junior Member
    Join Date
    Jun 2003
    Posts
    12

    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.
    MC Reign

  2. #2
    Super Moderator
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141

    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

  3. #3
    Junior Member
    Join Date
    Jun 2003
    Posts
    12

    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; }
    }
    }
    MC Reign

  4. #4
    Super Moderator
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    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
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com