-
I am loading a jpeg into a movie clip and was wonering if there is anyway of having a simple preloader for this. any suggestion?
mike
-
i wouldnt mind a simple preloader for jpgs either. check out this site i just did. http://www.ultrasounds.com and look at the gallery. if i could put a preloader in for the jpg, it would be great.
if anyone has made one before... could you explain and post the code and everything?
thanks in advance
-
u can load the jpg in a target instead of _level
then use the MovieClip.getBytesLoaded action!
You can compare the value of the getBytesLoaded action with the value of the getBytesTotal action to determine what percentage of a movie clip has loaded. just like u do when u make one for a .swf <---- but for a swf u use the _framesloaded and _totalframes actions
-
I'm working on that right now (jpg Preloader)
I'm testing this you can try it if you like. let me know and I'll email you the fla.
here's the code on an empty mc:
onClipEvent (load) {
targetClip.loadMovie("contactUs_slides/4.jpg")
}
onClipEvent (enterFrame) {
//readout values for the loading jpgs in dynamic text boxes
bytesLoaded = targetClip.getBytesLoaded();
bytesTotal = targetClip.getBytesTotal();
}
on an emptyMC in the (it wasnt really) emptyMC named targetClip:
onClipEvent (data) {
trace("Data Recieved");
if (getBytesLoaded()>1 && getBytesLoaded()>=getBytesTotal()) {
//count hao many are loaded
_root.numJpgLoaded++;
//check to see if they are all loaded. if they are this function maked other stuff happen.
_root.areJpgAllLoaded();
}
}
hope this helps!
also look at the thread i started the other day
http://board.flashkit.com/board/show...hreadid=348704
-
Have you got this working yet?
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
|