Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flash General Questions > Other Flash General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-10-2002, 12:44 AM   #1
Doddy22
Registered User
 
Join Date: Jun 2002
Location: Australia
Posts: 9
Default removeMovieClip removing the wrong movie!!?!?!

Hi,

I was writing a small platform game when I stumbled into a problem, at a certain point the entire background would dissappear, and after a couple of hours of debugging found that was my removetiles function which was the cause.

removeTile = function(whichTile){
var tiletype = tilegrid[whichTile]
if(tiletype != undefined){
if(tiletype<foreground_tiles_start_at){
background["Tile"+whichTile].removeMovieClip();
}else{
foreground["Tile"+whichTile].removeMovieClip();
}
}
}

this function works perfectly, except when it called removeTile(726)

when that was called tiletype == 5, so it should have gone on to delete background.tile726 but instead it deleted background.

i place a small loop before background ["Tile"+whichTile].removeMovieClip() that output the name of all the clips in background and tile726 was in that.
i also placed a trace(background._target) before and after that line and which confirm that it was that line that is the problem, background._target was undefined after the removeMovieClip was called.

Is this a bug or have i just done something wrong?
Doddy22 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:05 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.