No, that's good!

The problem is that you cannot pass a NetConnection to a NetStream that is not yet connection. NetStream needs to have the NetConnection that is passed to it be connected.

You need to add an event listener to NetConnection, wait for onStatus to fire with NetConnection.Connect.Success, THEN create the NetStream. Make sense?

On Jan 22, 2007, at 9:46 AM, sekar r wrote:


Yes this is ipaddress of my flash media server and port.

anything wrong this?

from
sekar





JesterXL <[EMAIL PROTECTED]> wrote:
What is 10.21.160.125:1935?  Is that a Flash Media Server?

On Jan 21, 2007, at 10:48 AM, sekar r wrote:


Dear Friends,

i am getting this error on runtime. [NetConnection object must be connected.].

i have attached image file for error.

plz help me for this.

this my mxml. file.

<?xml version="1.0"?>
<!-- controls\videodisplay\VideoDisplayCamera.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
    <mx:Script>
        <![CDATA[

            // Define a variable of type Camera.
            import flash.media.Camera;
            public var cam:Camera;
            [Bindable] private var con:NetConnection;
            public var ns:NetStream;

            private function initCamera():void {
   con = new NetConnection();
   con.objectEncoding = flash.net.ObjectEncoding.AMF0;
   //if(!con.connected)
       con.connect("rtmp://10.21.160.125:1935/liveApp");
    //else
     //con.close();
   var ns:NetStream=new NetStream(con);
   // Initialize the variable.
             cam = Camera.getCamera();
            myVid.attachCamera(cam)

    ns.attachCamera(cam);
    ns.publish("dhina","live");
 }
        ]]>
    </mx:Script>

    <mx:VideoDisplay id="myVid"
        width="320" height="240"
        creationComplete="initCamera();"/>
</mx:Application>


waiting for ur valuable reply
thanks in advance

sekar.

Any questions? Get answers on any topic at Yahoo! Answers. Try it now.

Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.

<error.JPG>







Warm Regards
Sekar.R
i-Grandee Software Technologies (P) Ltd




Access over 1 million songs - Yahoo! Music Unlimited.



Reply via email to