-
Hello folks,
How do I preload an image??
I´m loading a jpg to my MC dummy, that works fine, but i whant a preloader on it - how do I do that??
-
on the dummy MC
Code:
onClipEvent(data)
{
bl = this.getBytesLoaded();
bt = this.getBytesTotal();
perc = bl / bt * 100;
_root.percentText.text = perc;
}
Something like that should work
-
OK -I will try it now, get back to you soon on how it turned out!
-
Squareball2 - there is someting that I dont understand, were do I put my textfeilds so I can see how much that is loaded???
Can you please tell me more about were too put the actionscript and were too put the txtfields.
I have a MC called "dummy" on the timeline and som buttons on the timeline that tells:
on (release) {
loadMovie("bild.jpg", "dummy");
}
That works but the preloading script that I put on the dummyMC´s the timeline doesnt work - does it not need a loop or something?? I know that you script is correct, it´s just put on the rong place I think.
Please help me out here - im stucked!! If you have time I really would appreciate if you can send me a fla and show me how too put it together. My mailadress is veenhuis@bredband.net
Thanks,
Spike
-
No problem
Give me a few mintues to work up an FLA
-
Thank you so much =)
I will be waiting for it over here!!!
Spike
-
heres a really nice example from Flashstar.de
http://www.flashstar.de/tutlist/inde...ich=fsmxextdat
cheers,
John
-
That´s true - but i don´t understand the words =) If it was in english I hade loved it =)
Spike
-
Ok
i'm trying to get time to make this FLA but right now it's not happening..
-
Oh here is an easy way out (until I translate Madokan's tutorial)
Use the progress bar.
Drag the progress bar onto the stage and tell it to monitor dummy.
-
Creating an image preloader dynamically:
Code:
this.createEmptyMovieClip("imageholder",1)
imageholder.loadMovie("myimage.jpg")
this.onEnterFrame=function(){
if(imageholder.getBytesLoaded() == imageholder.getBytesTotal()){
//image is loaded
this.onEnterFrame=null
//dos omething to the now fully loaded image
var c=new Color(imageholder)
c.setTransform({ra:33,ga:44,ba:55})
}
}
unfortuneatley any methods/properties/objects you place inside of a movieclip are deleted when the loadMovie method is called. Therefore you have to check the status of the image from another timeline where the methods and properties arent deleted.
-
-
This weekend I'll translate Madokan's code for every one ok
My code isn't the best way to do it.. Madokan's code is awesome.
-
Thank you very much Squareball2!!
With this code I can work I think.
Looking forward too see you translate of Madokan's code.
Please let me know.
Spike
-
any word on the translation??
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
|