Be a Supporter!

removeMovieClip problem in AS2

  • 1,060 Views
  • 2 Replies
New Topic Respond to this Topic
The-Swain
The-Swain
  • Member since: Sep. 16, 2005
  • Offline.
Forum Stats
Member
Level 07
Game Developer
removeMovieClip problem in AS2 2011-01-07 18:10:32 Reply

Not sure about this one.

trace(this);
removeMovieClip(this["player"]);
trace(this);

The first trace displays the movieclip instance fine. Then the removeMovieClip, which SHOULD be removing an instance of "player" inside of it. Second trace reveals that the parent has been deleted instead.

What the hell??


BBS Signature
Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to removeMovieClip problem in AS2 2011-01-07 19:42:26 Reply

Well it would be a better idea to control all game objects from a common parent instead of within itself. So from the document class or main frame or whatever you're using.


nobody

zrb
zrb
  • Member since: Aug. 8, 2006
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to removeMovieClip problem in AS2 2011-01-07 20:39:31 Reply

Can you removeMovieClip(this.player) instead ?

Not sure why its happening, never removed movie clips that way in AS2.


School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature