Solved

Flash CS5 Easy way to control video cue points

Posted on 2012-04-02
12
757 Views
Last Modified: 2012-04-15
Flash CS5 AS3: easy way to click my button and seek to next cue point WITHOUT having to know the name of it.

I just want to click a button and have the video skip forward to the next cue point, whatever it may be.
0
Comment
Question by:tlengnick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
12 Comments
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37801334
Maybe you can load all the cue points information in the beginning, store them into the array or something and then use that to navigate through the cue points.

If your question is something like you don't want to know what those cue points values are or you have no way of knowing them, then I don't know if it is possible to do that.  

CyanBlue
0
 

Author Comment

by:tlengnick
ID: 37801482
right... that's what it seems like. It's a shame, because I believe you can do that with frame labels (i.e., you don't have to know the name of the next label to jump to it).

How about if I want to just seek to relative times in the video? For example, I want to click a button, and each time I do, it jumps 10 seconds ahead of where the video is now?

Something like

seek(myvideo.currentDuration + 10);

??
0
 

Author Comment

by:tlengnick
ID: 37801540
This looks like it might do what I want, I just don't understand how to use it.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/FLVPlayback.html#seekToPrevOffset

It reads:
"The number of seconds that the seekToPrevNavCuePoint() method uses when it compares its time against the previous cue point."
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:tlengnick
ID: 37801666
I've created navigation cuepoints in Adobe Soundbooth in order to jump to them.

It is not clear whether I have to simply save the f4v file in SoundBooth and the navigation points will be embedded in the file, or if I have to export the .xml cue points to import them into Flash (I do this for the event markers).

Any idea? I am trying to use this code (below) and am getting the following error: "VideoError: 1003: Invalid seek
      at fl.video::FLVPlayback/seekToNavCuePoint()
      at Shading2_fla::MainTimeline/fx_forward10()"

//AS3 CODE START----------------------------

next_btn_i.addEventListener(MouseEvent.CLICK, fx_forward10);
function fx_forward10(event:MouseEvent):void
{
            aud01.seekToNavCuePoint("nav20");
            aud01.play();
}

//AS3 CODE STOP-----------------------------
0
 

Accepted Solution

by:
tlengnick earned 0 total points
ID: 37828162
Here's the code I came up with that is the closest to what I wanted:


//================================================
//SKIP FORWARD 10 SECONDS OF AUDIO EACH TIME IT'S PRESSED

var seekto:Number;
next_btn_i.addEventListener(MouseEvent.MOUSE_UP, fx_forward10);
function fx_forward10(event:MouseEvent):void
{
      trace(aud01.playheadTime);
      seekto = aud01.playheadTime + 10;
      aud01.playheadTime = seekto;
}


//================================================
//SKIP BACK 10 SECONDS OF AUDIO EACH TIME IT'S PRESSED
previous_btn_i.addEventListener(MouseEvent.MOUSE_UP, fx_back10);
function fx_back10(event:MouseEvent):void
{
      trace(aud01.playheadTime);
      seekto = aud01.playheadTime - 10;
      aud01.playheadTime = seekto;
}
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37828786
Glad to hear that you have sorted out the problem.
I remember reading your other topic that seemed like the same issue, and I thought that blue-genie helped you to solve the problem. So I thought that your problem was resolved.

CyanBlue
0
 

Author Comment

by:tlengnick
ID: 37828804
Oh, I see... no problem. You are correct, I kind of "doubled-up" on the question because I was becoming so desperate. Thanks for clarifying.
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37828843
No problem. It is not encouraged to create multiple topics with the same question, but I understand why you did that. It might be nice to let people in other topic know that there are more information so that they can decide whetger to collaborate in one topic or drop out.

Thanks.

CyanBlue
0
 

Author Comment

by:tlengnick
ID: 37828853
I see.. you mean I had additional information in that other post that was not here, so it would have been helpful to reference it.

That makes sense.

Does it count against you as an expert if you contribute to a topic but do not get awarded points for it? Just curious.
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37828932
I guess it boils down to how much this topic can be helpful to others who might be stuck into the same problem. If somebody found this topic but not other which has real information, you know what I mean. :)

Don't worry about the points.

CyanBlue
0
 

Author Comment

by:tlengnick
ID: 37828948
Got it - good point!
0
 

Author Closing Comment

by:tlengnick
ID: 37847979
No additional suggestions were given... through internet searches, I came up with the answer.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

738 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