
Server-Side Communication ActionScript 7
Naming applications
Flash Communication Server application names must follow the Uniform Resource Identifier
(URI) RFC 2396 convention (see http://www.w3.org/Addressing/). This convention supports a
hierarchical naming system where a forward slash (/) separates the elements in the hierarchy. The
first element specifies the application name. The element following the application name specifies
the application instance name. Each instance of the application has its own script environment.
Specifying instances
By specifying a unique application instance name after an application name, you can run multiple
instances of a single application. For example, rtmp:/support/session215 specifies a customer
support application named “support” and refers to a specific session of that application named
“session215”. All users who connect to the same instance name can communicate with each other
by referencing the same streams or shared objects.
Using JavaScript syntax
You must follow all syntax rules of JavaScript. For example, JavaScript is case-sensitive and does
not allow punctuation other than underscores (_) and dollar signs ($) in names. You can use
numbers in names, but names cannot begin with a number.
Avoiding reserved commands
Flash Communication Server has reserved commands that you cannot use in a script. These
commands are either that methods belong to the client-side NetConnection object or methods
that belong to the server-side Client object. This means that if you have a NetConnection object
on the client (player), you cannot make the following call:
nc.call( "reservedCmd", ... );
In this call, "reservedCmd" is any of the following commands: closeStream, connect,
createStream, deleteStream, onStatus, pause, play, publish, receiveAudio,
receiveVideo, or seek. It also cannot be any of the server-side Client object methods:
getBandwidthLimit, setBandwidthLimit, getStats, and ping.
Contents of the dictionary
All dictionary entries are listed alphabetically. However, methods, properties, and event handlers
that are associated with an object are listed along with the object’s name—for example, the
name
property of the Application object is listed as
Application.name. The following table helps you
locate these elements.
ActionScript element See entry
acceptConnection Application.acceptConnection
addHeader NetConnection.addHeader
agent Client.agent
application Application (object)
bufferTime Stream.bufferTime
call Client.call, NetConnection.call
clear SharedObject.clear, Stream.clear
Commenti su questo manuale