Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Random object

  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Random object

    Hi,

    Producing a simple mouse controlled shooter game, trying to come up with code for the target object that is going to be shot.

    Looking for it to appear/disappear randomly on the screen before it gets "hit" unloads and registers 1 point incrementals up to 10 under 30 secs, before next level is reached and the same thing happens but faster- total levels 7.

    My question is how do I make the object appear/dissapear on the screen without it touching props on the stage, that are found at the top of the screen and rectangle shapes in the middle,

    Thanks and Regards

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    when you want to load the object, then use createEmptyMovieClip and attachMovie to load a new target. To dissapear, removeMovieClip will do the trick.

    Its hard to provide any kind of support without an example or code though sorry.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Tags for this Thread

    Posting Permissions

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