|
-
FLV controls. Code, Strategy, Advice?
Flash CS3 / AS 3
Hey everyone, I have a video where the person on screen points to a couple of areas and at that time I made links pop-up for the user to follow. The video is handled through the FLVPlayback and a corresponding pre-made skin.
When putting this together I timed the links to pop-up based on the frame where the speaker points. The problem lies in that the controls (stop, play, etc.) only control the video itself and the main timeline (where the links are) continues to run. So if at anytime the user hits pause the video pauses but the main timeline keeps moving and the links pop up at awkward times because the timing is thrown off.
This is a problem because I can’t write AS that listens to the skin buttons since they are from another .swf (pre-made skin) and I’m pretty sure there’s no class that will listen for the video to pause and in turn pause the main timeline.
So my question is, is there an easy way to overcome this?
…. ps as I was writing I came up with an idea. Will this work: If I embed the video in a swf with the buttons as they are (essentially joining the timelines), can I then use a skin to control that swf? Will that work or do those skins only control .flv and not .swf???
-
Look into cue points, that should do exactly what you want.
-
In case anyone finds this thread I'd like to post my solution to tying actions in video to your movie. First I gotta thank neznein9 for steering me in the right direction!! I'm new here and he is one of the guys that made me decide to join this forum because I see him constantly making posts and helping people.
It really is pretty easy so this is pretty much targeted towards new people but in the flash video converter you can create cue points (you can do it in AS too if you like). Create some "Event" cue points and using the script below you can target them by name.
cg_video.addEventListener(MetadataEvent.CUE_POINT, cpIteration);
//cue point names are: start_video, cp_services, cp_businessCard, end_video
function cpIteration(e:MetadataEvent):void{
var cue:Object = e.info.name;
trace(cue);
switch(cue){
case "start_video":
trace(null);
break;
//NEXT CASE
case "cp_services":
services_btn.x = 7;
var serviceTween:Tween = new Tween(services_btn, "alpha", None.easeNone, 0, 1, 8, false);
break;
//NEXT CASE
case "cp_businessCard":
businessCard_btn.x = 5;
var BCTween:Tween = new Tween(businessCard_btn, "alpha", None.easeNone, 0, 1, 8, false);
break;
//NEXT CASE
case "end_video":
videoEnd_mc.gotoAndPlay(2);
break;
default:
trace(" \"ID Error\" ");
}
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|