Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Preloading An SWF Movie Into Browser Cache Prior to Playing

I have two pages, each html containing a Flash movie. The movie contained in the first, an intro page, ends with an instance of getURL(); which redirects to the second, the Web site's home page. I'd like to find a way to cause the second page's swf movie to preload, or download into browser cache, while the first movie is playing so as to avoid any preloading lag time when the intro page switches to the home page. I've accomplished this, but there is still a problem. There is an audio file which is invoked by the second movie. While I can load the second movie by embedding it into the first html page with width and height dimensions of 0%, thus causing it not to display, I can't stop it from playing its linked audio file. Is there a way to cause an swf movie to download into a browser's cache, so that it is loaded and ready to be played, without immediately playing it?
Jonathan Greenberg
Jonathan Greenberg
  • 2
1 Solution
you're just about there

preload the audio file as an event sound .. not streaming..put the loading code on the first frame of the second clip..then it will load with the movie ..

this.loadSound( "http://serverpath:port/mp3filename", false);

and say it's linked name is:audio1

onClipEvent (load) {
      audio1 = new Sound();

on the frame where you want to call the audio.. change the volume back to 100


Dushan De SilvaTechnology ArchitectCommented:
after first movies' preloading finishes, while first movie starts to play, then loadsecond movie aslo in to the first movie with diferent LEVEL. But put second moive disable until first movie finishes. And in the second movie's first frame also we can put stop(), until first movie finishes.

BR Dushan
Dushan De SilvaTechnology ArchitectCommented:
Jonathan GreenbergAuthor Commented:
Thank you all.  Zeffer, yours is the solution that best suited the needs of my situation. I've not yet implimented it, but I suspect it will do the trick. Thanks again.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now