A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: trying to delete movie clip

  1. #1
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194

    trying to delete movie clip

    Hi,

    I'm trying to delete some dynamically created clips like this

    obj = objects[AllMovies.instance];
    name = Instance_Array1[i];
    obj[name].swapDepths(1000);
    obj[name].removeMovieClip();


    but its not working, any idea's what i'm doing wrong? , the variables obj, and name are correct, because I've checked them.


    (I'm using Flash 6)

    thanks

    phil.

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    if you put

    trace((typeof obj[name] == "movieclip"));

    do you get true?

  3. #3
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    yes, it said "true"
    but i just changed the code to this, and it seems to work...

    obj = objects[AllMovies.instance];
    name = Instance_Array1[i];
    obj2 = obj[name]
    obj2.swapDepths(1000);
    obj2.removeMovieClip();

    thanks anyway.

    phil.

  4. #4
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    oops....the last line, I meant I changed to this (not what I just posted)

    removeMovieClip(obj2);


    phil.

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