I am trying to integrate Flex 2 with FMS 2. The Flex app connects with
FMS; I am sure of this because I monitor the log in the FMS console.
However, it keeps throwing the following error (note that
"FMSFlexTest" is the name of my Flex app):

Error #2044: Unhandled NetStatusEvent:. level=error,
code=NetConnection.Connect.Failed
        at FMSFlexTest$iinit()
        at mx.managers::SystemManager/create()
        at mx.managers::SystemManager/::initializeTopLevelWindow()
        at mx.managers::SystemManager/::frameEndHandler()

Why would the error say that the connect attempt failed, when it
actually succeeded? I built a UI for the FMS app using the Flash 8
IDE, and that works fine. What am I missing? (See code below.)

As an aside: I discovered that some folks had a similar issue when
attempting to run Christophe Conraet's Flex 2/FMS app, but I did not
find an answer to the problem. 

Here's the Flex code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
<mx:Script>
<![CDATA[
import flash.net.NetConnection;
private var nc:NetConnection = new NetConnection();
private function beginStream():void {
nc.connect("rtmp:/tut_hello/room_01","Flex App");
debugText.text = "beginStream invoked \n";
}
]]>
</mx:Script>
<mx:Button x="275" y="71" label="Connect" click="beginStream();"/>
<mx:TextArea x="275" y="125" id="debugText" />
</mx:Application>

Here's the code in main.asc (you may recognize it because it comes
from an FMS sample app):

application.onConnect = function(newClient,nm){
newClient.name = nm;
application.acceptConnection(newClient);
var msg = "Hello! You are connected as: " + newClient.name;
trace("Sending out this message: " + msg);
}





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to