FlashComGuru Home Imediasee Influxis Uvault Akamai
                                                                                       Forum Index | Active Topics | Register
                                                                                                          List Overview | List Archives
                                                                                                                           About this site | Advertise
 

home

Adobe AIR (8)
Applications (32)
Books & Training (9)
Collaboration (9)
Components (6)
Events (50)
Flash Player (10)
Flex (28)
FMS (70)
General (108)
Hosting (5)
Jobs (13)
Off topic (31)
Press Releases (9)
Site Check (7)
Tools (41)
Videos & Players (53)

Flash On the Beach

Alltop, all the cool kids (and me)


Simple Connect Component with Multiple Port and Protocol Option
by Janu

We already know that firewalls are the main problem for clients when trying to connect to FCS, especially if we setup the connection as standard (RTMP connection on default port 1935). While the Flash Player might try some alternate ports this can take a while to complete.

Here's what I did with the simple connect component so that it allows and tries connections on multiple ports and with multiple protocols.
All we need to do is add/edit some code inside the simple connect component and modify the component definition

NOTE : I am using the old simple connect (before FCS updater 2) which is does not include the RTMPT tunneling code.

Step 1
Edit component definition

Update the component definition to reflect the changes below.


Step 2
On line 50 you'll find the script:
Key.addListener(this.enterListener); // it's inside the' FCSimpleConnectClass.prototype.init' function

Below that script add the following code :
this.portNum = this.owner.portNum = 0;
this.hostNumber = this.owner.hostNumber = 0;


Step 3
Update the method FCSimpleConnectClass.prototype.serverConnect = function(username, appInstance) to :


Please note that you need to add some of your own logic towards the bottom of the code where I have inserted th comments.

Step 4
Edit the doConnect function so that it reads:



Step 5
The simple connect compoentn is updated and ready for use.
The following image show the input parameters you should use.


Source
You can download the source file here

Got a question about this tutorial? You can find the thread for it in our Flashcom Forum.

Janu 11/2004