dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: possible to remove an instance of an MC when using Attach??

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    116

    possible to remove an instance of an MC when using Attach??

    I have an mc in my library linked with the name "myCurrentTN". I'm using the attachMovie code in an mc, say MC2, but want to remove the newly created instance on a button click.

    here's the code I have in the first frame of the mc:

    this.attachMovie("myCurrentTN","myCurrentTN2",2); //works fine


    Would the unload or removie movie clip do the trick with removing myCurrentTN2 (and not the entire 'this' mc)?

    Thanks..

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    code:
    removeMovieClip("myCurrentTN2");


  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    116
    Thanks gSOLO_01 ....it worked, but when i added a createEmptyMC code and a variable it didn't... What would I need to do to remove the mc with the instance name "myCurrentTN"+ID ?

    var ID = 1;
    this.createEmptyMovieClip("myMovie", 1);
    this.myMovie.attachMovie("myCurrentTN", "myCurrentTN"+ID, 2);


    I tried:
    myMovie.removeMovieClip("myCurrentTN"+ID);

    //and
    newID = "myCurrentTN"+ID;
    myMovie.newID.removeMovieClip();
    Last edited by flashkitok; 06-05-2003 at 04:15 PM.

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