6 Replies Latest reply on Mar 23, 2010 1:25 AM by satheeshpallath12

    Problem with search tutorials about using RTMFP, Stratus

    metmoiqua

      I'm a begginer with RTMFP and Stratus, I want to make a client to client game using RTMFP to send messages between clients. But I haven't found a helpful tutorial about using RTMFP yet. First, there a too little tutorials about it, second, some tutorials is too short with a comlexity content, for example, video phone application tutorial of Adobe. Too much source codes aren't explained. Please help me and sorry about my English.

        • 1. Re: Problem with search tutorials about using RTMFP, Stratus
          Michael Thornburgh Adobe Employee

          Tom Krcha (platform evangelist at Adobe) has a bunch of stuff on his website about RTMFP.  lately he's been focusing on some of the new advanced topics, like RTMFP Groups, but he has materials covering the spectrum of P2P topics.  check out

           

             http://www.flashrealtime.com/basics-of-p2p-in-flash/

           

          and then also check out his other articles on http://www.flashrealtime.com/ .

           

          the folks at realeyes.com are also developing articles and tutorials on using RTMFP.  check out

           

             http://www.adobe.com/devnet/flashmediaserver/articles/p2p_rtmfp_groups.html

           

          which mostly covers groups but also discusses one-to-one topics.  plus it might give you some more ideas. 

           

          -mike

          • 2. Re: Problem with search tutorials about using RTMFP, Stratus
            metmoiqua Level 1

            I follow that tutorial but I receive some errors, here's my code:

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="370" width="493">
                <mx:Script>
                    <![CDATA[
                        //import thu vien o day
                        import spark.components.Group;
                        import flash.net;
                       
                        //khai bao cac hang dia chi server stratus va devkey stratus
                        private const stratusAddress:String = "rtmfp://stratus.adobe.com/";
                        private const stratusDevKey:String = "myDevKey";
                       
                        //khai bao cac bien quan trong khac
                        private var nc:NetConnection;
                        private var gs:GroupSpecifier;
                       
                        //khoi tao ket noi
                        private function initConnection():void
                        {
                            nc = new NetConnection();
                            nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                            nc.connect(stratusAddress + stratusDevKey);
                        }
                       
                        private function netStatusHandler(e:NetStatusEvent):void
                        {
                            //thong bao tinh trang ket noi
                            this.lblStatus.text = e.info.code.toString();
                            switch(e.info.code.toString())
                            {
                                case "NetConnection.Connect.Success":
                                        setupGroup();
                                    break;
                            }
                        }
                       
                        private function setupGroup():void
                        {
                            gs = new GroupSpecifier("myGroup/g1");
                        }
                       
                        protected function btnConnect_clickHandler(event:MouseEvent):void
                        {
                            initConnection();
                        }       
                       
                        protected function btnSend_clickHandler(event:MouseEvent):void
                        {
                           
                        }

                    ]]>
                </mx:Script>
                <mx:Label x="18" y="25" text="My ID:"/>
                <mx:Label x="19" y="60" text="Friend"/>
                <mx:Text x="64" y="61" width="296" id="txtFriend"/>
                <mx:Text x="63" y="26" width="297" id="txtMyID"/>
                <mx:Button x="65" y="309" label="Connect" id="btnConnect" click="btnConnect_clickHandler(event)"/>
                <mx:Label x="65" y="338" id="lblStatus" width="297"/>
                <mx:TextArea x="64" y="89" width="407" height="185"/>
                <mx:TextInput x="64" y="282" width="296"/>
                <mx:Button x="143" y="309" label="Send" id="btnSend" click="btnSend_clickHandler(event)"/>
            </mx:Application>

             

            Errors I received:

            - Description    Resource    Path    Location    Type
            1046: Type was not found or was not a compile-time constant: GroupSpecifier.    tryRTMFP2103_2.mxml    tryRTMFP2103_2/src    line 15    Flex Problem
            - Description    Resource    Path    Location    Type
            1180: Call to a possibly undefined method GroupSpecifier.    tryRTMFP2103_2.mxml    tryRTMFP2103_2/src    line 39    Flex Problem

             

            Please help me!

            • 3. Re: Problem with search tutorials about using RTMFP, Stratus
              Michael Thornburgh Adobe Employee

              you need the playerglobal.swc that comes with Flash Player 10.1, as well as Flash Player 10.1, to use RTMFP Groups (including the GroupSpecifier class).  you must also target Flash Player 10.1.0 in the Flex compiler settings.

              • 4. Re: Problem with search tutorials about using RTMFP, Stratus
                metmoiqua Level 1

                But how can I import playerglobal.swc into flex project? I'm using Flash Builder 4.

                • 5. Re: Problem with search tutorials about using RTMFP, Stratus
                  Michael Thornburgh Adobe Employee

                  i don't have Flash Builder 4 in front of me, but i believe it's almost exactly the same as Flex Builder 3.  in that, you go to Project -> Properties -> Flex Build Path -> Library Path -> Add SWC.  the names might be a little different in Flash Builder 4 but the general idea is the same.

                  • 6. Re: Problem with search tutorials about using RTMFP, Stratus
                    satheeshpallath12 Level 1

                    As michael said.You have to add playerglobal.swc.

                     

                    After adding,u have to make link type to external.

                     

                    I'm using flex builder 3.

                     

                    Plz check it in your flash builder...

                    only some differences will be there....