PDA

View Full Version : How to check for movieclip existance?


kalel
07-05-2005, 03:05 AM
if I want to do an action if a certain movicelip is created or simply exists how would I check on the stage? I tried

if(_root.loginWindow.userBox_cnt['userBox'+users_so.data[i]]._visible=false)

but I think that since the movie clip is not even there the if condition doesnt show true.

emergency_pants
07-05-2005, 09:36 AM
In the past, I have tended to just use an if() statement with the name of the clip:


if (myMovieClip){
trace("my clip exists!");
}else{
trace("my clip isn't there!");
}

or

if (myMovieClip != undefined){
trace("my clip exists!");
}else{
trace("my clip isn't there!");
}