0 Replies Latest reply on Feb 14, 2007 3:34 AM by TheOutlander

    NetStream Error: NetConnection object must be connected

    TheOutlander
      I have successfully connected to NetConnection using AMF0 format. I have verified by looking at the Connected property and the admin console. However, when I create a new NetStream object and pass a NetConnection object I get the error listed below...

      ArgumentError: Error #2126: NetConnection object must be connected.
      at flash.net::NetStream/flash.net:NetStream::construct()
      at flash.net::NetStream$iinit()
      at test/Testing()
      at test/___Application1_initialize()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.core::UIComponent/set processedDescriptors()
      at mx.core::Container/createComponentsFromDescriptors()
      at mx.core::Container/mx.core:Container::createChildren()
      at mx.core::UIComponent/initialize()
      at mx.core::Container/initialize()
      at mx.core::Application/initialize()
      at test/initialize()
      at mx.managers::SystemManager/ http://www.adobe.com/2006/flex/mx/internal::childAdded()
      at mx.managers::SystemManager/::initializeTopLevelWindow()
      at mx.managers::SystemManager/::docFrameHandler()


      What am I doing wrong? The Flash Administration page says that I have one client connected. The NetConnectionObj.connected property is true... Here is my basic code

      var client_nc:NetConnection = new NetConnection();
      client_nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
      client_nc.connect("rtmp:/FLEX");

      if(client_nc.connected == true)
      testBox.text += "\nConnected to rtmp:/FLEX!\n";
      else
      testBox.text += "Could NOT Connect to rtmp:/FLEX!\n";

      //THIS IS WHERE I GET THE ABOVE ERROR
      var out_ns:NetStream = new NetStream(client_nc);


      I am able to connect to the same application via flash and stream video, but not through FLEX. The only difference is where these folders are located...permissions issue???

      I hope its something stupid that I am doing ... Please help!!!