Results 1 to 3 of 3

Thread: Dynamic Starfield don't work

  1. #1

    Dynamic Starfield don't work

    Hy

    Can u please help me?

    My starfield just don't move.
    I realy dont know what to do!
    please help.
    it's urgent

    thank you
    Attached Files Attached Files

  2. #2
    You have two onEnterFrame functions, the second one is overwriting the one that would normally make the stars move.

    I think that's the issue from a brief look.

    edit: Yeah just change the _root. one to :

    Code:
    _root.onEnterFrame = function() {
        for (var j = 0; j<stars; j++) {
            var star = this["star"+j];
            if (star._x>0) {
                star._x -= star.speed;
            } else {
                star._x = Stage.height;
                star.speed = random(maxSpeed-minSpeed)+minSpeed;
                star._x = random(Stage.width);
            }
        }
        if (paused == false) {
            _root.pause._visible = false;
            moveHero(8);
        } else {
            _root.pause._visible = true;
        }
        if(sound_on!=true){
            stopAllSounds();
        }
    };
    and delete the "this.onEnterFrame" function.

  3. #3
    Thank you!!!

    it work's

    Can u please help me one more time ?
    I would like to see stars behind the ship and my reset button.... i mean behind everything.
    what I have to do?

    thx

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012