Load movie after page load is complete

Posted on 2010-01-13
Medium Priority
Last Modified: 2013-11-11

Hi there,

I have a swf movie in my page.  I need this movie to start loading after the rest of the page is already loaded.
How can I do that without altering the swf?

Thanks  a ton
Question by:Dada44
LVL 12

Expert Comment

ID: 26303574
you can set a html page loader using javascript.


You have to set time for page loading at background.

So people will see page loader till page loads.

Author Comment

ID: 26304831
Sorry, sajayj2009, I didn't explain myself properly, what I mean is:

I have a web page with a swf inside (the one you helped me to link ;))

This swf is a heavy one, and I need the page to load first, and once the page is loaded the swf should start  loading. This way the viewers can start going through the page contents while the swf movie is loading.

Thanks once again
LVL 12

Expert Comment

ID: 26311082
Then you need to set a preloader for flash
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 14

Accepted Solution

TanLiHao earned 1000 total points
ID: 26311565
Hmm sorry to interrupt but here's my take on this.

if your page is not entirely Flash, that is you have some contents that are HTML and others are Flash and you want the HTML text to load first you can use the body onload to load the swf after the page have loaded.

Otherwise, you are required to edit some Actionscript.

Here's an example of using body onload.


If you are not sure on how to use it, you can always ask. Though you need to specify your way of embedding your .swf, is it like using SWFObject or something else.

The reason for my interruption is I don't see how a preloader will be used to load the movie after the page is loaded, because the .swf will still load together with the page.

Assisted Solution

darianbr earned 1000 total points
ID: 26321220
start off by placing a div in your document where the flash video will appear.

then use jquery to insert the flash file into the div once the page is loaded.

you can even place a preview jpg inside the div for people to see until it is replaced by the flash video player
<div id='flashvideo'>Flash File Will Appear Here</div>

<script type='text/javascript'>
$(document).ready(function() {

     $('#flashvideo').html('<object>.... ....</object');


Open in new window


Author Closing Comment

ID: 31676645
thanks! gave me the tip for final solution!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question