Create the server-side ActionScript file and name it main.asc. All ActionScript code that is
embedded in the script file and not in a function body executes once when the application is
loaded but before the
You can name your server-side ActionScript file app_name, where app_name is the
name of your application's directory, and save it with a file extension of .asc or .js. Also,
any double-byte characters (including characters of all Asian languages) in the server-
side ActionScript file must be UTF-8-encoded. For more information on server-side
Developing Media Applications
script files, see
For large-scale applications, you may need to use multiple server-side script files. You
can use the Flash Media Server archive compiler utility to deploy those files as a
package from a single location. For more information, see "
server-side script files
Server-side scripts also have a secure loading phase, during which critical code can be
loaded before the main application loading phase. Server-side scripts also let you create
protected objects
manipulated. These two features allow you to implement
data and functions. For more information, see
Developing Media Applications
To install and test the server-side ActionScript file:
1.
Locate the Macromedia Flash Media Server /applications directory.
The default location of the /applications directory is in the Macromedia Flash Media
Server product installation directory.
If you did not accept the default installation settings and you aren't sure where the
/application directory is located, the location is specified in the
Vhost.xml file, which is located at /Flash Media Server /conf/defaultRoot/
defaultVhost. For information about configuring a different application directory, see
Managing Flash Media Server. Although your SWF and HTML files should be
published under a web server directory, your server-side ASC files, your audio/video
FLV files, and your ActionScript FLA source files should not be accessible to a user
browsing your website.
2.
Your server-side script file must be named main.asc, main.js, registered_app_name.asc, or
registered_app_name.js.
3.
Create a subdirectory in the /applications directory called appName, where appName is a
name you choose as the filename of your Flash Media Server application. You must pass
this name as a parameter to the
ActionScript.
6
Server-Side ActionScript Language Reference
application.onAppStart
Developing Media Applications
" in
; these are objects whose methods and data cannot be inspected or
.
NetConnection.connect()
event handler is called.
.
Archiving and compiling
.
system calls
"Implementing secure system objects"
method in the client-side
that protect critical
in
tag of the
AppsDir
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?