Solved

Flash CS5 - .swf file playing before preloader finishes

Posted on 2012-03-27
5
499 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

776 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