A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Removing a movie clip -

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    26

    Removing a movie clip -

    Code:
    I have the following code:
    for (var i = 0; i<amount; i++) {
    thisFlake = this.attachMovie("snowflake1", "snowflake1"+i, i);
    It places the movie snowflake1 on the stage in my Pre-Load Scene.

    Then when I play the movie the snoflakes work right, but when the pre-loading is done there are falling snowflakes on my next scene, even though there is no code for the snowflakes in that scene.

    I have tried numerous ways to remove the clip:
    this.removeMovieclip("snowflake1")
    delete "snowflake1"
    this.removeAll

    Please help as I am getting tired of flakes where they don't belong. Thanks.

    Sincerely,
    Greg

  2. #2
    Member
    Join Date
    Aug 2006
    Location
    North of the South Pole
    Posts
    46
    Change the first code to this:

    Code:
    for (var i = 0; i<amount; i++) {
    this.attachMovie("snowflake1", "snowflake1"+i+"_mc", i);
    }
    Then to remove it:

    Code:
    for (var i = 0; i<amount; i++) {
    this["snowflake1"+i+"_mc"].removeMovieClip();
    }

  3. #3
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    am i seeing double
    or wasn't this question asked and resolved yesterday in the Actionscript forum ?

    http://board.flashkit.com/board/showthread.php?t=741791

  4. #4
    Member
    Join Date
    Aug 2006
    Location
    North of the South Pole
    Posts
    46
    Oh, I see what happened... gregwhitworth made this thread, then when nobody responded, he made a new one in the Actionscript forum. I think it says somewhere in the directions NOT to post duplicate questions. gregwhitworth, in the future, try to mark questions as "Resolved," so people don't waste their time re-answering an answered question (not to be harsh )

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