hey guys… I have a question that i would like u all to answer. How to load a jpg file into flash so as to lower the time needed to download? There are a lot of web site featuring this and they even have a small loading word and all look so cool. Hmmm… I really need detail steps to do this as i am little stupid… thanks guys!!!C:-)
thats the problem i still dont under stand
its a step by step tutorial, it can’t be explained much better than that…
There are a lot of web site featuring this and they even have a small loading word and all look so cool.
If you want the word loading there, you could put that in static text on the stage and the jpg will load on top of it. If you want an actual preloader, I think you would have to make a different swf file and load in the movie instead of the jpg.
hey thanks a lot guys…
actually, you dont neccessarily have to have another swf with the jpg loaded into it…what you can do is load the jpeg into a movie clip like this…
mc.loadMovie(“pic.jpg”);
now as far as a preloader goes do something like this…
//load movie and pic
_root.pics.pic_spot.loadMovie(_root.galleryPic);
//loading seq
this.createEmptyMovieClip(“preloader”, 1000);
pic_spot._visible = false;
preloader.onEnterFrame = function() {
var l = pic_spot.getBytesLoaded();
var t = pic_spot.getBytesTotal();
per = Math.round((l/t)*100);
if (l>0 && l>=t) {
gotoAndPlay(13);
pic_spot._visible = 1;
delete this.onEnterFrame;
} else {
_root.pics.loadBar._width = per;
_root.pics.load_txt = per+"%";
}
};
“pic_spot” here is the movie clip i loaded my pics into…all im basically doing is loading a pic into it and then turning the visibility off, grabbing the size of it and the size of it thats been loaded…your basic preloader kinda deal…
hope that helps
You know, about an hour ago, I thought of the same thing in a similar post:
http://www.kirupaforum.com/forums/showthread.php?s=&postid=208470#post208470
I’ve just never done that, thanks!!