82
Application Development Tips and Tricks
To avoid overwriting streams, consider using unique names for users, streams, and so on. For
example, when recording a new stream, you could provide an incremental value:
outStream.publish("myRecording" + numSnaps, "record");
For information on deleting recorded stream files, see
“The Stream class” on page 55
. For
more information on instance names and file storage, see the
NetConnection.connect()
and
NetStream.publish()
entries in the
Client-Side ActionScript Language Reference for Flash
Media Server 2
.
About shared object files
Any shared object, either local or remote, can exist dynamically (for the life of the application
instance) or can be saved for use as persistent data. This section discusses the three types of
persistent shared objects you can create: persistent local shared objects, remote shared objects
that are persistent only on the server, and remote shared objects that are persistent on the
client and the server. (For more information on shared objects in general, see
“Understanding
shared objects” on page 41
.)
Local shared objects are always persistent on the client, up to available memory and disk
space. However, by default Flash can save locally persistent remote shared objects only up to
100 K in size. When you try to save a larger object, Flash Player displays a Local Storage
dialog box, which lets the user allow or deny local storage for the domain that is requesting
access. The user can also use this dialog box to delete all locally persistent remote shared
objects. For more information, see “Local disk space considerations” in the SharedObject
entry of the
Client-Side Media ActionScript Dictionary
.
Persistent local shared objects
You create persistent local shared objects by using the client-side
SharedObject.getLocal()
command. Persistent local shared objects have the extension .sol. You can specify a storage
directory for the object by passing a value for the
localPath
parameter of the
SharedObject.getLocal()
command.
NO
TE
This section assumes that you are passing an instance name along with your application
name (see
“Deploying applications and application instances” on page 15
). If you don’t
pass an instance name, Flash Media Server stores files in a subdirectory named
\_definst_ (for “default instance”) in your registered application’s directory.
Summary of Contents for FLASH MEDIA SERVER 2-DEVELOPING MEDIA
Page 1: ...Developing Media Applications ...
Page 6: ...6 ...
Page 10: ...10 About This Manual ...
Page 36: ...36 Flash Media Server Architecture ...
Page 80: ...80 Debugging and Monitoring Applications ...
Page 106: ...106 Application Development Tips and Tricks ...
Page 114: ...114 ...