all groups > flash actionscript > july 2006 >
You're in the

flash actionscript

group:

How do I access embedded cue point parameter name and vaule in Flash 8?


How do I access embedded cue point parameter name and vaule in Flash 8? onostuff
7/20/2006 11:34:23 PM
flash actionscript:
I'm going a bit nuts trying to figure out how to access the cue point parameter
information I embedded when I encoded my falsh video.
Help has numerous examples showing how to see the name and type of cue point,
but I'm not seeing how I can list the parameter values when I get to the cue
point.

For example, the following allows me to get the cue point name, etc....

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
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", listenerObject);

I tried doing something like:

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
var mcfile = eventObject.info.parameters.salad;
trace("Playing "+mcfile);
_global.moviePlaying = mcfile;
//_root[mcfile].play();
};
my_flvPb.addEventListener("cuePoint", listenerObject);

...which works in giving me "salad" s value in the trace, but I had to
hard-wire in the parameter name "salad".
What I am trying to do is to have a text field display the cue point's
parameter value as the play head reaches each point.
Is there a way to get the name and value dynamicaly from the movie, and do
what I am tryting to do?

Thanks
Michael
Re: How do I access embedded cue point parameter name and vaule in Flash 8? Rothrock
7/20/2006 11:55:42 PM
Try replacing your variable assignment and trace statement with this:

for(a in eventObject.info.parameters){
trace(a +" is "+ eventObject.info.parameters[a])
}

Re: How do I access embedded cue point parameter name and vaule in Flash 8? onostuff
7/26/2006 8:26:56 PM
Thanks Rothrock,
That did the trick. Sorry about the delay in getting back to this - I've been sidetracked the last few days.

AddThis Social Bookmark Button