hzrdc2
asked on
Controlling animations from video cuepoints actionscript 3
I'm pondering something and looking for advice...
I am building this proof of concept animation that is based off an FLV talking head. The FLV has cue points so the user can jump to different sections. The interface has moving elements as well (gauges/dials/counters) and I would like to add additional cue points to trigger these animations.
Is this a valid thing to do, or am I asking for problems? Meaning, that at cue point one, jump to frame label X, which plays the animation that resides on the called frame.
I want the video and the various animations to stay in snyc, so I thought this would be a good idea.
Any suggestions would be appreciated.
I am building this proof of concept animation that is based off an FLV talking head. The FLV has cue points so the user can jump to different sections. The interface has moving elements as well (gauges/dials/counters) and I would like to add additional cue points to trigger these animations.
Is this a valid thing to do, or am I asking for problems? Meaning, that at cue point one, jump to frame label X, which plays the animation that resides on the called frame.
I want the video and the various animations to stay in snyc, so I thought this would be a good idea.
Any suggestions would be appreciated.
ASKER
Hmmm... that looks intriguing...
I have been using the attached snippet... it works, but I now need to have the video pause at each cue point.
I have been using the attached snippet... it works, but I now need to have the video pause at each cue point.
function cuePointHandler(event:MetadataEvent):void
{
trace("name = "+event.info.name);
// Go to a frame label with the cue point name
gotoAndStop(event.info.name);
}
flvControl.addEventListener(MetadataEvent.CUE_POINT, cuePointHandler);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I just did and it works perfect, thanks!
Cool. Happy coding :)
cuePointListener = new Object();
cuePointListener.cuePoint = function(eventObject){
callFunction(eventObject.t
};
function callFunction(cueName){
switch (cueName) {
case "question":
trace("Ask your question");
break;
case "answer":
trace("Get the answer");
break;
case "grade":
trace("Grade the answer");
break;
default:
//
}
};
Is this what you ment?