MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Spécifications Page 250

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 369
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 249
Client-Side Communication ActionScript 59
If your connection fails, make sure you have met all the requirements for connecting successfully:
You are specifying the correct protocol name for connecting to the server (rtmp for the Flash
Communication Server).
You are connecting to a valid application on the correct server.
You have a subdirectory in the FlashCom application directory with the same name as the
application.
The server is running.
To distinguish among different instances of a single application, pass a value for
instanceName as
part of
targetURI. For example, you may want to give different groups of people access to the
same application without having them interact with each other. To do so, you can open multiple
chat rooms at the same time, as shown below.
nc.connect("rtmp://www.myserver.com/chatApp/peopleWhoSew")
nc.connect("rtmp://www.myserver.com/chatApp/peopleWhoKnit")
In another case, you may have an application named “lectureSeries” that records and plays back
classroom lectures. To save individual lectures, pass a different value for
instanceName each time
you record a lecture, as shown below.
// Record Monday’s lecture
nc.connect("rtmp://www.myserver.com/lectureSeries/Monday");
...
ns.connect(nc);
ns.publish("lecture", "record");
// Record Tuesday’s lecture
nc.connect("rtmp://www.myserver.com/lectureSeries/Tuesday");
...
ns.connect(nc);
ns.publish("lecture", "record");
// and so on
// Play back one of the lectures
nc.connect("rtmp://www.myserver.com/lectureSeries/Monday");
...
ns.connect(nc);
ns.play("lecture")
You can also nest instance names, as shown below.
nc.connect("rtmp://www.myserver.com/chatApp/peopleWhoSew/Monday")
nc.connect("rtmp://www.myserver.com/chatApp/peopleWhoSew/Tuesday")
For information on where recorded streams are stored on the server, see NetStream.publish.
Vue de la page 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 368 369

Commentaires sur ces manuels

Pas de commentaire