create, unload and create again.

  • sara.s
  • Newbie
  • Newbie
  • sara.s
  • Posts: 13

Post 3+ Months Ago

hi every body :)

I have a little problem with my movies, I create an empty movieClip and then I load a pic into it, when an event occur I want to unload or remove my movie and then create it again with the same instance name, but it doesn't create it again..

can you help me?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

are you sure its being removed completely?

Code: [ Select ]
if(path.MovieClipName != undefined){
removeMovieClip(path.MovieClipName);
}

trace(path.MovieClipName);
  1. if(path.MovieClipName != undefined){
  2. removeMovieClip(path.MovieClipName);
  3. }
  4. trace(path.MovieClipName);
  • sara.s
  • Newbie
  • Newbie
  • sara.s
  • Posts: 13

Post 3+ Months Ago

well, with this code I can see that when I use removeMovieClip the movie doesn't remove, but when I use unloadMovie the movie goes for ever..

why do you think?
what can I do to remove the movie completely ?
  • sara.s
  • Newbie
  • Newbie
  • sara.s
  • Posts: 13

Post 3+ Months Ago

you know, the if is true and the code goes in to it, I place a trace in it. but why the movie is still there?
  • sara.s
  • Newbie
  • Newbie
  • sara.s
  • Posts: 13

Post 3+ Months Ago

horaaaaaaa

I find it :D
Any movie clip with a depth between 0 and 1048575 inclusive can be programmatically removed. Any other movie clip remains unaffected by removeMovieClip( ).
As you may have already noticed, when you create movie clips using getNextHighestDepth( ), they are generally assigned depths greater than 1048575. That means you cannot remove them using a conventional removeMovieClip( ) method call. However, you can still remove them. The key is that you need to change the depth to be within the valid range. You can accomplish that using swapDepths( ). For example, you can use the following to remove mClip even if its original depth was not in the valid range.

mClip.swapDepths(0);
mClip.removeMovieClip();
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

strange. I don't think i've ever had that problem with getNextHighestDepth

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.