NamePros.Com (http://www.namepros.com/)
-   Graphic Design / Flash (http://www.namepros.com/graphic-design-flash/)
-   -   AS2: a non-component equivalent to FLVPlayback.complete? (http://www.namepros.com/graphic-design-flash/409806-as2-non-component-equivalent-flvplayback-complete.html)

hazza.mcazza 12-22-2007 06:22 AM

AS2: a non-component equivalent to FLVPlayback.complete?
 
hi,

i'm using
Code:
var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); video.attachVideo(ns);

to play my FLVs. i don't want play, pause, rewind buttons or anything, but what i do need, is to know when the video has reached it's end, so that i can 'gotoAndPlay(something else);'

i found FLVPlayback.complete, but this is just for components (?). is there an equivalent?

thanks very much,
-Hazza.

hazza.mcazza 12-22-2007 10:36 AM

i've found the onStatus command and am trying to use it like this:

Code:
ns.onStatus.Play.Stop = function() { gotoAndStop('stage3'); };


but again, with no joy -- can anyone suggest anything??

thanks very muchm
-Hazza.

paaaaaaaaaa 12-24-2007 09:42 AM

try:

Code:
var listener:Object = new Object(); listener.complete = function(event:Object):Void { gotoAndStop('stage3'); }; ns.addEventListener("complete", listener);


All times are GMT -7. The time now is 10:46 AM.
Site Sponsors
Advertise your business at NamePros

Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0