72
Client-Side ActionScript Language Reference
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 in the following example:
// Record Monday’s lecture.
my_nc.connect("rtmp://www.myserver.com/lectureSeries/Monday");
// Later ...
my_ns.connect(my_nc);
my_ns.publish("lecture", "record");
// Record Tuesday’s lecture.
my_nc.connect("rtmp://www.myserver.com/lectureSeries/Tuesday");
// Later ...
my_ns.connect(my_nc);
my_ns.publish("lecture", "record");
// and so on
// Play back one of the lectures.
my_nc.connect("rtmp://www.myserver.com/lectureSeries/Monday");
// Later ...
my_ns.connect(my_nc);
my_ns.play("lecture")
You can also nest instance names, as shown in the following example:
my_nc.connect("rtmp://www.myserver.com/chatApp/peopleWhoSew/Monday")
my_nc.connect("rtmp://www.myserver.com/chatApp/peopleWhoSew/Tuesday")
For information on where recorded streams are stored on the server, see
NetStream.publish()
.
Understanding file naming and domains used with this method
If an HTML page
containing a SWF file is accessed differently (with regards to domain names) from the way the
SWF file itself accesses the Flash Media Server, then the connection will not be successful.
This is a security feature of Flash Player. But in some cases, this may be inconvenient.
For example, if a web page containing a SWF file is served on an intranet from, say, http://
deptserver.mycorp.com, it can also be accessed simply by http://deptserver. If the page is
accessed via, say, http://deptServer/tcpage.htm, but the SWF file specifies
deptServer.mycorp.com in
targetURI
, then the SWF file will not make a successful
connection to the server. Similarly, if the web page and SWF file are accessed as http://
deptserver.mycorp.com/tcpage.htm, but the SWF file specifies rtmp://deptserver in
targetURI
, it will not connect.
Содержание FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER...
Страница 1: ...Client Side ActionScript Language Reference for Flash Media Server 2...
Страница 4: ...4 Contents...
Страница 148: ...148 Client Side ActionScript Language Reference...