A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Refresh a Movie?

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    Refresh a Movie?

    Hello everyone,

    I was just wondering if there was a way using Actionscript to refresh a movie, meaning start from the beginning completly fresh as if you just opened it for the first time

    Yes there is some point as to why I want to know , since for a game Im making , Im having quite the trouble removing movieclips. So when you click 'again' after losing , the old movieclips are still there and therfore pose a big problem

    Having a refresh would be nice

    Thanks everyone

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,836
    try "unloadMovie(target:MovieClip) : Void" this is if you use the loadMovie function
    .

  3. #3
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Ok sounds good, but Ill keep that in mind when I use a loadmovie. The reason Im asking this is because there is only ONE movie swf. On the game over scene, when you click the 'again' button, it takes you to the game scene

    The problem is, my removemovieclip things dont work properly, and so the movieclips stay


    For example, you die on level 2, and click the 'again' button. It will take you back to level 1, but since removing my movieclips do not work ... the level 2 blocks are invisibly there on level 1 .. causing somewhat of a problem

    Anyways, thanks for the help

  4. #4
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,836
    Have you tried "putting them out of action" so to speak? For instance move them off the stage or something like that.
    .

  5. #5
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Well I was reverse engineering a very basic engine for a 'breakout' type game. It was basically a few blocks that you can destroy with the ball which bounces around the walls and paddle

    I had to modify it to fit my needs, but basically its a tile based game, the blocks are the tiles

    Everything is stored in a two demensional array, all the 1's representing where a block will appear. Once the ball hits the block, the movieclip is removed ... that works fine

    But for some reason when I myself remove a movieclip after hitting the 'boundary' line which takes you to the gameover screen with the 'again' button, the movieclips or tiles do not dissapear

    Its wierd

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