Event onRelease to load levels in order

  • flavexxx
  • Born
  • Born
  • flavexxx
  • Posts: 2

Post 3+ Months Ago

Good

I need help with the following script. A button called two-tier movies. A cover and content. Has a conditional which says that if level 5 is loaded, just load the level 6. The issue is that the content is more light, when the event button calls the deck (level 5) and content (level 6), loading the first level 6 that weighs less. I can not call it from the mc (movieclip) Level 5 is the same that I use mc for all buttons.
The script I have is the following:
Code: [ Select ]
on (release) (
unloadMovieNum (7) / / Count 1
unloadMovie (8) / / [i] contenido2
if (_level5._width> 0) (/ / if the level 5 has a value greater than zero
loadMovieNum (galeria.swf "6) / / [i] single load level 6
Else ()
/ / Load but both
loadMovieNum (submenu.swf ", 5);
loadMovieNum ( "gallery. swf ", 6);
)
)
  1. on (release) (
  2. unloadMovieNum (7) / / Count 1
  3. unloadMovie (8) / / [i] contenido2
  4. if (_level5._width> 0) (/ / if the level 5 has a value greater than zero
  5. loadMovieNum (galeria.swf "6) / / [i] single load level 6
  6. Else ()
  7. / / Load but both
  8. loadMovieNum (submenu.swf ", 5);
  9. loadMovieNum ( "gallery. swf ", 6);
  10. )
  11. )

The aim is to level 6 is loaded once the level 5 has been completely loaded. Probe with a "while" but the only thing it achieves is to hang the film.
Code: [ Select ]
if (_level5._width> 0) (/ / if the level 5 has a value greater than zero
loadMovieNum (galeria.swf "6) / / [i] single load level 6
) Else (/ / load but both
loadMovieNum (submenu.swf ", 5);
while (_level5. _width <= 0) () / / wait for upload to level 5 before loading level 6
loadMovieNum (galeria.swf ", 6);
)
  1. if (_level5._width> 0) (/ / if the level 5 has a value greater than zero
  2. loadMovieNum (galeria.swf "6) / / [i] single load level 6
  3. ) Else (/ / load but both
  4. loadMovieNum (submenu.swf ", 5);
  5. while (_level5. _width <= 0) () / / wait for upload to level 5 before loading level 6
  6. loadMovieNum (galeria.swf ", 6);
  7. )

Also have the option of calling in from listeners MovieClip (Loader) all my clips, but never use this function and should reschedule the entire structure, and I get this urge.
Finally, if someone has an example of how to use literal in this case onEnterFrame or variants with SetInterval, I think it would help me too.

Thanks for reading and greetings to all!
Moderator Remark: wrapped with code tags

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 6 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.