Help! Flash preloaders...
- Started
- Last post
- 12 Responses
- Fleaguru
Guys and gals!Always wanted to know how to do this, now I'm going to find out if it kills me!
All I want to do is have a preloader brought onto the stage everytime I load a movieclip into a blank movieclip - with loadMovie();
Can anyone link me to some good tutorials/source files?
Much appreciated
Tits & Beans
- imakedesign0
just drop a preloader into the first frame of the external movie you are loading.
- Elfangio0
Well why dont u make a preload in each movieclip you load...works with me!!
- unfittoprint0
well you could use a prototype or a class that extends the Movieclip class.
something like [ASS.0]:
Movieclip.prototype.loadObj = function(targetObj,content){
targetObj.loadMovie(content);
this.attachMovie("loader", "loader", 10, {targetObj:targetObj})
}//usage
loadObj(mc1,"movie.swf");you'll have to create a library movie, with a linkage name "loader" [set to export on first frame], with an inside loop where it checks if
(targetObj.getBytesLoaded() == targetObj.getBytesTotal() && targetObj.getBytesTotal() > 10)
//and if so
delete onEnterFrame;
this.removeMovieClip();
- Fleaguru0
yeah, I know you can do that, but I'm looking to do it dynamically - so that the same preloader that is sitting in the library can be pulled out, positioned where I tell it to,and the get off the stage when it's done - or go invisible.
also - when loading jpegs into a gallery for example - having little preload bars on them.
hope it makes sense
thanks for the quick response - that will be my last resort - putting the preloader in the swf that I'm loading.
- ********0
unfit just said it.
make a class or a prototype. Once you've done it once you can use it forever and ever and live happily ever after
- Fleaguru0
cheers guys(?) just what I wanted - I'm not quite as advanced as that, but i'm going to jump straight into be with those badboy classes and prototypes and get dirrrty with em. Thanks for the direction
- ********0
fleaguru, I highly recommend this book:
- Fleaguru0
Yeah, I've seen a similar one which came out about the same time - http://www.amazon.co.uk/exec/obi…
do you think they are both similar?
I turned my back on it a while back, because I decided that it over stepped the line between being a programmer and not a Designer - which is what I am! No I'm thinking, I just need to delv in and get on with it!
Cheers mate.
- ********0
I can't really comment on the other book, haven't got it.
The book I mentioned is the mutt's nuts though!
- Neuarmy0
hey MX_OnD,
isn't that book out dated tho?
it's only for MX, not MX04?just curious...
- Fleaguru0
Yeah, that one and the other OOP for actionscript are both published in 2002, so if anyone knows of a newer book for OOP - I'd like to check that out...
- cvirus0
here's a simpler way to do it without dropping preloaders into every external clip: