VideoPlayer and adding Cue Points
I'm having a tough time getting cue points to work with the new sparks VideoPlayer. In the documentation, it states that VideoDisplay has been replaced with VideoPlayer, but most of the examples on the web are for VideoDisplay.
I'm calling the usual 2 classes from the mx namespace.
import mx.events.CuePointEvent;
import mx.controls.videoClasses.CuePointManager;
then trying to dynamically add cue points like this:
I then create an instance of the CuePointManager, with myVid [type sparks VideoPlayer]
cuePointManager = new CuePointManager(myVid);
then create a new cuePt Objectwith name and time properties and try to add it as a cue point:
myVid.myCuePointManager.addCuePoint(cuePt);
where
- myVid is the VideoPlayer instance
- myCuePointManager is an instance of CuePointManage
- cuePt is an Object with name and time
I get errors about cooercing myVid [type sparks VideoPlayer]
1067: Implicit coercion of a value of type spark.components:VideoPlayer to an unrelated type mx.controls.videoClasses:VideoPlayer
1119: Access of possibly undefined property cuePointManager through a reference with static type spark.components:VideoPlayer
Can someone please be very kind and give me a nudge in the right direction. I've been pulling my hair on it for a day now, and couldn't find any tutorials specifically on the new sparks VideoPlayer and how to add dynamic cue points to it.
Thanks,
David
P.S. Video is big on the web. I would say that sorting out the VideoPlayer should be one of the top priorities in the new version of the SDK.
The short answer (and the official one) is that our new Spark VideoPlayer doens't support cuePoints.
The longer answer is that as OSMF (Open Source Media Framework, which is what the Spark VideoDisplay/VideoPlayer components ship with) adds cue point support, you might be able to take a newer build of OSMF and start using cue points. Here's some info on OSMF and cuePoints: http://blogs.adobe.com/osmf/2009/11/cue_point_support_in_osmf.html . You could try taking one of their recent builds and playing around with it. In order to bring those classes in to Flex, I'd probably reccomend monkey-patching on top of spark.components.VideoDisplay and changing a few things as some of the underlying OSMF APIs that Flex is dependent on have probably changed. Then, you'd have to look at how to expose cuePoints from the spark VideoDisplay component.
-Ryan
Similar Messages
-
Premiere, Media Encoder and Flash Cue Points - bug?
I've been encoding a number of FLV On2 VP6 videos recently and using the new Media Encoder. For this project we need flash cue points (nav and event). I've discovered some weird things in Media Encoder - it's been duplicating cue points (or maybe the export from Premiere is buggy with cue points?).
I've seen the first couple of cue points getting duplicated with the first letter of the name capitalised and moved a frame on in time - very weird.
Anyone else seen this behaviour?
Paul.OK, I think I've found out why - not a bug - user misunderstanding!!! (although tricky to find!)
Some of my source footage was created in After Effects. It turns out that there were a couple of cue points in the AE comp that had similar names to the cue points in Premiere - the AE comp was saved out to an AVI (with metadata enabled I think).
Premiere wasn't seeing this metadata and the cue points, but Media Encoder was (and it couldn't be deleted in ME - just kept coming back).
So - moral of the story - be careful with metadata!!!
I guess that Premiere should really show this embedded data though?
Paul. -
Final Cut Pro to Flash -- Inserting and Using Cue Points
I want to export a flash video using File - Export - Using Quick Time Conversion and selecting Flash. Under options for Flash, I see something about "Cue Points".
My assumption is that these would be points that you can insert that are similar to chapter markers and that you could have the Flash player on a web page jump back and forth between them.
Does anyone know of any documentation on inserting these points in Final Cut export? I couldn't figure it out. It looks like you give them a name and a timecode. I could not enter the timecode.
How about over on the player side? I assume some sort ActionScript in Flash is required. Has anyone seen a simple example/tutorial of these capabilities?Apart from disabling time machine, iCal and any other programs or applications from taking focus. Time machine and software updates can certainly be told not to try as far as I recall.
-
Hi,
I am streaming and flv file with numerous event cue points.
When each cue point is reached I attach different movie clips. The
problem is I need to add custom fast forward and rewind buttons to
the video. I tried using netStream.seek(netStream.time +5) which
works, but it skips over the event cue points. So when you stop
fast forwarding the wrong movie clip is attached.
Is there another way to fast forward the video and still have
the event cue points recognized?
Thanks,
Carolineif (index="introductionText")
I think you need double =, like this:
if (index=="introductionText")
-rich -
Urgent-loading sound and setting cue point
I'm trying to load an mps into a mediaDisplay component as i
need to set cue points on the MP3, when i play the file there is a
blip and the beginning:
_root.createClassObject(MediaDisplay, "mdAudio",
_global.intMovieDepth);
_root.["mdAudio"].autoPlay = true;
_root["mdAudio" + _global.intMovieDepth].setMedia(strMedia,
"MP3");
any ideas what i'm doing wrong?anyone?
-
Adding cue points to NetStream
Hello I have been working on a project and have loaded videos using netstream. I have several cue points that advance the timeline to a certain keyframe. Would anyone have the script for NetStream that would do this, for example, when the video reaches cue1 it would advance the timeline to frame 10?
Thank you so much for your help.
mark.Since no one has yet posted on this, I'll re-post part of a response to another post which deals specifically with using cue points with a NetStream video player:
OK, here is a working NetStream cue point:
var ns:NetStream = new NetStream(nc);
video_screen.attachVideo(ns);
/* Name of your video, with correct path, goes here */
ns.play("my_video.flv");
ns.onCuePoint = function(evt:Object){
trace(evt.name);
trace(evt.time);
if(evt.name == "jump_100") {
trace("YO !Jump to 100!");
gotoAndStop(100);
Reading this code:
set a new variable "ns" which is a new NetStream
attach a video to "video_screen"... the instance name of the video on the stage
now use that variable "ns" to play a video with file name "my_video.flv"
use ns to listen for an "event" type cue point Object
when the cue point is detected trace the event name and time
if the event name is exactly equal to "jump_100"
then trace "YO !Jump to 100!"
and then gotoAndStop at frame 100
For this exact code to work, your NetStream variable must be named "ns"
In the video you play, there must be a cue point of the "Event" type with the name "jump_100"
There must be at least 100 frames in the timeline.
Take it in small steps;
First make sure you can play the video using NetStream ... that's all.
Next, add the trace to detect the cue point... if you can't detect it, of course it won't do anything.
Only after you can successfully play the video and detect the cue point, should you attempt the cue point action (jump to frame 100).
You can also add more "if" statements if there are multiple cue points.
If cue point 1, then do this.
If cue point 2, then do this.... etc.
Best wishes,
Adninjastrator -
In what formats After Effects can export cue points recognized by director?
Thanks.Richard,
Thanks for your reply. I know I need a listener to activate
something when a cue point in my FLV is reached, it's just that
I've never written the code for a listener before!
If I can explain further what I intend to do...
I will have an FLV called "advert01.flv" with a cue point at
the very beginning called "start" being played in a FLVPlayback
component with the instance name "ad_playback" . When the cue point
"start" is reached (straight away) I want a dynamic text field with
the var name "ad_description" to display some descriptive text.
Would my code go along the lines of...
ad_playback.onCuePointListener = function(){
if cuePoint = "start"{
ad_description="The advert is playing and is funny";
...or am I a million miles from getting it right?
Thanks for your help. -
Read and use cue point in mp3 file
Hallo,
it's possible to handle cue point in mp3 file with as3.
If yes, any hint?
Thank you.Thank you Ned,
I've seen several exemple, the best I've found at: http://www.adobe.com/devnet/actionscript/articles/cue_points_audio.html
return this error:
Scene 1, layer 'scripts', Frame 1, Line 33 1046: Type was not found or was not a compile-time constant: CuePointEvent.
Thanks again. -
Flash and SoundBooth Cue Points
I'm creating a swf with the lyrics to a native song. I used
Soundbooth to edit the song and add markers, now I want Flash to
take those markers to play a certain frame until the next marker is
reached. What type of parameters (ie examples) are used in SB for
the markers to be used in Flash.pisare az diar ghorbat
-
FLV Cue Points from Soundbooth
I am having a strange issue. I have several audio files that I have opened in Sounbooth and added cue points. I saved the files as FLVs. Upon importing into Flash CS4 with the FLVPlayback component, my cue points are not loading. The component inspector shows "cuePoints: None". In a test I did before the New Year, the cue points loaded fine. I have no idea what I did differently this time. Any ideas? I know I can add the cue points in the FLVPlayback component, but I'd rather be able to do it in Soundbooth.
Thank you!This is an annoying work around, but here's how I got the cue points from Soundbooth to be recognized in Flash:
Opened the original MP3 in Soundbooth
Added my markers/cue points
Saved As ".AVI"
Saved again as ".F4V" (not FLV)
Imported the F4V into the FLVPlayback component
NOTE: If you add a new cue point to the FLV and try to resave as the same file name, the latest cue point will not import into Flash. I had to do yet another save as and pick a new file name.
Going to try to eliminate the AVI step, but note hopeful.
Hope this helps others. -
I have a flv which im loading in from another location (ie
its not embeded), and Im trying to create a loop point using cue
points.
I have 3 cue points: begining, loop_point, end
Basically when the playhead reaches the "end" cuepoint, I
want it to jump back to "loop_point"
Can anyone help? I have a deadline for monday to get this
finished!Pewee2000,
> Oh sorry I get what you mean now. Yeh I imported without
> player and used seperate componants from the flv custom
> playback UI panel to control the movie.
Okay, I'm not exactly clear on what you just said, so I'm
going to
proceed as if you're using the FLVPlayback Component. Here's
the scoop on
using ActionScript. Just about everything is an object.
Objects are simply
"things" that behave a certain way. Movie clips are objects,
buttons are
objects ... FLVPlayback Component instances are objects --
you get the idea.
:) Objects are defined by something called classes. Think of
a class as a
given object's blueprint. You'll genearally see up to three
categories in a
class: properties, methods, and events. Properties are
characteristics an
object has, such as a movie clip's width and height. Methods
are things an
object can do, such as movie clip's ability to gotoAndPlay()
some frame.
Events are things an object can react to, such as a mouse
click.
In your case, the FLVPlayback events include a cuePoint
event. You can
see detailed information -- often including sample code --
for all the
properties, methods, and events of the FLVPlayback class by
looking up the
phrase "FLVPlayback class" in the Components Language
Reference right in the
built-in Help documentation. Component classes are listed in
this
reference, and normal classes are listed in the ActionScript
2.0 Language
Reference. In the AS Language Reference, the three categories
are combined
in each class entry, but for some reason the Components
Language Reference
separates them. But you'll see 'em when you look up the
class.
You'll want to take things slow and start with a *simple*
example.
Assuming you've added cue points through the Component
Inspector panel, your
FLV will honor those cue points during playback. Start your
journey by
looking up the cuePoint event in the "Event summary" section
for the
FLVPlayback class.
You'll see this:
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// insert event-handling code here
my_FLVplybk.addEventListener("cuePoint", listenerObject);
... which may look scary if you're not a coder, but it works
like this:
first, a variable named listenerObject is delcared as a
generic Object
isntance. This object is your "ambassador" for the
FLVPlayback instance,
which features the cuePoint event. You assign a function to a
new cuePoint
property of your generic object. This function will be
executed when any
cue point occurs. Finally, you use the addEventListener()
method to
"subscribe" your FLVPlayback instance to the generic object,
listenerObject.
Now you're "listening" for cue points.
In the above example, the instance name for your FLVPlayback
instance
must be my_FLVplybk -- but you can make it whatever you like,
as long as the
ActionScript matches the instance name.
Where it says "// insert event-handling code here," you may
want to use
a trace function ...
trace("Here's a cue point!");
... just to prove to yourself that it works. Read up in the
documentation,
and you'll see that the eventObject object received by the
function contains
valuable information about the FLVPlayback instance that
dispatches the
cuePoint event. You can trace eventObject.target, for
example, and get a
reference back to your FLVPlayback instance.
trace(eventObject.target);
That reference would let you refer to the FLVPlayback
instance and
invoke FLVPlayback methods on it, such as your various seek
options for
looping.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Tried adding cue points via as3 code but haven't been able to find anyway to accomplish this task. Read allot places that when you load a video via netStream you can't add cue points with actionscript. The only way is to embed the cue points is into the video. But this is not an obtain for me since someone else does the videos and they may change or be modified at some time. I can add actionscript cuePoints with the FLVPlayback component but I am looking for ways of increasing video performace.
By the way what is the difference\advantage of using netStream over using the FLVPlayback component? Often wander this but haven't read anything to say one is better then the other when running video over the web.
ThanksThanks kglad. Being able to customize is always better in my flash world. LOL
I'll have to stay with the FLVPlayback component as long as I have to use cue points in my videos.
Thanks -
Howdy all
I have 4 frames in a urlMC on each frame is a button. They
all work fine.
I have a FLV that plays and a cue point moves the urlMC to
the next frame to
reveal the new button. When used this way the buttons don't
work. Any
thoughts? Thanks.1. A cuePoint has to be attached to a certain point in time. Look up the docu: http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65586-7feb.html
2.In as3 the getURL method is not valid anymore, use navigateToURL() instead [google for examples how to use it] -
Video cue point navigation please help
OK I need major help here. I am trying to get a video to
stream and show pictures that are cued to the video playing. The
thing is I need to have a next and prev btn for the pictures and
the video to go to the next and previous cue points. The cue points
are inbedded in the FLV. Please helpbefore the function add the following line:
import fl.video.MetadataEvent; -
Using Cue Points to Navigate an FLV
I am wanting to make a Scene selection menu. I have loaded
and FLV and put cue points in at the desired times. I am having
trouble writing the actionscript so that by pressing a button the
movie will skip to a desired cue pointsorry wrong section
Maybe you are looking for
-
Legend map request with german umlaut
Hello, i have a problem sending a legend map request that contains a german umlaut. I'm trying to use the pl/sql function for sending and parsing a xml request from the mapviewer documentation (chapter 3.1.16, example 3-19). my request looks like thi
-
Can't remember keychain password - help!
I ran the latest software updates on my six month old MBPro, then got a message that I needed to enter my keychain password. After many attempts, and then finally telling the computer to restore the keychain to its original settings, I now can't acce
-
Using Data Integrator Migration Mechanisms and Migration Tools
Data Integrator provides two mechanisms for migrating jobs from development to test to production :<br /><ul><li>Export/import <ul><li>Export/import is the basic mechanism for migrating Data Integrator applications between phases. First, you <em>expo
-
IDOc error while trying to establish connection with R/3 system
Hi Experts, I am working with BI 7.0 system. When I try to create the R/3 system (using RSA1) connection, I am getting following error message. Diagnosis Incorrect IDoc type RSSEND in the ALE defintion of the source system. System Response Er
-
Help me please with Outlook Express address book recovery
I reloaded windows and after restarting I could not find the Outlook Express address book. I looked in my docs and settings/"name"/localsettings/applicationdata/identities. There are a bunch of .DBX files t, but the contacts file is only 59kb. I do