removeMovieClip changes levels and doesn't remove

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default removeMovieClip changes levels and doesn't remove

    I'm trying to remove a movie I attached from my library and it will not work,
    what's worse yet is when I try to remove it it changes it's levels and leaves
    it there.

    the following code"
    trace("d = "+MovieHolder.VideoDisplay.getDepth());
    MovieHolder.VideoDisplay.removeMovieClip();
    trace("d2 = "+MovieHolder.VideoDisplay.getDepth());

    traces:
    d = 1
    d2 = -32770

    Any reason why that is messing up. The movie I attach is a streaming video
    "component" that I've pieced together.

    Thanks, Kevin

    khamstra Guest

  2. Similar Questions and Discussions

    1. removeMovieCLip Problem please help!
      Hi, ok I want to animate drawing lines to create windows where I'll put the copy. For some reason I can't figure out why I'm not able to remove the...
    2. Levels
      Hi I have a movie which has 6 thumbnails. Each thumbnail calls for another movie (movie1.swf, movie2.swf, etc until movie6.swf.) which brings up my...
    3. removeMovieClip
      Hi, I do an "attachMovie" on a button and I want to remove the mc when I click on other button but my removeMovieClip doesn't work, I don't...
    4. Help with Levels....
      Ok, on the left side of my website I have a vertical navigation bar with pop out menus and the right side holds all of the real content. My site...
    5. how to remove a programe from the add/remove list manually
      i am using winXP home, i just remove a programe from the start menu(start>>all programes>>name of the programe>>uninstall),but the programe name is...
  3. #2

    Default Re: removeMovieClip changes levels and doesn't remove

    those are depths, not levels. and there are several ways you could generate
    that problem with a removed movieclip still displaying a depth.
    because you said your movieclip is not being removed (meaning it still appears
    on-stage after executing that removeMovieClip() function?) it seems most likely
    that you've created more than one instance of MovieHolder.VideoDisplay.

    kglad Guest

  4. #3

    Default Re: removeMovieClip changes levels and doesn't remove

    Ok, sorry about the term mistake. Let me explain further.

    I take a mc and attach it then try to remove it with the following code, I put
    a trace(this) inside the mc so I know there is only one of them. Later I try to
    delete it with the following:

    (function at bottom of post)

    When I call this function it traces:
    d = 1
    d2 = -32770

    But the movieClip does get removed but something still exists called
    "MovieHolder.VideoDisplay" and when I remove the movieclip whatever it is moves
    to the depth of -32770. When I trace it it says:
    _level0.MovieHolder.VideoDisplay

    Now this is even a bigger problem...
    if I set MovieHolder.VideoDisplay = undefined it gets rid of it and I see the
    "great" message but if I attach the movieclip again all of the function that
    belong to it do not work the second time.

    The mistake of thinking that it was removing was me telling the streaming
    video to close() and clear() which made it look like it was gone.

    The function that does not work the second time is close(). If i trace it, it
    gives me a message the first time but when it's reattached it does not call
    close?

    Please let me know if you have any ideas or you need me to further explain.

    Thank you, Kevin

    function closeMe() {
    if (MovieHolder.VideoDisplay != undefined) {
    trace("d = "+MovieHolder.VideoDisplay.getDepth());
    MovieHolder.VideoDisplay.removeMovieClip();
    trace("d2 = "+MovieHolder.VideoDisplay.getDepth());
    closeMe();
    } else {
    trace("great... it's gone");
    }
    }

    khamstra Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139