hi there,

did anyone successfully setup red5 and flex2 on tomcat?
i have setup tomcat and installed the red5.war on it. flex2 is running as 
the eclipse plugin.
first of all i created a red5 application, connecting to it with flash just 
worked fine.
so i started on creating a flex application and tried again connecting to my 
red5 app.
but it doesn't work. I always get the following error message:


call Function 'registerUser'
info.code: NetConnection.Call.Failed
info.application: undefined
info.description: HTTP: Failed
info.level: error

I am really desperate at the moment since the flex code worked fine before i 
installed red5 on tomcat.
but i am sure this must be a problem with flex2, because connecting to red5 
via flash
(preview and in the browser) worked,  so does anyone have a clue how to 
setup flex2 to get it work?

here is my flex code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute" 
viewSourceURL="srcview/index.html" minWidth="750" minHeight="550" >
<!-- applicationComplete="init()">/-->
<mx:Script>
        <![CDATA[
                import flash.net.ObjectEncoding;
                import flash.events.*;
                public var nc:NetConnection;

                public function netStatusHandler(event:NetStatusEvent):void
                {

                        ConnectionInfo.text += "info.code: " + 
event.info.code + "\n";
                        ConnectionInfo.text += "info.application: " + 
event.info.application + 
"\n";
                        ConnectionInfo.text += "info.description: " + 
event.info.description + 
"\n";
                        ConnectionInfo.text += "info.level: " + 
event.info.level + "\n";
        }

        public function securityErrorHandler(event:SecurityErrorEvent):void
        {
            ConnectionInfo.text = "securityErrorHandler: " + event + "\n";
        }

                public function registerUser():void
                {

                        nc = new NetConnection();
                        nc.addEventListener(NetStatusEvent.NET_STATUS, 
netStatusHandler);
                    nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, 
securityErrorHandler);
                    nc.objectEncoding = ObjectEncoding.AMF0;
                        nc.connect("rmtp://localhost/myproject");
                        ConnectionInfo.text += "call Function 'registerUser'\n";
                        var nc_responder:Responder = new Responder(ncResponder);
                        var input1:String = input_nick.text;
                        var input2:String = input_email.text;

                        nc.call("registerUser",nc_responder,input1,input2);

                }

                public function ncResponder(answer:Number):void
                {
                        ConnectionInfo.text += answer;
                }


        ]]>
</mx:Script>

<mx:Panel name="registration" title="Registration">
<mx:Grid>
        <mx:GridRow>
                <mx:GridItem>
                        <mx:Label text="Nickname"/>
                </mx:GridItem>
                <mx:GridItem>
                        <mx:TextInput id="input_nick"/>
                </mx:GridItem>
                <mx:GridItem>
                        <mx:Label text="Email-Adresse"/>
                </mx:GridItem>
                <mx:GridItem>
                        <mx:TextInput id="input_email"/>
                </mx:GridItem>
                <mx:GridItem>
                        <mx:Button id="b_submit" label="absenden" 
click="registerUser()"/>
                </mx:GridItem>
        </mx:GridRow>
        <mx:GridRow>
                <mx:GridItem>
                        <mx:TextArea id="ConnectionInfo" width="300" 
height="100"/>
                </mx:GridItem>
        </mx:GridRow>
</mx:Grid>
</mx:Panel>
</mx:Application>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if you want to see my red5 java code, tell me, but i dont think it solves 
the problem.


anyway, thank you for your help,

regards
Donny

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to