MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 1088

Actionscript 2.0 language reference
Table of Contents

Advertisement

To avoid name collisions, Flash looks at the location of the SWF file that is creating the shared
object. For example, if a SWF file at www.myCompany.com/apps/stockwatcher.swf creates a
shared object named
named
that was created by a SWF file at www.yourCompany.com/photoshoot.swf
portfolio
because the SWF files originate from different directories.
Although the
localPath
especially if other SWF files need to access the shared object. If the data in the shared object is
specific to one SWF file that will not be moved to another location, then use of the default
value makes sense. If other SWF files need access to the shared object, or if the SWF file that
creates the shared object will later be moved, then the value of this parameter affects whether
any SWF files are able to access the shared object. For example, if you create a shared object
with
set to the default value of the full path to the SWF file, then no other SWF
localPath
file can access that shared object. If you later move the original SWF file to another location,
then not even that SWF file can access the data already stored in the shared object.
You can reduce the likelihood that you will inadvertently restrict access to a shared object by
using the
localpath
parameter to "/", which makes the shared object available to all SWF files in the domain, but
increases the likelihood of name collisions with other shared objects in the domain. More
restrictive options are available to the extent that you can append the
with folder names that are contained in the full path to the SWF file; for example, your
parameter options for the
localPath
www.myCompany.com/apps/stockwatcher.swf are: "/"; "/apps"; and "/apps/
stockwatcher.swf". You need to determine which option provides optimal flexibility for your
application.
When using this method, consider the Flash Player security model:
You cannot access shared objects across sandbox boundaries.
Users can restrict shared object access via the Flash Player Settings dialog box, or the
Settings Manager. By default, shared objects can be created up to a maximum of 100K of
data per domain. Administrative users and users can also place restrictions on the ability to
write to the file system.
1088
ActionScript classes
, that shared object does not conflict with another object
portfolio
parameter is optional, you should give some thought to its use,
parameter. The most permissive option is to set the
portfolio
localPath
shared object created by the SWF file at
localPath
parameter

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents