|
-
Determining if a jpeg has loaded?
I have the following load code:
Code:
_root.loaderMC.loadMovie("new.jpeg");
and what I'd like to do is to have the timeline hold there until the rather large jpeg has finished loading. What's the easiest method to accomplish this?
Thanks in advance!
-
Senior Member
Easiest is to use what you have and a stop....
_root.loaderMC.loadMovie("new.jpeg");
_root.stop();
....AND to have this ON the loaderMC clip.....
onClipEvent(load){
_root.play();
}
-
...loadMovie("your.jpg", 1);
you still need to call the level you want to load the movie on and have you already created a empty movie clip?
Next you need a preloader that is attached to your _root movie and you will need it to kick off. when the preloader hits 100% call a function(then you can run your loaded actions thru the function) or set a loaded variable from false to true(then youcan use a if statment on the other file to find out if the movie is loaded).
Hope this helps!
Quince
-
Originally posted by pellepiano
Easiest is to use what you have and a stop....
_root.loaderMC.loadMovie("new.jpeg");
_root.stop();
....AND to have this ON the loaderMC clip.....
onClipEvent(load){
_root.play();
}
So adding the stop obviously works, but the "onClipEvent" to the empty movieclip doesn't work, as the (load) portion just calls the "play" when the movieclip first appears on the timeline, not necessarily when the jpeg data that is being loaded into the MC finishes.
-
Senior Member
The on load action is triggered everytime anything is loaded into the movieclip.
It slipped my mind though that the action is also triggered when the mc is introduced, but is easily fixed by a if statement
onClipEvent(load){
if(_root.ok != 1){
}else{
_root.ok=1;
_root.play();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|