Results 1 to 3 of 3

Thread: Preloading a SWF containing embedded video

Hybrid View

  1. #1
    Join Date
    Feb 2003

    Preloading a SWF containing embedded video

    Hi all,

    I have a preloader that preloads a separate/external SWF...
    Original FLA's can downloaded here:
    The Preloader = introloader.fla
    The Movie = intro.fla

    The problem is, the preloader (introloader.swf) seems to be preloading all the elements of the movie (intro.swf) except for the emedded video clip that was imported from a Quicktime Movie (mov) file, and then playing the movie before the embedded clip has finished loading.
    Click here to see an example.

    Does anyone know how I can make the preloader preload the entire intro.swf movie (including the embedded .mov file), before it starts playing?

    Any help is very much appreciated!



  2. #2
    Join Date
    Feb 2008
    NW Washington State
    Most preloaders I've used are created using the first 5 or 10 frames of the main movie, not as a seperate loader, so that may be a problem.
    You are correct, it is starting to download the main movie immediately. Seems like the offending line is
    from your preloader, it's loading the movie before the preloader works through all the percentages. To test that theory, comment out all the rest of the code. Main movie loads and plays.
    So it's loading and playing the main movie while the preloader is working away telling you how much has been downloaded.
    If you put your "container" in frame 10, preloader in the first 10 frames, then "this" will be the entire clip (preloader and movie). Then just measure the percent downloaded of "this". At 100%, go to frame 10 and play the movie. something like this:
    this.onEnterFrame = function():Void {
    	var loadedData:Number = this.getBytesLoaded();
    	var allData:Number = this.getBytesTotal();
    	var percent:Number = Math.round(loadedData/allData*100);
    		if (loadedData>=allData) {
    		delete this.onEnterFrame;
    adapt for your loader bar, but maybe you get the idea.
    Oh yeah, don't forget to put a "stop();" in the last frame before the "container".
    Best wishes,
    Eye for Video
    Last edited by Eye for Video; 01-22-2009 at 11:35 AM.

  3. #3
    Join Date
    Feb 2003
    Thanks EFV! You're a genius! That works a treat!

    Cheers mate,


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center