Solved

How to sync images to playback of an FLV in Flash CS4

Posted on 2009-06-27
2
376 Views
Last Modified: 2013-12-25
I need to sync images to the playback of an FLV file in Flash CS4.  Anyone have any insight?  The help files are not descritpive enough for my level of AS knowledge.
0
Comment
Question by:vividpixel
2 Comments
 
LVL 1

Accepted Solution

by:
mynamebecory2 earned 500 total points
ID: 24730136
You can embed metadata in an FLV file.

See to inject metadata: http://www.buraks.com/flvmdi/
See to inspect metadata: http://www.buraks.com/flvmdv/

When you're playing the FLV file using the NetStream class you can create an onMetaData function in the class which is managing your NetStream and assign the NetStream's client property to "this".

See code snippet.

Then you can either set the Image's source based on the number of event's you've received so far or you can embed your own properties like "imagesource=imageX.jpg" in the each of the metadata/cuepoints you embed in the FLV.

Also for reference: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001037.html
http://venixflytrap.net/2008/05/11/embedding-metadata-in-flv-files/
public class MyNetStreamOwningClass {
 
     private var ns:NetStream = new NetStream(myNetConnection);
 
     public function MyNetStreamOwningClass(){
          ns.client = this;
          ns.play( "myMovie.flv" );
     }
 
     public function onMetaData( e:Object ):void {
          trace( "METADATA EVENT: " + e.toString() );
          // TODO: code to display new Image
          // e.g. myImage.source = ...
     }
}

Open in new window

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

832 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