dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: problem deleting movie clip at runtime

  1. #1
    The Flash AS Newb
    Join Date
    May 2006
    Location
    Australia
    Posts
    179

    problem deleting movie clip at runtime

    ive been having problems with flash all damn day now i cant delete a movie clip during the movie using actionscript,
    when i go to the game over screen in my game i want it to delete 5 things that i loaded using the attachMovie they have instance name ball0 - 4 and they are all of the object ball i have no code for this atm as mine was screwing up so i deleted it anything in mind?

    also just so i dont have to create another thread how would i make it add 1 to a variable if like object one with instance name of hi hit object 2 with instance name of kill i want it to be like if hi runs into kill anywere on the movie you get a point but imnew to hit test and the other methods

  2. #2
    Junior Member
    Join Date
    Oct 2005
    Posts
    26
    Okay... if, for example, you attached the MC's like this:

    mainClip.attachMovie("ball0", "myBall0", 1000);

    you remove them like this:

    mainClip.removeMovieClip();

    Is this what you've been trying?

  3. #3
    The Flash AS Newb
    Join Date
    May 2006
    Location
    Australia
    Posts
    179
    i attached them using this

    var blah = this.attachMovie("ball","ball"+i,i)

    this was the main timeline

  4. #4
    Junior Member
    Join Date
    Oct 2005
    Posts
    26
    Then this should work:

    removeMovieClip("ball1");
    removeMovieClip("ball2");
    removeMovieClip("ball3");

    ...etc.

  5. #5
    The Flash AS Newb
    Join Date
    May 2006
    Location
    Australia
    Posts
    179
    thanks this solved my problem now i can finally just finish the last step on my game YAY!

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