Groups | Blog | Home
all groups > macromedia flash flashcom > october 2006 >

macromedia flash flashcom : FMS on a server


coolpyx1
10/31/2006 10:40:50 PM
FMS server works fine on my local machine. I have followed the same install
procedure on my server.
FMS connects ok but the application does't work.
Lets suppose that FMS is now working properly on my server how can can a
webcam be connected .
I would very much appreciate all accurate and easy understanding information
you can post.
Thanks
MIBtwo
11/1/2006 12:00:00 AM
Hello coolpyx1,

not easy to provide an easy answer, but I would say you can try fb3 very good
visual tuts at :

http://virtualjam.net/forum/

When you are in the forum, goto the "Freebie"-Area and open "Here is a handy
set of tuts "

I think you find your questions covered in the video tuts and by having a look
at the example file.

Hope this helps.

Regards

MIBtwo
MIBtwo
11/1/2006 3:07:12 PM
...another good (even if older ressource) can be found here.

http://www.adobe.com/devnet/flashcom/articles/first_comm_app.html

It refers to FCS 1.x and Flash MX, but the things did not change dramatical.
Just one hint : Deploy your application for Flash Player 6 with Actionscript
1.0, the Communication Components (you can use those found here:
http://www.adobe.com/devnet/flashmediaserver/articles/components.html ) are
not "up-to-date", but will work for the first steps.

Cheers

MIBtwo
coolpyx1
11/1/2006 3:33:28 PM
Thanks very much MIBtwo for your links.
I 'll have a look and I 'll come back to you If you do not mind.
coolpyx1
11/1/2006 8:09:08 PM
Hello MIBtwo,
Thanks for the links but unfortunately I did not find the answer to my
problem. Here it is:
FMS2 is installed on my local machine and the visio-conference component is
working fine whith IIS local server.People can get connected from anywhere. So
I tried to do the same thing usind my web server which runs like my local
machine with windows xp pro.When I run the application locally the server
connects ok but there is no app working. My question is do I have to install
FMS2 in my outside server like I did locally. Having done this how can I get
connected with my webcamera from home .What is the right configuration or the
install procedure for using FMS2 not on a local machine.
Hope I have made myself clearer. My native language is french. That is mainly
why my english is not that smooth .
Thanks again for your answer.

MIBtwo
11/10/2006 4:31:16 AM
Hello coolpyx1,

sorry 4 the long delay...... You usually can setup your external installation
as you did it with your local one. But there is something to change in your
Flash-Applikation. In your flashfile (fla) you defined a rtmp connection( I do
assume it looked like rtmp:/app_dir or rtmp://localhost/app_dir). This must now
point to your external server (eg. if you used for the local installation
"rtmp://localhost:1935/app_dir" this should point now to
"rtmp://servername.domainname.com:1935/app_dir").
This makes the net.connection point to your external FMS application
installations app_dir wich is expected to be in the applications directory of
the remote FMS installation.
The .fla, and as result the swf can stay for first tests on your local
machine, later on you can deploy the swf (when tested and ok) to a webserver to
bring it into public access.
Asumed that the application has woked in your local installation, after
setting up the remote FMS and changing the rtmp connection string to the new
target (and not to forget : creating the add_dir and placing a main.asc
therein) your application should work now on the external server, too and you
should be able to access it from your lokal computer. It also should be
possible to connect to the FMS-ServerAdminConsole by using the external servers
fullqualified name (servername.domainname.com).

These are only the (very) basic steps. There !can! occure some problems in
communication between your local computer and the external
FMS-Installation(for example local host or Servers Firewall might block port
1111 and/or 1935), but usually this basic setup should work for a first try.
But please be aware : There is NO security setup done, yet !
It must be clear, that you better should secue your server after you tested
out that FMS is working. There is a lot to read.... about securing a Server
within the net and how to make FMS bulletproof....dont forget about that
serious point !

I hope this helped a bit

Regards MIBtwo
coolpyx1
11/10/2006 2:36:36 PM
Hello MIBtwo,
I have very much appreciated your answer.I have fully understood what you said
..
My problem is that I am using one of the flash com components called
sample_panel .It works ok on my local machine.
But the trouble is when I go to the first frame Action Script there is nothing
like rtmp.In other words the appli works locally with no rtmp connection.
Even in the main.asc there is only a "load component" file.
How then, can my application be configured so that it can be connected to the
server.
Where should I add the rtmp address?
Thanks very much for your replay.


anonymous thing
11/10/2006 3:05:41 PM
Bonjour coolpyx1,

Tu semblais dire que tu parlais mieux en français et bien je suis québécois et
pour bien se comprendre on va y aller pour le français. Pour résoudre ton
problème, selon se que j'ai compris, tu peux soit te créer une connexion
manuellement au serveur FMS ou utiliser le component "simpleconnect". Si tu te
débrouille bien en AS laisse tomber le component... je vais te donner un
exemple, très très simpliste, de connection. La deuxième chose que tu dois
savoir est que si ton serveur gère les requête Web(php, asp..) et FMS, IIS et
FMS vont rentrer en conflit pour le port 80... pour corriger sa tu dois
spécifier une nouvelle IP pour FMS et la tu pourras utiliser le port 80. Si tu
as d'autres questions n'hésite pas...


var objNetCon:NetConnection = new NetConnection();
objNetCon.onStatus = function(objData:Object){
if(objData.code == "NetConnection.Connect.Success"){
trace("erreur lors de la connexion: "+objData.code)
// connection reussie au serveur
// ....
} else {
trace("erreur lors de la connexion: "+objData.code)
}
}
objNetCon.connect(strAddresseRTMP, ...);
// connect de objNetCon va se connecter sur la methode application.onConnect
coté serveur

// sur le serveur du devrait avoir une hiéarchie du genre:
// applications/tonApp/
// ce dossier devrait avoir un fichier main.asc ou tonApp.asc
coolpyx1
11/10/2006 6:04:22 PM
Bonjour,
J'ai bien noté vos remarques.
Mais je souhaiterais préciser la nature de mon problème.
J'ai II S installé sur ma machine. J'ai testé une application "sample panel
presentation"en local et surtout j'ai utilisé ma machine comme server et j'ai
pu ainsi testé l'application avec des clients extérieurs qui se sont connectés
sans problème.
L'ActionScript de cette appli ne comporte aucun code faisant référence à "rmtp
etc"..je ne peux donc pas faire pointer mes clients vers ce server. Comme je
l'ai dit l'appli fonctionne bien depuis mon server local avec des clients
extérieurs.
Mon souhait serait de réaliser la même manipulation avec un server qui se
trouve à l'extérieur.
Je ne sais pas quelle ligne de code je dois ajouter pour que la connexion soit
possible?
Et où placer cette ligne de code?
Merci pour toutes les informations que vous voudriez bien me communiquer.
Cordialement
anonymous thing
11/10/2006 7:49:30 PM
L'exemple "panel presentation" se base sur une série de components. Pour
pouvoir spécifier l'addresse rtmp il faut sélectionner le champ texte du login,
il s'agit en fait une instance du component SimpleConnect. Dans l'inspecteur
des propriétés de flash(en général situé en bas du stage dans un panneau
rétractable) spécifier votre rtmp pour le flag "Application Directory". Votre
application devrait maintenant fonctionner.
coolpyx1
11/10/2006 8:36:02 PM
Merci infiniment. Ta r?ponse est claire.
Tu es un bon p?dagogue.J'ai pourtant plusieurs fois effecu? ce param?trage
pour d'autres applis mais je me suis ent?t? ? penser que pour celle ci il
fallait de l'Action Script ? tout prix comme j'ai cru le voir dans certains
tutos.
est-ce-que rtmp//mon IP/appli suffit.
Merci encore pour ta gentillesse et ta disponibilit?
anonymous thing
11/10/2006 9:34:58 PM
merci!

si vous ne spécifiez pas de nom d'instance pour votre application elle prendra
par défaut "_definst_". Si vous utilisez une application de type chat il est
préférable de nommer l'instance(pour créer des salles distinctes). Coté serveur
vous n'avez pas besoin de créer les dossiers d'instances
d'application("nomInstance1", "nomInstance2"...) FMS va s'en charger.

rtmp//mon IP/appli/nomInstance1
rtmp//mon IP/appli/nomInstance2
coolpyx1
11/10/2006 10:43:49 PM
Merci mille fois.Vous m'avez fait gagné des heures de recherche jusqu'ici infructueuses.
Comment puis-je revenir vers vous si j'ai un souci.?
Votre pseudo n'apparait pas.
MIBtwo
11/11/2006 2:07:13 PM
Hi coolpyx1,

does it work for you now ? Let us "not french speaking ppl" know if you sucseeded with anonymous thing's help and what makes things work.

Greets
coolpyx1
11/11/2006 4:41:51 PM
Hello MIBtwo,
Thanks very much indeed for your concern. My problem has been fixed ok.
I would like to ask you further questions if you don't mind.
1)Do we agree that IIS must work beside FMS to deliver web pages.
2)Do I have to install FMS on my outside server, as I did on my local machine.
3)When must I use the netconnection code
4) Do I always have to type "load(component in the main.asc file .Is this line
of code sufficient.
Regards

MIBtwo
11/11/2006 7:35:20 PM
Hello coolpyx1,

1. yes, you need a webserver for the webcontent (website, html and the
application's swf file). It must not be at the same machine as FMS, but it can.
2. Technically spoken : Yes, it is the same procedure.
3. That depends a bit from how your application is built..when you use the
simple connect component, you do not need to call the netconnection method,
because this component manages that. In addition it binds further components
that you define in the simple connections parameters to the established
connection . This is often enough for very simple applications like the
sample_videochat for example.
4. The "load (components.asc)" is only ONE, but maybe the most popular,
statement that can be in a servers main.asc. As you can do a complete
application in Flash with (clientside)actionscript, you can manipulate the
server and how it interacts with an application with SSAS (Serverside
Actionscript). The mentioned load statement for the components is one that
tells the Server "Hey Server, an Application needs the code pieces to work with
the Flash Components...load them...."). There is a lot more in SSAS, but this
fills Handbooks and is a bit to broad to explain in detail here in the Forum.

Regards

MIBtwo
coolpyx1
11/11/2006 8:15:18 PM
Hello MIBtwo,
Many thanks MIBtwo, you have been of a great help.
Take care and God bless you
AddThis Social Bookmark Button