Solved

Flash CS5 - .swf file playing before preloader finishes

Posted on 2012-03-27
5
501 Views
Last Modified: 2012-04-07
Using a preloader, but the audio (FLVPlayback component) starts before preloader finishes.

How do I stop that FLVPlayback component (instance name = aud01) from playing until the entire .swf file is loaded?

Here is my AS3:

import fl.video.MetadataEvent;
aud01.addEventListener(MetadataEvent.CUE_POINT, fl_CuePointHandler);

function fl_CuePointHandler(event:MetadataEvent):void
{
      if (event.info.name=="Cue Point 1")
      {gotoAndStop(5);}
      {trace(event.info.name + ", Time = " + aud01.playheadTime + ", Frame " + (this.currentFrame +1));}
      
      if (event.info.name=="Cue Point 2")
      {gotoAndStop(10);}
      
      if (event.info.name=="Cue Point 3")
      {gotoAndStop(15);}      

}

stop();
0
Comment
Question by:tlengnick
  • 4
5 Comments
 
LVL 8

Expert Comment

by:Jen0910
ID: 37776612
Do you have your preloader set to progressive load? If so, it will play before the entire item is loaded.
0
 

Author Comment

by:tlengnick
ID: 37777889
How do check that? Flash cs5
0
 

Author Comment

by:tlengnick
ID: 37784178
0
 

Accepted Solution

by:
tlengnick earned 0 total points
ID: 37799117
I figured it out...

In general, I did the following:

() Unchecked "autoplay" in the properties panel of the FLVPlayback file
() Made sure there was no AS3 on frame 1 telling it to play
() In my preloader, in the "load complete" function, I told it to play the video
0
 

Author Closing Comment

by:tlengnick
ID: 37818734
no comments/help added after one initial inquiry.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

809 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