Using Naming Conventions - MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference

Server-side actionscript language reference
Table of Contents

Advertisement

4.
Place the main.asc file in the appName directory or in a subdirectory called scripts in the
appName directory.
5.
Open the Flash application (the SWF file) in a browser or in the stand-alone Flash Player.
The SWF file must contain ActionScript code that passes appName to the
method of the NetConnection class, as shown in the following example:
nc = new NetConnection();
nc.connect("rtmp://flashcomsvr.mydomain.com/myFlashComAppName");
You can use the management console to check if the application loaded
successfully.

Using naming conventions

When you write server-side ActionScript code, there are certain naming conventions that you
must use to name your applications, methods, properties, and variables. These rules let you
logically identify objects so your code executes properly.
Naming applications
Flash Media Server application names must follow the
RFC 2396
convention. 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.
Uniform Resource Identifier (URI)
Using naming conventions
connect
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash media server 2

Table of Contents