
You can download a trial version of the "Flash Communication Server MX" from the Macromedia site.
Our sugestion is: read first our FREE courses about basic Flash programming. You can access then from our homepage.
When you install your Flash Communication Server (Developer option), will be created a tree of folders under the folder: C:\Inetpub\wwwroot. The main folder is C:\Inetpub\wwwroot\flashcom\applications.
If we create a Flash multiuser application having by interface the Flash movie: myApp.fla we need to create in this folder a new folder: myApp where we will "install" the .SWF file and the .HTML file.
Is basic that the first thing we need to do is: inside the interface part of the application (the movie) make a connection with its server part.
The more easy option is: the user calls (using the browser) the .HTML file inside the flashcom/applications/myapp folder (http://domain-name-or-ip-address/flashcom/applications/myapp/myapp.html) that calls the .SWF movie. This movie will make the connection.(YOU can use, for tests, the IP address 127.0.0.1 if you are not connected.) At this case, the HTTP server machine is the same of the FlashComm server. If this machine is "down" the user will not access the HTML page having the Flash movie.
At our exercice we will have a more complex architecture. The HTTP server (having the .SWF file and the .HTML file) is not the same machine that has the FlashComm server. So, the user can view the Flash movie, receiving a message if the FlashComm server is "down".
In all the cases we need to have that folder having the same name of the movie.
The connection is made in a program glued to the main frame of the movie. Something like this:
stop();
//Make a new connection
client_nc=new netConnection();
// Try to connect
client_nc.connect("rtmp://the-domainname-of-the machine/myApp");
// Handle status message of the connection
client_nc.onStatus = function(info) {
if(info.code=="NetConnection.Connect.Success"){
//Write a message to the user:
_root.msg.text = "The connection was a success!";
}
else{
_root.msg.text = "Demo not available now! Try it later.";
}
}
If the machine with the server hasn't a domain name you can use the IP Address. This is very useful if you have a DSL connection only.
Our first exercice is only this: try to connect.
OUR FLASHCOMM SERVER IS AVAILABLE ONLY A FEW HOURS EACH DAY.TRY. AND SORRY IF IT'S NOT AVAILABLE NOW.
NEXT LESSON T. CONTENTS HOMEPAGE
