Syncing animation with movie?

  • CE/ Pyrocy
  • Proficient
  • Proficient
  • User avatar
  • Posts: 374
  • Loc: Santa Barbara, CA

Post 3+ Months Ago

Hey every1,

I was wondering how to sync an animation or MC load to a certain time in a movie playing on the same frame?

Like if theres an explosion at 1min 23 seconds in a streaming flash video.... is it possible to have a MC start when the streaming video reaches 1min and 23 seconds?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Yes, you use action script "listeners". Just do a search for that and you'll find the information and tutorials you need.

Also if you are streaming FLV's you can add cuepoints to the FLV's during encoding. That actually makes the action script much easier because the cuepoints are already embedded in the movie, but you can still use listeners without the embedded cuepoints.

Here's an example of one I made that listens for the end of the movie and then returns to the beginning to replay. The cuepoint "endLoop" is embedded at the end of the FLV. my_FLVPlybk is the instance name of the FLVPlayback component.

Code: [ Select ]
stop();

import mx.video.*;
var listenerObject1:Object = new Object();
listenerObject1.cuePoint = function(eventObject:Object):Void {
    var cuePtName = eventObject.info.name;
    if (cuePtName == "endLoop") {
    my_FLVPlybk.seekToNavCuePoint(0);
    
    //trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
    //trace("Cue point name is: " + eventObject.info.name);
    //trace("Cue point type is: " + eventObject.info.type);
     }
};
my_FLVPlybk.addEventListener("cuePoint", listenerObject1);
  1. stop();
  2. import mx.video.*;
  3. var listenerObject1:Object = new Object();
  4. listenerObject1.cuePoint = function(eventObject:Object):Void {
  5.     var cuePtName = eventObject.info.name;
  6.     if (cuePtName == "endLoop") {
  7.     my_FLVPlybk.seekToNavCuePoint(0);
  8.     
  9.     //trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
  10.     //trace("Cue point name is: " + eventObject.info.name);
  11.     //trace("Cue point type is: " + eventObject.info.type);
  12.      }
  13. };
  14. my_FLVPlybk.addEventListener("cuePoint", listenerObject1);
  • CE/ Pyrocy
  • Proficient
  • Proficient
  • User avatar
  • Posts: 374
  • Loc: Santa Barbara, CA

Post 3+ Months Ago

thanks Atno, exactly wat i was looking for!
  • munni
  • Born
  • Born
  • munni
  • Posts: 3

Post 3+ Months Ago

hello sir;

i want dynamic photo gallery with flash using XML.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.