FORUMS: list search recent posts

Invoking an action when FLV ends

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Craig Hirshberg
Invoking an action when FLV ends
on Feb 14, 2007 at 4:46:44 am

Hi,

I've searched all the posts on trying to invoke an action (tell the parent timeline to advance one frame) after a FLV video finishes playing, and tried everything, but still to no avail. I must be missing something. I'm not a flash programmer by any means, more of a copy/paste/tweek kind of skill level, so I'm hoping I'm just misssing something basic here. If someone could take a look at my code below, I'd be extremely grateful. Note: This is for a Projector file that will be played off a cd-rom, and the FLVs are in an external directory ("Videos") if that helps at all.

Thanks!

Craig


CODE


// Create a NetConnection object
var my_nc:NetConnection = new NetConnection();
// Create a local streaming connection
my_nc.connect(null);
// Create a NetStream object and define an onStatus() function
var my_ns:NetStream = new NetStream(my_nc);
my_ns.onStatus = function(infoObject:Object):Void {
status_txt.text += "status (" + this.time + " seconds)n";
status_txt.text += "t Level: " + infoObject.level + "n";
status_txt.text += "t Code: " + infoObject.code + "nn";
};
// Attach the NetStream video feed to the Video object
video_1_2.attachVideo(my_ns);
// Set the buffer time
my_ns.setBufferTime(5);
// Begin playing the FLV file
my_ns.play("Videos/video_1_2.flv");

if (my_ns.infoObject.code == "NetStream.Play.Stop"){
section1_mc.nextFrame();
}


Return to posts index

Sher Ali
Re: Invoking an action when FLV ends
on Feb 14, 2007 at 5:02:47 am

As far as I remember I have answered this once before here on this forum. Anyway use this:

ns.onStatus = function(info){

if (info.code == "NetStream.Play.Stop"){
_parent.nextFrame();
}

}


------------------
Sher Ali
http://www.webeyestudio.com


Return to posts index

Craig Hirshberg
Re: Invoking an action when FLV ends
on Feb 21, 2007 at 10:37:30 pm

Thanks! This one took me a while, but it worked when I realized I was putting this code in the wrong place.

Craig


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]