Creating a development environment
This section explains what you need to know before you create Flash Media Server
applications.
Make sure the server is running
must be running. For more information, see
Specifying the server URI
that is running the Flash Media Server. If that isn't the case, add your server name to all of the
commands documented here. For example, if your server is running at
connect
myServer.myDomain.com
new_nc.connect("rtmp:/doc_record/room_01");
to this:
new_nc.connect("rtmp://myServer.myDomain.com/doc_record/room_01");
Be sure you use two slashes (//) after rtmp: in the revised code. The use of a single slash
is supported only when the SWF application is served from the same computer where
Flash Media Server is running.
Specifying publishing formats
specify formats to be created during publishing, select File > Publish Settings in the authoring
environment.
Writing client-side ActionScript code
ActionScript code should be attached to a layer on the first keyframe of your FLA file, not to
individual objects. Client-side code in files published for Flash Player 7 or later is case-
sensitive.
Writing server-side ActionScript code
code, place the code in a server-side script file. Name the file main.asc (or it can have a name
such as registered_app_name.asc) and use the Flash ActionScript Editor or the JavaScript editor
to write it. Server-side code is case-sensitive.
Loading components.asc
components.asc file, located in the scriptlib directory. To load this file, create a server-side
script file for your application, if you haven't already, name it appropriately (such as main.asc),
and add the following code at the top:
load("components.asc");
You might find it sufficient to copy this file into any application directory that uses media
components, but be sure to name it appropriately.
To publish and test your applications, Flash Media Server
"Starting the service" on page
Use the Flash authoring environment on the same computer
, change a line like this:
Configure Flash to publish both SWF and HTML files. To
Unless otherwise noted, your client-side
For applications that use server-side ActionScript
To use media components in any application, you must load the
19.
Creating a development environment
13
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-DEVELOPING MEDIA and is the answer not in the manual?
Questions and answers