Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check if movie is loaded on another level & play frame#??

Status
Not open for further replies.
Jun 10, 2003
1
US
I have a menu for an all flash webpage on a top level and I want to command flash to check and see if there is a movie loaded on another level, such as level 1, and if so play frame 30 of that movie. and if there's no movie, do nothing. I tried the ifFrameLoaded command, but cant get it to work for other levels than the current level. I have tried it in conjunction with _level1 for example and with "tell target" It seems to be in compatible.

Do you know any other code to do this?

Thanks for any ideas,

Peter

PS this is the code I have tried that didnt work:

on (release) {
_level1.ifFrameLoaded (1) {
gotoAndPlay(30);
}
}

 
Several ways to check if a movie is loaded or not... How come you don't know if it is or not anyways? You could set a level0 variable each time a movie is loaded on any level and thus allways know if there's a movie loaded or not.

But if you don't know, the easiest might be to simply check the level's width. If it's undefined, it thus means there's no movie loaded, or at least that if there's one loading, it ain't fully loaded yet.

on(release){
if(_level1.width > 0){
_level1.gotoAndPlay(30);
} else {
stop();
}
 
Sorry typo in the code...

on(release){
if(_level1._width > 0){
_level1.gotoAndPlay(30);
} else {
stop();
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top