Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Can Cuepoint In FLV Trigger A Pop Up Window



Hi,I want the FLV, to open a pop-up window, when it reaches a cuepoint. I cannot get this to work. The pop up works if I put the code in a button. It also works for opening an Alert window. What am I doing wrong ?Attach Codeimport mx.containers.Window;import mx.managers.PopUpManager;var cue:Object = new Object();cue.time = 10; cue.name = "elapsed_cuetime";cue.type = "actionscript";attachMovie("FLVPlayback", "myvideo_flv", 32);myvideo_flv.skin = "SteelExternalAll.swf";myvideo_flv.contentPath= ("Music.flv");myvideo_flv.addASCuePoint(cue);var listenForCue:Object = new Object();listenForCue.cuePoint = function(eventObject) {var my_Textwin:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true,title:"Information on Soccer video", contentPath:"soccer.swf"});my_Textwin.setSize(270, 300); my_Textwin._x = 340; my_Textwin._y = 30;//for closing windowvar winListener2:Object = new Object();winListener2.click = function() { my_Textwin.deletePopUp();};my_Textwin.addEventListener("click", winListener2);}//end of listenforcue brackets myvideo_flv.addEventListener("cuePoint",listenForCue );



Adobe > ActionScript 1 and 2
Posted on: 11/20/2007 04:56:38 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Cuepoint Trigger
Hi there

I have encoded an FLV with 3 cuepoints and have used the New NetConnection method.

Now I need to have 3 seperate text movieclips triggered at certain cuepoints. (subtitles for the deaf)

The following code didn't work.

var vidList:Object = new Object();
vidList.cuePoint = function(cues) {
subtitle1.gotoAndPlay(2);

}
vid.addEventListener("cuePoint", vidList);


I am new to AS2 and would appreciate some help

Justin

FLV Cuepoint Question -- Go To CuePoint?
Hi, I am new to FLV, and am having difficulty working out a few things about playing the FLV (for player 8).

1) Is there a way to prevent the black box appearing at the start and end of my video clip? It looks nasty. ( I have a white page... even white would look OK, but black is bad).

2) To try to get around this, I have been trying to send my playhead to a point near the start once the video is all but over (before it goes black). However, I can't get it to go to the cue point... I can test for a cuepoint, but not sure how to navigate to it.... It just keeps going to the very start, including the black!

Answer to these above questions greatly appreciated!

Here's my code:

var my_flvPb:mx.video.FLVPlayback;
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
if (eventObject.info.name == "End") {
// go back to previous cuepoint from current time
my_flvPb.seekToPrevNavCuePoint(eventObject.info.ti me);
//my_flvPb.pause();
}

};
my_flvPb.addEventListener("cuePoint",listenerObjec t);

Thanks
Geoff

Trigger Event On Browser Window Close
Hi,

Does anyone know if it's possible to trigger an event or run a function from flash (.swf) which is somewhere on the web page at a time someone closes that window or leaves the page?

There's a JS onUnload, but it's harder to make JS call a function which is in flash and specially upon window exiting when there's nothing more to communicate with...

Tricky, I guess..

Marrio

Event Trigger On Browser Window/tab Close
I remember doing this easily in actionscript 2.0 in the past but i cannot remember what method was used.

if the browser window or tab is closed (is closing by user) holding the flash document the event is set off, and calls the function intended.

Could anyone update me on which method/event is capable of this within actionscript 3.0? I am using flash CS3 pro.

Event Trigger On Browser Window/tab Close
I remember doing this easily in actionscript 2.0 in the past but i cannot remember what method was used.

if the browser window or tab is closed (is closing by user) holding the flash document the event is set off, and calls the function intended.

Could anyone update me on which method/event is capable of this within actionscript 3.0? I am using flash CS3 pro.

Picture Gallery To Trigger Action In Non-flash Window
Hi people .
I am looking to make a picture gallery for a website . I want the thumbnails to be flash buttons , each who triggers a bigger picture to display on a different part of the page. The question is how do I code this since the big picture is not a part of the flash file ( only the buttons are ...)

thanks
S.

CuePoint Help...
Rather than try to explain the larger picture for what I'm trying to do, I think I could figure it out myself if I could just get flash to trace the name of the current cuepoint that is being played in my flv the moment it fires. Can anyone set me straight on how to do this. I'm using this right now:

var myCuePointListener = new Object();
myCuePointListener.cuePoint = function(eventObject){
trace("heard " + eventObject.type + ", " + eventObject.target);
trace(eventObject.name); //this is the line I added and it didn't work
}
vid.addEventListener("cuePoint", myCuePointListener);

I have been reading through all kinds of crap about CuePoints and it's a real mess for me. My eyes are starting to bug out over all the tutorials and input I've read. I would just like this thing to trace to the output window the names of the cuepoints as the video passes over them. If I could get that much I think I could get through the next steps (wishful thinking, I'm sure). So, someone, please straighten me out...
Please...

I Have A Cuepoint Set In My Flv...but How Do I Use It?
Basically, I am using the flv player component. I want to play an flv and when it is done, I want a new one to play.

How do i do this?

I've added a cue point at the end of the first flv....and set it to event.

But how do I use this cue point and tell it to do something once it is reached?

Please help.

Thanks.

CuePoint Help
I have a progresive flv with an instance name of myVid which is already on the stage and set to autoplay via the component parameters tab. When the video plays and gets to a cue point I want the flv to pause. The cue point names (embedded when I used Flash Video Encoder) are cp01, cp02, and cp03. The video doens't stop on the specified cue point and instead just keeps playing. Can anyone help me with my code? Is there a better way to do it? Here is what I have so far:









Attach Code

var listener:Object = new Object();

listener.cuePoint = function(eventObject:Object):Void
{
if (eventObject.info.name == "cp1")
{
myVid.gotoAndStop("cp1");
}

if (eventObject.info.name == "cp2")
{
myVid.gotoAndStop("cp2");
}

if (eventObject.info.name == "s3")
{
myVid.gotoAndStop("cp2");
}

vid.addEventListener("cuePoint", listener);

























Edited: 08/26/2008 at 11:33:44 AM by necie

I Have An Flv, And I Put A Cuepoint In At The End....now What.
Basically, I am using the flv player component. I want to play an flv and when it is done, I want a new one to play.

How do i do this?

I've added a cue point at the end of the first flv....and set it to event.

But how do I use this cue point and tell it to do something once it is reached?

Please help.

Thanks.

I Set A Cuepoint On My Flv...but Don't Know How To
Basically, I am using the flv player component. I want to play an flv and when it is done, I want a new one to play.

How do i do this?

I've added a cue point at the end of the first flv....and set it to event.

But how do I use this cue point and tell it to do something once it is reached?

Please help.

Thanks.

Flv CuePoint
Hi guys

I have just encoded an flv with cuepoints and a scrub bar that enables users to scroll through a streamed flv that work

My Question is
How can i get the scrubber to control the cue point that plays the correct frame in the MC.

my code so far


Code:


var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
my_video.attachVideo(ns);
ns.onCuePoint = cuePointHandler;
ns.setBufferTime(20);
ns.play("Comhairle 02 Untitled.flv");
//
function cuePointHandler(info:Object) {
if (info.parameters.title == "Comhairle mu Dheasbad") {
maintitledea.gotoAndPlay("labelA");
}
if (info.parameters.title == "Brìgh") {
maintitle.gotoAndPlay("labelB");
maintitledea.gotoAndPlay("close");
}
if (info.parameters.title == "Stoidhle") {
maintitle.gotoAndPlay("labelC");
}
if (info.parameters.title == "Èifeachdas") {
maintitle.gotoAndPlay("labelD");
}
if (info.parameters.title == "Seonaidh Ailig Mac a' Phearsain") {
maintitle.gotoAndPlay("labelE");
}
if (info.parameters.title == "Dòmhnall Màrtainn") {
maintitle.gotoAndPlay("labelF");
}
if (info.parameters.title == "Cleachd props a tha iomchaidh") {
maintitle.gotoAndPlay("labelG");
}
if (info.parameters.title == "Cleachd cairtean") {
maintitle.gotoAndPlay("labelH");
}
if (info.parameters.title == "Feumaidh sibh a bhith mothachail...") {
maintitle.gotoAndPlay("labelI");
}
if (info.parameters.title == "agus luath ann an smaoineachadh") {
maintitle.gotoAndPlay("labelJ");
}
if (info.parameters.title == "Feumaidh sibh ullachadh math a dhèanamh") {
maintitle.gotoAndPlay("labelK");
}
if (info.parameters.title == "Thoiribh taic dha chèile") {
maintitle.gotoAndPlay("labelL");
}
if (info.parameters.com == "Complete") {
nametitle.vtitle_txt.text = "";
maintitledea.gotoAndPlay("close");
}
}
//
nametitle.vtitle_txt.text = "";
//
playButton.onRelease = function() {
if (playButton._currentframe == 1) {
playButton.gotoAndStop(2);
replay.gotoAndPlay(2);
ns.pause();
} else {
playButton.gotoAndStop(1);
ns.pause();
}
};
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function (obj) {
duration = obj.duration;
};
function videoStatus() {
amountLoaded = ns.bytesLoaded/ns.bytesTotal;
loader.loadbar._width = amountLoaded*300;
loader.scrub._x = ns.time/duration*300;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(false, 3, this._y, 293, this._y);
};
loader.scrub.onRelease = loader.scrub.onReleaseOutside=function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 100);
this.stopDrag();
};
function scrubit() {
ns.seek(Math.floor((loader.scrub._x/286)*duration));
}

MX: Trigger An MC, Then Wait, Then Trigger Another?
Hello to you all

Once again, I kind of managed to already summarize the problem in the headline... and once again, I will probably write way too much about the details in the message

I have an application done in flash- on the main Scene Level, everything has only one frame but I have MCs and the like that are triggered by actionscript.

There are quite a few nested functions on the main actions layer as well as an "onEnterFrame" function that reloads XML data in the background, etc... but that is not the problem.

The problem is, that at one point, I am calling a few MCs that kind of close up a section of the page like blinds- and then I want a text to appear ontop of that now closed area... but if I just write...
Code:
_root.TimelineFader.BlendeT1.gotoAndPlay(2);
_root.TimelineFader.BlendeT2.gotoAndPlay(2);
_root.TextAboveTimeline.theMessage_txt._visible = true;
...it all happens simultaneously, of course.

I guess I could check for "BlendeT1"'s (or T2's) current frame (since it's an MC)... but how do I wait while that MC runs / until it reached a certain frame? How can I keep the rest of the actionscript in the main function from continuing? Is there a way? I'm lost.

Any and all help is appreciated. Thanks in advance!
~Marcel

Listen For Cuepoint
Hello all,

Can anyone tell me if it's possible to listen for a cuepoint to be reached in the media component

tnx

Cuepoint Navigation
hi

i've a slide presentation containing a flv file with navigation and event cuepoints embedded. the flv can be manipulated by a rewind, fastforward skip button and a seek bar.

all works fine except the seek bar when dragging around. it's jumps to the desired time and also starts playing with the slide synchronously but it always
repeats a few times before playing.

CAN ANYONE HELP ME WITH THIS ASAP PLEASE??!!! many thanks




Code:

function synchVideoToInteracee( cueN:String ):Void
{

display_mc.seekSeconds(cueN);

}



function synchVideoToInterace( cueName:String ):Void
{
// If the video is currently stopped, then play it
function videoPlay(){
if(!display_mc.playing ){
currentSlide.stop();
}
else {
currentSlide.play();
}

}
var timer = setInterval(videoPlay, 0001);


// Show associated content on screens or labeled frames
if( uses_screens ){
currentSlide.gotoSlide(this[ cueName ]);
}else{
gotoAndStop( cueName );
}

}


var videoEventHandler:Object = new Object();
videoEventHandler.cuePoint = function( evt:Object ):Void
{
// Get the cue name from the event object
synchVideoToInterace( evt.info.name );
}
videoEventHandler.fastForward =
videoEventHandler.rewind = function( evt:Object ):Void
{
// Get the cue name of the nearest cue point
var nearestCue = evt.target.findNearestCuePoint(evt.playheadTime);
synchVideoToInteracee( nearestCue.time);
currentSlide.gotoAndPlay(1);
display_mc.seekSeconds(nearestCue.time);

}
display_mc.addEventListener("cuePoint",videoEventHandler);
display_mc.addEventListener("fastForward",videoEventHandler);
display_mc.addEventListener("rewind",videoEventHandler);

NetStream Cuepoint
Hello everybody,

i use NetStream do load my flv. I would like to add cuepoint in AS. I don't found no information to add cuepoint with netStream

Thanks

Stopping FLV On A Cuepoint
I have embedded a cuepoint in my FLV video. I simply want to stop the video on this cue point until a user clicks a button at which time the video will begin playing again.

anyone....how hard could this be

CuePoint Help Needed
Hi

what is an alternative for addCuePoint() in AS3?

GotoAndPlay A CuePoint?
How would I go about scripting a button to play a certain cue point within a video?

Problem With CuePoint
Hello!
have a really strange problem..

i´m going to make an ad, where there is 4 swf files attatched together but in different Iframe.

Every swf have to talk to each other with lc.connect to stay in sync, and inside the swf, there will be a FLV video, playing diffrent CuePoints to stay in sync....

To my problem...

One of the ads are "inbetween" two ads and are 180x25px.
If i try to convert my .mov to .flv with After effects FLV encorder... the file wouldn´t convert???

180x35 px, works but not 180x25.. ?

/Pettersson

FLV Cuepoint Question
Given the potential utility of cupoints in general the supplied documentation seems umm....lite.

To import cuepoint information from an XML file structured as:

<listitem title="Introduction" name="unit1_320_20.flv" start="0" len="-1" thumb="chap1.jpg">
<qPoint qName="q1_1" qTime=":44" qText="Caption to show first."/>
<qPoint qName="q1_2" qTime="1:15" qText="This text shows up at 1:15 et."/>
<qPoint qName="q1_3" qTime="1:45" qText="This played last"/>
</listtime>

Cuepoints can be created by:
var xmlPlaylist = new XML(); //setup a variable to hold the XML
xmlPlaylist.ignoreWhite = true;
xmlPlaylist.load( "playlist.xml" ); //load the XML file

xmlPlaylist.onLoad = function( status ) {
//trace("loading xml");
if ( !status )
trace( status );
var entries = this.childNodes[0];
for ( var i = 0; i < entries.childNodes.length; i++ ) {
var entry = entries.childNodes[i];

for ( var q = 0; q < entry.childNodes.length; q++ ) {

//trace ("entry.childNodes[q] = " + entry.childNodes[q].attributes.qName);
MakeCue( entry.childNodes[q].attributes.qTime, entry.childNodes[q].attributes.qName, entry.childNodes[q].attributes.qText);
}
var entry = entries.childNodes[i];

} //end xmlPlaylist.onload

function MakeCue(myTime:Number, myName:String, myParam:Object){
if (myTime <> undefined) {

//trace("myTime = " + myTime + "myName" + myName + "myParam = " + myParam);
my_FLVPlybk.addASCuePoint(1, myName, myParam);
}
}

Except that documentation does not provide an example usage of the parameter nor an example of converting conventional time notation (hh:mm:ss:ms) into Number. Imagine the ass we could kick if it did!


I'd very much appreciate any direction in these documentary holes by anyone able to address.

thx,
--steve...

FLV Cuepoint Listener
Hello,

I am running into a very annoying problem and can't seem to find a fix or help about this on the user forums.

I have an FLV video which is about 20 minutes long, compressed at 15fps with1 Keyframe every 15frames. The Flash project with the video is being delivered on a CD-Rom.

I am attaching about 15 cuepoints to the VideoDisplay component dynamically and using the cuePoint listener to figure out when the cue point was passed.

All this works very well, BUT, when I try to jump between cuePoints, for example from cuePoint 2 to cuePoint 12 in the video, there is a significant lag before it actually jumps. This is somewhat acceptable, however the main problem is that the mediaDisplay sends out cuePoint passed messages via the listener for all the cuePoints between 2 and 12...

This also happens when I stop the movie midway, it sends out all the cuePoint messages that were in the movie from the point the video was stopped. It passes these cuePoints messages really rapidly.

This really really messes up the code where I am trying to load different movieClips based on the cuePoint passed message.

Help.

Thanks
Ashwan.

FLV Cuepoint Loads Another SWF
I am not sure if this is possible...

Intro:

I have a SWF that is divided into 4 parts (imagine a square divided into four equal square parts) Only one 1/4 is visible onscreen at any given time and the user slides to each quarter using the navigational buttons.

Problem:

I have an flv that plays within the first quarter. Am I able to set a cue point or event that allows a user to click on the stage at the given point and inturn, the current swf will move to the appropriate section (in the same way the user can move by pressing the navigational buttons)

Thank you.

FLV Cuepoint Listener
Hello,

I am running into a very annoying problem and can't seem to find a fix or help about this on the user forums.

I have an FLV video which is about 20 minutes long, compressed at 15fps with1 Keyframe every 15frames. The Flash project with the video is being delivered on a CD-Rom.

I am attaching about 15 cuepoints to the VideoDisplay component dynamically and using the cuePoint listener to figure out when the cue point was passed.

All this works very well, BUT, when I try to jump between cuePoints, for example from cuePoint 2 to cuePoint 12 in the video, there is a significant lag before it actually jumps. This is somewhat acceptable, however the main problem is that the mediaDisplay sends out cuePoint passed messages via the listener for all the cuePoints between 2 and 12...

This also happens when I stop the movie midway, it sends out all the cuePoint messages that were in the movie from the point the video was stopped. It passes these cuePoints messages really rapidly.

This really really messes up the code where I am trying to load different movieClips based on the cuePoint passed message.

Help.

Thanks
Ashwan.

Activate Through CuePoint
Hi,

Im after a way to activate a small panel once my FLV has finished playing. The panel will have a replay button inside - I'm trying to run it with a cuePoint in the script but it doeen't seem to work.

Here's the code I am currently using - note* I'm not a hard AS coder so if there's any mistakes fell free to comment :


Code:
stop();
this.vTitle.text = "Change WaterTrail - Cook and Cold";

//Position the main FLVplayback and buffering bar dynamically on screen
my_FLVPlybk._x = 11.3;
my_FLVPlybk._y = 10.9;
/*my_buffrgbar._x = 138.0;
my_buffrgbar._y = 110.0;*/

//run through the UI components for the video
my_FLVPlybk.playPauseButton = my_playpausebtn;
my_FLVPlybk.stopButton = my_stopbtn;
my_FLVPlybk.muteButton = my_mutebtn;
my_FLVPlybk.volumeBar = my_volbar;
my_FLVPlybk.seekBar = my_seekbar;
my_FLVPlybk.bufferingBar = my_buffrgbar;
my_FLVPlybk.bufferTime = 7;/*This controls the amount of buffering time in seconds before the video runs*/
my_FLVPlybk.contentPath = "trainingvideo/ColdWaterTrail.flv";/*ref the FLV*/
my_FLVPlybk.autoRewind = false;/*sets auto rewind to false*/
my_FLVPlybk.autoPlay = true;/*plays the FLV onload*/

//Adds a trace on the total play time in seconds on FLV in the output window
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
trace("Total play time for this video is: "+my_FLVPlybk.totalTime);
};
my_FLVPlybk.addEventListener("ready",listenerObject);

//Call the buffering function on the FLV Playback
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
if (eventObject.state == FLVPlayback.BUFFERING) {
trace(FLVPlayback.BUFFERING);
}
};
my_FLVPlybk.addEventListener("stateChange",listenerObject);

//Add a Listener for the cuePoint
var ourListener:Object = new Object();
ourListener.cuePoint = function(eventObject:Object):Void {
var cuePointName = eventObject.info.name;
switch (cuePointName) {
case "cue1" :
this.infoP.gotoAndStop(2);
break;
}
};

// add our cue points
my_FLVPlybk.addASCuePoint(64.8000030517578,"cue1");
my_FLVPlybk.addEventListener("cuePoint",ourListener);

GotoAndPlay A CuePoint?
How would I structure a button to gotoAndPlay a cuePoint within a flv?

here is what Im doing (from as3 video tutorial)

Code:

var video:Video = new Video(400, 400);
video.x = -180;
video.y = 160;
addChild(video);

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);

function onStatusEvent(stat:Object):void
{
   trace(stat.info.code);
}

var meta:Object = new Object();
meta.onMetaData = function(meta:Object)
{
   trace(meta.duration);
}

ns.client = meta;

video.attachNetStream(ns);
//ns.play("VIDS/Additup_waitENG2.flv");

ns.play("VIDS/Additup_into1.flv");

Any help would be great.

Im not sure how to get to a cue o

FLV Cuepoint Question
I have an FLV Playback component that I am dynamically adding ASCuepoints to via an XML file. There are a total of 14 cuepoints over the span of about 2 minutes for this particular video.

However, once there is a cuepoint that exceeds 100 seconds, it causes none of the cuepoints to be added to the flvplayer.

Here is the xml loading code
Code:

function onLoaded(e:Event):void {
   xml = new XML(e.target.data);//Loads all values from the XML file
   xml.ignoreWhitespace = true;
   var cuePointList:XMLList = xml.vId.cuepoint;//loads all of the vId nodes into a list (similar to an array)
   
   for (var i:int = 0; i < cuePointList.length(); i++) {//loops through each cuepoint node for the chosen video
      flv_vid.addASCuePoint(cuePointList[i].startValue, "videoCue" + i);//attaches the cuepoints to the video itself

   }
   flv_vid.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
   flv_vid.addEventListener(VideoEvent.COMPLETE, redirectVid);
   var redirectVal:String = cuePointList..redirect.@id;


   function cp_listener(eventObject:MetadataEvent):void {

      var textValue:String = cuePointList[textIdentifier].textvalue;
      var swfValue:String = cuePointList[textIdentifier].graphicvalue;
      var swfLoaded:Boolean = false;

      if (support_mc.numChildren > 1) {
         support_mc.removeChild(support_mc.getChildAt(1));
      }

      TransitionManager.start(support_mc, {type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeIn});

      support_mc.vidText_txt.htmlText = textValue;

      if (cuePointList[textIdentifier].textvalue == "") {
         var swfLoader:Loader = new Loader();
         var swfrequest:URLRequest = new URLRequest(swfValue);
         swfLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);

         function finished_loading(e:Event) {
            support_mc.addChild(swfLoader);// add the swf directly to the stage
            swfLoader.name = "support_swf_" + vidValue;
            swfLoaded = true;
         }
         swfLoader.load(swfrequest);
      }
      textIdentifier+=1;

   }

Here is the XML code...very basic:
Code:

<videos>
   <vId>   
      <cuepoint>   
         <textvalue>convo swf</textvalue>
         <startValue>01</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>Patients Doctors and family members are getting answers</textvalue>
         <startValue>21</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>

      <cuepoint>   
         <textvalue>Real answers from Real people</textvalue>
         <startValue>40</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>clinical trials site</textvalue>
         <startValue>47</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>Fred Goodwin Headshot</textvalue>
         <startValue>58</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>healthcare collateral</textvalue>
         <startValue>72</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>Where do I park</textvalue>
         <startValue>83</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>What competitors do customers mention</textvalue>
         <startValue>98</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>Why arent they buying your product</textvalue>
         <startValue>105</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>conversation log</textvalue>
         <startValue>110</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>Who are Medresponds customers</textvalue>
         <startValue>125</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>What can you do for me</textvalue>
         <startValue>133</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue>Ask us anything anytime</textvalue>
         <startValue>140</startValue>
         <graphicvalue>0</graphicvalue>
      </cuepoint>
      
      <cuepoint>   
         <textvalue />
         <startValue>500</startValue>
         <graphicvalue>0</graphicvalue>
         <redirect id="" />
      </cuepoint>      
   </vId>   
</videos>

Any help would be appreciated.

Listener And CuePoint For FLVPlayback
Hi to everybody...

I've try to make a simple Flash animated menù.


I have a FLVPlayback component where I put inside a external FLV.
TO this FLV I've mark 3 step by cuepoint. To every cuepoint I wish load an external .swf file (menù) into a empy MovieClip.
Well the movie start...The listener find the first CP1 (cuepoint1) and the animation stopped (PAUSE), a menu1.swf is loaded into a empty movieclip.

Now When I press a bottun on my menù, I WISH that the FLV go forward until the CP2 where I need to load a menu2.swf into emptyMovieclip, and afther again I want go to CP3...in loop...


//import mx.video.*;
var my_flvPb:mx.video.FLVPlayback;
my_flvPb.contentPath = "fis10.flv";


//make the CuerPoint step
my_flvPb.addASCuePoint(1, "cp1");
my_flvPb.addASCuePoint(2, "cp2");
my_flvPb.addASCuePoint(3, "cp3");


this.createEmptyMovieClip("qui", 9);

//test cuepoint
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject) {
if (rtn_cuePt = my_flvPb.findCuePoint("cp1" , FLVPlayback.EVENT)) {
qui.loadMovie("menu.swf");
trace("the cuepoint is: " + rtn_cuePt.name);
trace(qui);
my_flvPb.pause();
}
if (rtn_cuePt = my_flvPb.findCuePoint("cp2" , FLVPlayback.EVENT)) {
qui.loadMovie("menu2.swf");
trace("Il cue point è: " + rtn_cuePt.name);
trace(qui);
my_flvPb.pause();
}
};

my_flvPb.addEventListener("cuePoint", listenerObject);


this code don't work good...may be I've bad used the if in listener.

I can't explain good my problem and You can find my project here:


http://www.walterfantauzzi.com/forum/flv_menu.zip

[CS3] Microphone Activity On FLV CuePoint
Hi Guys,

I'm trying to make a karaoke app using Microphone.get(); and FLVPlayback.. got most of it working but I want to make items move on the screen using object._x=value; at certain cuepoints in the FLVPlayback.

This is the code I've got but it's not working! Any pointers?


Code:
System.showSettings(2);
myMic = Microphone.get();
_root.attachAudio(myMic);

// DEBUG OPTIONS
my_FLVplybk.volume=0;

//VIDEO CUEPOINTS
import mx.video.*;
my_FLVplybk.contentPath = "http://dnl.interoute.com/{a5719c13-f5ff-4522-af41-a4991dabe120}/{4d806e35-8049-4b8c-9d5b-432033055f0e}/1.flv";
// create cue point object
var cuePt:Object = new Object ();
cuePt.time = 10;
cuePt.name = "point1";
cuePt.type = "actionscript";
//add AS cue point
my_FLVplybk.addASCuePoint (cuePt);
// add 2nd AS cue point using time and name parameters
my_FLVplybk.addASCuePoint (20, "point2");
var listenerObject:Object = new Object ();
listenerObject.cuePoint = function (eventObject:Object):Void {
my_ta.text = "THIS IS CUEPOINT 1";
my_ta.visible = true;
if (eventObject.info.name == "point2") {
my_ta.text = "CUEPOINT 2. RED BOX SHOULD APPEAR IF MIC IS GETTING SOUND";
if (microphone_name.activityLevel>25) {
object._x=100;
}
}
}
trace (eventObject.info.name);
};
my_FLVplybk.addEventListener ("cuePoint", listenerObject);

AS3 + FLV Cuepoint + HtmlText Questions
Hello and thanks for looking at my question.

Basically I have a flash as3 application authored in Flash CS3 that plays FLV files that have injected cue points in them. The cue point engine then listens for the firing of cue point and displays the text that I tied to the cue point event. It all works marvelously, but now the client wants me to style some of the text in the bullets differently (within the same textField)

My thought was to simply take the textField that is in my class and enable it as htmlText and then have the selected text wrapped in <b><u> tags.

I can trace out the string being passed in and see the markup around the text, but the application displays nothing in the textField.

This is a portion of the initial catching of the cuePoint

Code:
private function narration(e:MetadataEvent) {

if (e.info.name == "bullet") {
//trace("Cue Point "+e.info.parameters.script);
showBullet(e.info.parameters.script,e.info.parameters.style);
}
and here is the code where I animate the bullet. If you look at the commented out code where I hard coded in an html string - it will not render out properly either.


Code:
private function showBullet(o:String,s:String) {

trace("bullet length "+ o.length);

trace("bullet text" + o);
var bul = new bullet();
var spacing:Number = 8;
bul.name = "bul"+bulletCount;

bul.bulletTxt.width = 345;

if (bul.name!=="bul0") {
trace("colorBullet");
TweenFilterLite.to(getChildByName("bul"+(bulletCount-1)), 1, {colorMatrixFilter:{colorize:0x666666, amount:1}});
}

if (bulletCount>=1) {
trace("Bullet Pass "+bulletCount);
var prevBul = getChildByName("bul"+(bulletCount-1));
bul.y= (prevBul.y+prevBul.height)+spacing;
} else {
bul.y=110;
}
bulletCount++;

trace ("bulletName "+bul.name)


var activeBullet:MovieClip = bul;

//bul.bulletTxt.htmlText ="<u>hello</u> How are you today?";
bul.bulletTxt.htmlText =o;
bul.bulletTxt.autoSize ="left";

var lines = bul.bulletTxt.numLines;
trace("lines :"+lines);


bul.x = -500;
addChild(activeBullet);

switch (s) {
case "bullet" :
trace("bullet is a bullet");
bul.bulletTxt.setTextFormat(bulletFormat);
bul.dotMC.alpha=1;
break;
case "heading" :
bul.bulletTxt.setTextFormat(sectionFormat);
bul.dotMC.alpha=0;
trace("bullet is a section");
break;
case "section" :
bul.bulletTxt.setTextFormat(titleFormat);
bul.dotMC.alpha=0;
trace("bullet is a title");
break;
default :
}
Tweener.addTween(activeBullet, {x:35, time:.75});

}
Thanks, I hope someone can help.

Attaching External SWF On CuePoint
This problem is giving me a headache. How can I attach an external SWF on cuePoint? My AS knowledge is very basic but here is the code for my videoPlayer.


Code:

stop();
//Establishes a connection to the internet and pulls the info from the server where
//the FLV is stored.
var nc:NetConnection = new NetConnection();
nc.connect (null);

var videoPlayer:NetStream = new NetStream(nc);
//vidHolder.attachVideo(videoPlayer);
//videoPlayer.play("http://images.legacynetwork.com/flv/tutorial.flv");

var duration:Number;

videoPlayer["onMetaData"] = function(obj){
duration = obj.duration;
}
//Code for the control buttons with animated states.
playButt.onRollOver = over;
playButt.onRollOut = out;
muteButt.onRollOver = over;
muteButt.onRollOut = out;
pauseButt.onRollOver = over;
pauseButt.onRollOut = out;
backButt.onRollOver = over;
backButt.onRollOut = out;
//Functions for the controls and what they do.
function over() {
this.gotoAndPlay (2);
}

function out() {
this.gotoAndPlay (11);
}

pauseButt.onRelease = function(){
videoPlayer.pause();
}

playButt.onRelease = function(){
videoPlayer.pause();
}

backButt.onRelease = function(){
videoPlayer.seek(0);
}
//Scrubber code. Sets the scrubber arguments for seamless scrubbing
var scrubInterval;

loader.scrub.onPress = function(){
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,654,this._y);
}
//Allows the scrubber to move through loaded content
function scrubit() {
videoPlayer.seek(Math.floor((loader.scrub._x/654)*duration));
}
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function(){
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 100);
this.stopDrag();
}
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;

function videoStatus(){
amountLoaded = videoPlayer.bytesLoaded / videoPlayer.bytesTotal;
loader.loadBar._width = amountLoaded * 654;
loader.scrub._x = videoPlayer.time / duration * 653;
}
//Mute button methods of attaching an audio from the FLV and putting it in the
//empty MC
_root.createEmptyMovieClip("vSound",_root.getNextHighestDepth())
vSound.attachAudio(videoPlayer);

var so:Sound = new Sound (vSound);

so.setVolume(100);
//Rollover functions for the states and the mute function itself
mute.onRollOver = function(){
if(so.getVolume() == 100) {
this.gotoAndStop("onOver");
}
else {
this.gotoAndStop("muteOver");
}
}
mute.onRollOut = function(){
if(so.getVolume() == 100) {
this.gotoAndStop("on");
}
else {
this.gotoAndStop("mute");
}
}

mute.onRelease = function(){
if(so.getVolume() == 100) {
so.setVolume(0);
this.gotoAndStop("muteOver");
}
else {
so.setVolume(100);
this.gotoAndStop("onOver");
}
}

//This batch of code attaches the FLV from the server and plays it in the vidHolder
//and pauses it in the beginning. The metaData method checks for cues as well
//as provides the scrubber with neccessary information to scrub.
videoPlayer.onMetaData = function(metaProp:Object) {
trace("The metadata:");
traceMeta(metaProp);
duration = metaProp.duration
};
vidHolder.attachVideo(videoPlayer);
videoPlayer.play("http://images.legacynetwork.com/flv/tutorial.flv");
videoPlayer.pause();
function traceMeta(metaProp:Object):Void {
var p:String;
for (p in metaProp) {
switch (p) {
case "cuePoints" :
trace("cuePoints: ");
//cycles through the cue points
var cuePointArr:Array = metaProp[p];
for (var j:Number = 0; j < cuePointArr.length; j++) {
//cycle through the current cue point parameters
trace(" cuePoints[" + j + "]:");
var currentCuePoint:Object = metaProp[p][j];
var metaPropPJParams:Object = currentCuePoint.parameters;
trace(" name: " + currentCuePoint.name);
trace(" time: " + currentCuePoint.time);
trace(" type: " + currentCuePoint.type);
if (metaPropPJParams != undefined) {
trace(" parameters:");
traceObject(metaPropPJParams, 4);
}
}
break;
default :
trace(p + ": " + metaProp[p]);
break;
}
}
}
//Checks for cues as they go and outputs a trace statement as the cues comes up
videoPlayer.onCuePoint = function(infoObject:Object)
{
textHolder.attachMovie("text2", "text2", 1)
trace("onCuePoint:");
for (var propName:String in infoObject) {
if (propName != "parameters")
{
trace(propName + " = " + infoObject[propName]);
}
else
{
trace("parameters =");
if (infoObject.parameters != undefined) {
for (var paramName:String in infoObject.parameters)
{
trace(" " + paramName + ": " + infoObject.parameters[paramName]);
}
}
else
{
trace("undefined");
}
}
}
trace("---------");
}
That is the whole code for my player. Please help me out. Thanks in advance.

EDIT:
Also for each cuePoint a different SWF loads.

CuePoint Function Problem
I'm using Flash 8 (in case you need know what version I'm using). There's three flvs I have assigned a cuepoint, "complete". The goal is to make a graphic visible when "complete" cuepoint is detected, but this function seem doesn't work, any feedback on function?:


Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns :NetStream = new NetStream(nc);
myVid.attachVideo (ns);

s9thb.onPress = function() {
ns.play ("flv/S9.flv");
screenout._visible = false;

}

s10thb.onPress = function() {
ns.play ("flv/S10.flv");
screenout._visible = false;
}

s11thb.onPress = function() {
ns.play ("flv/S11.flv");
screenout._visible = false;
}

listenerObject = new Object();
listenerObject.cuePoint = function(eventObject){
screenout._visible = true;
}

ns.addEventListener("complete", listenerObject)
Thanks,

Jace

CuePoint And Media Encoder 4
Hey! I ve exported a f4v movie from Media Encoder 4. I added a cuepoint, but it seems impossible to "grab it". What am i doing wrong? i choose event as cuepoint type

This is my code.


ActionScript Code:
package se.ericsson {
   
    import fl.video.*;
   
    import flash.display.*;
    import flash.events.*;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;
   
    public class EricssonShowroom extends MovieClip
    {
        private var _nc:NetConnection;
        private var _ns:NetStream;
        private var _video:Video;       
        private var _mainContent:MovieClip; 
        private var _videoPlayer;
       
       
        public function EricssonShowroom()
        {
            _mainContent  = MovieClip(getChildByName("mainContent"));
           
            _video = new Video();
            _mainContent.addChild(_video);
            
            _nc = new NetConnection();
            _nc.connect(null);
            
            _ns = new NetStream(_nc);
           
            _ns.client = {};
            _ns.client.onMetaData = ns_onMetaData;
            _ns.client.onCuePoint = ns_onCuePoint;
            _ns.play("videos/testscreen_1_2.f4v");
            
            _video.attachNetStream(_ns);
        }
        
        private function ns_onMetaData(item:Object):void {
            trace("metaData");
            // Resize video instance.
            _video.width = item.width;
            _video.height = item.height;
            // Center video instance on Stage.
            _video.x = 0;
            _video.y = 0;
        }
        
        private function ns_onCuePoint(item:Object):void {
            trace("cuePoint");
            trace(item.name + " " + item.time);
        }
       
    }
}

Cuepoint Embeded In Video Itself
just wondering will my FLV sizes increase if i were to embed my cuepoint together compared to using actionscript cuepoint? I understand that actionscript cuepoint tend to have slight delay and to me accurancy is very important so i have to embed them instead.

How To Use Cuepoint In Audio Files
Into a file .fla I have a file audio with cuepoints. I need to read these cuepoints in flash (I use the MX 2004 version) to manage some little animations into the stage.
It is possible to make this?
I have found solutions only for the .flv file but not for wav or mp3 or others audio file... Why?

Help me please

Cuepoint Issue For Ending .flv
Hello - I am wanting to correct below so it doesn't bring up an error in AS3 including not playing flv - any help greatful

[as]
stop();
var flvListener:Object = new Object();
flvListener.cuePoint = function(eventObject:Object):Void { //error on this line
if (eventObject.info.name == "End") {
gotoAndPlay(3);
}
};
myFLV.addEventListener("cuePoint", flvListener);
[/as]

When Has A CuePoint In Video Loaded?
I've been working through a tutorial on the Adobe Macromedia site which has an Flv video (Progressively Downloading), and buttons at the side which jump to certain Cue Points within the video.
http://www.adobe.com/devnet/flash/ar...ediapreso.html

What I want to do is to only enable the buttons when the video has loaded in enough to reach that particular Cue Point.

If for instance you view the video, and immediately try to hit the last button (which jumps to the last Cue Point) then there is a massive delay while you wait for the video to load in before it eventually goes to that Cue Point.

Can anyone help?

Using CuePoint Navigation -need Urgent Help
howdy all!.
i got project like video presentation. it has flv video(cue points are embbed),

let say flv video play(at scene 1) through the end and when finished it or hit the last cue point.
I want to go to next scene(scene 2)..

is it hard to do it? i'm a kind newbie on action script.. so
somebody explain step by step or sample action script??

Buffering An FLV Changes When Cuepoint Hits
Hi everyone,

I was a Kirupa virgin, but have just broken my cherry - my first post!
This seems like a great place for help but can't find the solution to this problem.

I'm doing a full flash video site, and have got all the video edited etc, but am at the stage where I am implementing it all into Flash and have run into a pretty big problem at the early stage of this part.

I'm using the netStream class for video playback, (although I've also tried it with the FLVPlayback component with the same problem), and if I use "ns.setBufferTime(10);", the cue point I have in the video hits way too early.
You can see what I mean here:

http://www.flash.uk.net/qualitytesti..._Holder-3.html

The cue point is set to trigger the contact details window just as she points to the right, but with the buffer set to 10 secs, it triggers at the start of the video.

Can anyone help me understand why this is happening and what I can do about it? I've been up for 2 long days trying to find an answer but haven't ben able to yet.


Another thing, is that I'd like the site to load the individual FLV's in the sequence that I choose, so the most important clips would load first. How could I tell Flash which video's I want loaded in a particular order - would that involve an array? If so, can anyone give me some advice as to the code to load a sequence of FLV's sequentially?


Thanks a lot in advance,
Olly.

Attaching External SWF On CuePoint
I have had this problem for like a day and still cannot figure it out. How woold I attach an external SWF on cue point?

Here is my code, all of it, the cue points are at the bottom.


Code:
stop();
//Establishes a connection to the internet and pulls the info from the server where
//the FLV is stored.
var nc:NetConnection = new NetConnection();
nc.connect (null);

var videoPlayer:NetStream = new NetStream(nc);
//vidHolder.attachVideo(videoPlayer);
//videoPlayer.play("http://images.legacynetwork.com/flv/tutorial.flv");

var duration:Number;

videoPlayer["onMetaData"] = function(obj){
duration = obj.duration;
}
//Code for the control buttons with animated states.
playButt.onRollOver = over;
playButt.onRollOut = out;
muteButt.onRollOver = over;
muteButt.onRollOut = out;
pauseButt.onRollOver = over;
pauseButt.onRollOut = out;
backButt.onRollOver = over;
backButt.onRollOut = out;
//Functions for the controls and what they do.
function over() {
this.gotoAndPlay (2);
}

function out() {
this.gotoAndPlay (11);
}

pauseButt.onRelease = function(){
videoPlayer.pause();
}

playButt.onRelease = function(){
videoPlayer.pause();
}

backButt.onRelease = function(){
videoPlayer.seek(0);
}
//Scrubber code. Sets the scrubber arguments for seamless scrubbing
var scrubInterval;

loader.scrub.onPress = function(){
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,654,this._y);
}
//Allows the scrubber to move through loaded content
function scrubit() {
videoPlayer.seek(Math.floor((loader.scrub._x/654)*duration));
}
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function(){
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 100);
this.stopDrag();
}
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;

function videoStatus(){
amountLoaded = videoPlayer.bytesLoaded / videoPlayer.bytesTotal;
loader.loadBar._width = amountLoaded * 654;
loader.scrub._x = videoPlayer.time / duration * 653;
}
//Mute button methods of attaching an audio from the FLV and putting it in the
//empty MC
_root.createEmptyMovieClip("vSound",_root.getNextHighestDepth())
vSound.attachAudio(videoPlayer);

var so:Sound = new Sound (vSound);

so.setVolume(100);
//Rollover functions for the states and the mute function itself
mute.onRollOver = function(){
if(so.getVolume() == 100) {
this.gotoAndStop("onOver");
}
else {
this.gotoAndStop("muteOver");
}
}
mute.onRollOut = function(){
if(so.getVolume() == 100) {
this.gotoAndStop("on");
}
else {
this.gotoAndStop("mute");
}
}

mute.onRelease = function(){
if(so.getVolume() == 100) {
so.setVolume(0);
this.gotoAndStop("muteOver");
}
else {
so.setVolume(100);
this.gotoAndStop("onOver");
}
}

//This batch of code attaches the FLV from the server and plays it in the vidHolder
//and pauses it in the beginning. The metaData method checks for cues as well
//as provides the scrubber with neccessary information to scrub.
videoPlayer.onMetaData = function(metaProp:Object) {
trace("The metadata:");
traceMeta(metaProp);
duration = metaProp.duration
};
vidHolder.attachVideo(videoPlayer);
videoPlayer.play("http://images.legacynetwork.com/flv/tutorial.flv");
videoPlayer.pause();
function traceMeta(metaProp:Object):Void {
var p:String;
for (p in metaProp) {
switch (p) {
case "cuePoints" :
trace("cuePoints: ");
//cycles through the cue points
var cuePointArr:Array = metaProp[p];
for (var j:Number = 0; j < cuePointArr.length; j++) {
//cycle through the current cue point parameters
trace(" cuePoints[" + j + "]:");
var currentCuePoint:Object = metaProp[p][j];
var metaPropPJParams:Object = currentCuePoint.parameters;
trace(" name: " + currentCuePoint.name);
trace(" time: " + currentCuePoint.time);
trace(" type: " + currentCuePoint.type);
if (metaPropPJParams != undefined) {
trace(" parameters:");
traceObject(metaPropPJParams, 4);
}
}
break;
default :
trace(p + ": " + metaProp[p]);
break;
}
}
}
//Checks for cues as they go and outputs a trace statement as the cues comes up
videoPlayer.onCuePoint = function(infoObject:Object)
{
onCuePoint("one") = function(){
txt.gotoAndPlay(1);
}

trace("onCuePoint:");
for (var propName:String in infoObject) {
if (propName != "parameters")
{
trace(propName + " = " + infoObject[propName]);
}
else
{
trace("parameters =");
if (infoObject.parameters != undefined) {
for (var paramName:String in infoObject.parameters)
{
trace(" " + paramName + ": " + infoObject.parameters[paramName]);
}
}
else
{
trace("undefined");
}
}
}
trace("---------");
}

CuePoint Function Problem
I'm using Flash 8 (in case you need know what version I'm using). There's three flvs I have assigned a cuepoint, "complete". The goal is to make a graphic visible when "complete" cuepoint is detected, but this function seem doesn't work, any feedback on function?:


Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns :NetStream = new NetStream(nc);
myVid.attachVideo (ns);

s9thb.onPress = function() {
ns.play ("flv/S9.flv");
screenout._visible = false;

}

s10thb.onPress = function() {
ns.play ("flv/S10.flv");
screenout._visible = false;
}

s11thb.onPress = function() {
ns.play ("flv/S11.flv");
screenout._visible = false;
}

listenerObject = new Object();
listenerObject.cuePoint = function(eventObject){
screenout._visible = true;
}

ns.addEventListener("complete", listenerObject)
Friggin' Mick

Adding Parameters Into Cuepoint(nav)
I am producing a video with flash video encoder. there is a cuepoint(nav) in it. is it possible to add into this cuepoint(nav) parameters by action script?

Translate Cuepoint Script
in the follow code what does this mean (especially the bit about target.name)

cuePointListener.cuePoint = function(eventObject){
// call the doThisStuff() function with the cuepoint's name
doThisStuff(eventObject.target.name);

and also

function doThisStuff(mediaCue)

I thought doThisStuff was assigned to (eventObject.target.name), why is Media cue in here now?




ActionScript Code:
stop();
// hide play controller buttons by default
// load media into the component
mediaStreamer.setMedia("http://www.americancreek.com/New_AmericanCreek/images/FLV-Alfa2.flv", "FLV");
// Adding "cuePoints" to the component ---------------------------
mediaStreamer.addCuePoint("loaderu", 0.1);
mediaStreamer.addCuePoint("handone", 5);
mediaStreamer.addCuePoint("twohand", 10);
 
 
// Creating the cuePointListener object -------------------------
cuePointListener = new Object();
// perform this function when a cuepoint gets "heard"
cuePointListener.cuePoint = function(eventObject){
    // call the doThisStuff() function with the cuepoint's name
    doThisStuff(eventObject.target.name);
};// end function
 
// associate/attach the lister to the component
mediaStreamer.addEventListener("cuePoint",cuePointListener);
 
// doThisStuff() ------------------------------------------------
function doThisStuff(mediaCue){
    switch (mediaCue) {
    case "loaderu":
        trace("yes1");
        break;
    case "handone":
        trace("yes2");
        break;
    case "twohand":
        trace("yes3");
        break;
    default:
    }//end switch
};//end function
 


S

Playing Movieclip On Certain Cuepoint
I want to play a movieclip on a certain cuepoint, in the code under this question it only plays a sound when the parameter is coming along and plays the movieclip ex and text on every cuepoint but I want them only to play when a certain cuepoint is coming along and not react on all cuepoints so I can play the movieclip ex and text separately.


Code:

var s:Sound = new Sound();

var vidList:Object = new Object();
vidList.cuePoint = function(cues)
{
   text.gotoAndPlay(2);
   ex.gotoAndPlay(2);
   s.attachSound(cues.info.parameters.sound);
   s.start();
}

vid.addEventListener("cuePoint", vidList);

Cuepoint Navigation When Using NetStream
hi,

i am trying to use a button to navigate to a cuepoint, i can get it working when i use the FLVPlayback Component using this code

Code:

my_button.onRelease = function(){
   my_media.seekToNavCuePoint("cuePoint4");
}



but i can't get it to work when im using NetStream.

I also have a cue point that trigger a graphic to be displayed which I got working in NetStream using this code.

Code:

my_graphic._visible = false;

ns.onCuePoint = function(cue) {
   if(cue.name == "cuePoint1") {
      my_graphic._visible = true;
   }
}



i just cant work out how to jump to "cuePoint4" when "my_button" is released.

EDIT:

can the funtion seekToNavCuePoint work when using NetStream?

can any one help me with this
Cheers

Video Cuepoint Navigation
Hi I have been working on this off and on for months and need some help. I am creating a training lesson that will pause video at a point where the user is asked a couple of questions. The questions are simple buttons (not dynamic) that when clicked will play the associated video response.

I do not want to load individual FLVs (I know how to do this - takes way to long to make all the individual FLVs as the video is 10 minutes long and has 20 cuepoints). I want the button to navigate the video to the specific cuepoint (also needs to be non-linear).

I am using the FLVplayback component and have created cuepoints in the playback component directly. Here is the code I currently have added in my actions layer:

Code:

myButton.onPress = function(){
   myPlayback02.cuePoint.play("answer1");}

The video does not navigate at all when I do this. No book addresses this directly so I am cobbling code from 4 different books.

Does anyone know how to do this? There has got to be a way to make this work. Please help!

Note: My videos are approx 10 mins long, so I may have to do the individual FLV thing if playback quality becomes an issue.

Trouble Accessing CuePoint Properties
Hi, Im using Flash CS3 and Actionscript 2.
I made an FLV with embedded Event Cuepoints which contain parameters. I want to have the cuepoints set a movie clips visibilty parameter. I named the parameter the same as the movie clips instance name and set the value to true.
Here is my code which works.

var listenerObject:Object = new Object();

function cpinfo(cp: Object) {
for (var paramName:String in cp.info.parameters){
if (cp.info.parameters[paramName] == "true"){
_root[paramName]._visible = true;
}
else {
_root[paramName]._visible = false;
}
}
trace (paramName);
trace (cp.info.parameters[paramName]);
}
myVideo.addEventListener("cuePoint", cpinfo);

Now what I want to do but cant get it to work is to not have to use the IF statement and just use this:
_root[paramName]._visible = cp.info.parameters[paramName];

For some reason the movie clip visibility is not being set to the parameter value using the above line..
The trace for the parameter value is showing the correct value. Is the way Im trying to access the parameter value incorrect? Any help would be appreciated.

rayz007

[CS3] Need FLV Cuepoint Script And LoadMovie To Work
I have an FLV that goes to a new frame when a cuepoint is hit.
code used is:
---------------------
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {

if(eventObject.info.name == "FLend"){

gotoAndPlay("FLVideo2");

}
}

firstlook.addEventListener("cuePoint",listenerObje ct);
------------------------
Works fine on its own timeline but when the swf containing the FLV is loaded into a MC container using:
_root.contents.loadMovie("content_movietest.swf");

The video does not play at all.

Any advise on solving this problem would be most appreciated.

[F8] CuePoint To STOP Video On The Last Frame
Hey,

I have imported a video into Flash CS3 and I want to be able to stop the video on the last frame. If I say false to autoRewind, it goes to a black screen and if I say true to autoRewind, it goes to a white screen. I believe if I use a cuePoint on the last second to STOP then it would work. Can someone help me figure that out?

I'm using Action script 2.0

Copyright © 2005-08 www.BigResource.com, All rights reserved