twos up!
- Started
- Last post
- 11 Responses
- JamesEngage
I need to load the same image into two movieclips on stage at one time... what is the best way to do this rather than doing loadMovie for both of them...
help us unfittoprint! :)
- ozhanlion0
what's wrong with loadMovie() ?
You can pretty create a for loop inside a function if you are dealing with more than 2 but if it is 2 movie's I don't see any harm here.
justmy2cents
- smoothblend0
put a play(); function in the first and second frame of the new movie.
I know it sounds stupid. But it works for me.
- JamesEngage0
No... what I want to do is load the same jpg into two differnt movieclips... and am concerned that it is in effect doubling up the amount of bytes t download... odes this make sense?
- brundlefly0
shouldn't
if you just duplicate the movie clip.
- unformatted0
i would try duplicateMovieClip();
- JamesEngage0
B'mp
- unfittoprint0
I'm not sure about the 'doubling' of bytes loaded....
but you might want to use some loop to check the loading of 1 movie and then duplicate it...
mc1.loadMovie("image1.jpg");
loadLoop=setInterval(function(){
if( mc1.getBytesLoaded() == mc1.getBytesTotal() && mc1.getBytesTotal() > 100){
clearInterval(loadLoop);
mc1.duplicateMovieClip("mc2", 10)
};
}, 50)stop();
- JamesEngage0
ta... unfittoprint... will have a go at that... would be good to find out about the doubling thing... I hate stuff like that... keeps me awake at night!
- unfittoprint0
we don't want that, now do we?
;-)
- tripleflux0
If you load in a jpg. it should sit in the cache. It won't need to download it again, it will add to the total bytes loaded but that shouldn't matter. Just listen to unfittoprint.
- JamesEngage0
yeah but I want it to simulataneous... becasue of what I'm doing with it... but I guess I can download it of screen, and then duplicate it to the two on screen... sweet!...
that's what I want... was too busy thinking about loading it into one clip and worrying avout the delay between the two... it's amazing what a little thought will give you... I'll get that done in the morning :) Cheers All !