homepage Welcome to WebmasterWorld Guest from 50.17.162.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Preload Macromedia Flash
DanielSweden




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

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

 

RonPK




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

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!

DanielSweden




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

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

RonPK




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

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";
}

DanielSweden




msg:1563754
 9:17 pm on Apr 1, 2003 (gmt 0)

thank you - you helped me a lot!

have a nice life!

//Daniel

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved