How can I create an Adobe Flash Starfield which changes based on user control?

I would like to create a star field in Adobe flash that dynamically changes based on user arrow key controls. Basically, the effect I want is that a user looks like they are inside the cockpit of a ship, and when they move the arrow keys, they are “flying” through space, and every once in a while space images will appear so that it gives the space traveler effect. Could someone point me in the right direction? Thanks!

Answer
? Favorite Answer

  • If you are looking for some kind of D animation then the following is not what you are looking for, but give it a go anyway! xD

    *Make sure the cockpit image is on one layer, and the starfield image is on another layer, below the first.

    *Enlarge the starfield image so that it is larger than the cockpit (Shortcut: Q).

    *Select the starfield image and convert it to a movieclip (Shortcut: F).

    *Select the starfield image if it isn’t already then open the Actions panel (Shortcut: F) and enter the following code.

    onClipEvent (enterFrame) {

    if (Key.isDown(Key.RIGHT)) {

    this._x -= ;

    }

    if (Key.isDown(Key.LEFT)) {

    this._x += ;

    }

    if (Key.isDown(Key.UP)) {

    this._y += ;

    }

    if (Key.isDown(Key.DOWN)) {

    this._y -= ;

    }

    }

    I have reversed the x and y values to make it look as if you are controlling the ship and not the starfield itself.

    If you want to experiment with this, try changing the x’s and y’s, the -‘s and +’s, and the ‘s.

    Good luck!

  • Other Related Questions

    Learning Visual Basic ?

    Answers Favorite AnswerTry using "System.Diagnostics.Process. GetProcessesByName( "iwmp" ).Length > " for your check.

    Microsoft Office word Fast answer needed its urgent?
    See also  Is There Any Software That Can Allow MP To Midi (guitar file) ?

    Answers Favorite AnswerTry this:http://www.techsupport.com///microsoft-wo...Here is another thread re: the same issue with instructions:http://www.pcreview.co.uk/forums/modification-not-...http://www.techsupport.com///microsoft-wo...http://support.microsoft.com/kb/http://answers.microsoft.com/en-us/office/forum/of...

    Can I download a whole city android google maps?

    Answers Favorite Answer:) Yes!!!Interesting question. I wonder why it has blocked in this way especially considering that Google Earth is very detailed and has good maps of Israel.

    What is meant by ROM ? Explain in simple but elaborate terms.What about mobile ROM’s?

    Answers Favorite AnswerHi Diva below is a link that will give a simple answer.http://wiki.answers.com/Q/What_does_ROM_stand_for_...Hope this helps.Source(s): Experience and wiki answers.ROM is Read only memory. i.e data can write only once.There two types of ROM..ROM.PROMThe difference between ROM and PROM.that is ROM is programmed during manufacturing it means data stored by manufacturing company.PROM is blank memory that a user programmable memory.user can store content on PROM.both ROM and PROM are Read only memory Data can write only once.and its not possible to write so many time.Memories of PROM and ROM are Non-volatile in nature. Its that stored informations can retain even power goes off.

    Leave a Comment