  | |  | NetStream.onStatus | NetStream.onStatus 2004-02-25 - By Danny Patterson
Back I'm writing a simple class using net connection and net stream. It is as follows:
class SimplePlayer extends MovieClip { private var videoConnection:NetConnection; private var videoStream:NetStream; private var videoPlaceholder:Object; function SimplePlayer() { videoConnection =3D new NetConnection(); videoConnection.connect(null); videoStream =3D new NetStream(videoConnection); videoStream.onStatus =3D function(infoObj:Object) { switch(infoObj.code) { case 'NetStream.Play.Start': doPlay(); break; case 'NetStream.Play.Stop': doStop(); break; } } videoPlaceholder.attachVideo(videoStream); videoStream.play('video.flv'); } private function doPlay():Void { trace('doPlay'); } private function doStop():Void { trace('doStop'); } }
My problem is with the NetStream.onStatus method. How do I get it to call a method in my class?
Thanks, Danny
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105281 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |