Welcome to WebmasterWorld Guest from 54.162.167.40

Forum Moderators: open

Message Too Old, No Replies

Preload Macromedia Flash

     
3:14 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



Hi everyone!

I am having problems with a page that I have made..

This is my problem:

I need to preload Flash movies when the main page loads, so that these flash movies will run smoothly without delay later on into the website. But I don't want to have a "flashLoader" I would be happier off to use Javascript or asp or something else..

If anyone has any idea, please write a message.

thanks

//Daniel

3:27 pm on Apr 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure whether this works or not, but you could try to use the same trick that is being used in many rollover menus.
In the head:
<script type="text/javascript">
function preloadFlash() {
myFlash = new Image();
myFlash.src ="../media/movie.swf";
}
</script>

The function preloadFlash should be called after the document has been loaded:
<body onLoad="preloadFlash()">

The movie should now be downloaded and put into the browser's cache.

Welcome to WebmasterWorld, by the way!

4:56 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



thanks I am trying it out right now... if I want to load like 10 movies from the first page of the site, do I just repeat the hole thing all over, or can I add more lines to the text you gave me?

please write an example, I'm really not good at javascript.

thank you very much for an extremely fast answer last time =)

//daniel

9:14 pm on Apr 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, simply add more lines:

function preloadFlash() {
myFlash01 = new Image(); myFlash01.src ="../media/movie1.swf";
myFlash02 = new Image(); myFlash02.src ="../media/movie2.swf";
myFlash03 = new Image(); myFlash03.src ="../media/movie3.swf";
}
9:17 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



thank you - you helped me a lot!

have a nice life!

//Daniel

 

Featured Threads

Hot Threads This Week

Hot Threads This Month