User Guide

Porting existing scripts to Flash Player 7 15
Domain-name rules for settings and local data
In Flash Player 6, superdomain matching rules are used by default when accessing local settings
(such as camera or microphone access permissions) or locally persistent data (shared objects).
That is, the settings and data for SWF files hosted at here.xyz.com, there.xyz.com, and xyz.com
are shared and are all stored at xyz.com.
In Flash Player 7, exact-domain matching rules are used by default. That is, the settings and data
for a file hosted at here.xyz.com are stored at here.xyz.com, the settings and data for a file hosted
at there.xyz.com are stored at there.xyz.com, and so on.
A new property,
System.exactSettings, lets you specify which rules to use. This property is
supported for files published for Flash Player 6 or later. For files published for Flash Player 6, the
default value is
false, which means superdomain matching rules are used. For files published for
Flash Player 7, the default value is
true, which means exact-domain matching rules are used.
If you use settings or persistent local data and want to publish a Flash Player 6 SWF file for Flash
Player 7, you might need to set this value to
false in the ported file.
For more information, see
System.exactSettings in Flash ActionScript Language Reference
Help.
Cross-domain and subdomain access between SWF files
When you develop a series of SWF files that communicate with each other—for example, when
using
loadMovie(), MovieClip.loadMovie(), MovieClipLoader.LoadClip(), or Local
Connection objects—you might host the SWF files in different domains or in different
subdomains of a single superdomain.
When undefined is converted to a string, the result is
undefined.
firstname = "Joan ";
lastname = "Flender";
trace(firstname + middlename + lastname);
// Joan undefinedFlender
When undefined is converted to a string, the
result is an empty string ("").
firstname = "Joan ";
lastname = "Flender";
trace(firstname + middlename + lastname);
// Joan Flender
When you convert a string to a Boolean value, the
result is
true if the string has a length greater than
zero; the result is
false for an empty string.
When you convert a string to a Boolean value,
the string is first converted to a number; the
result is
true if the number is nonzero, false
otherwise.
When setting the length of an array, only a valid
number string sets the length. For example, "6"
works but " 6" or "6xyz" does not.
my_array=new Array();
my_array[" 6"] ="x";
trace(my_array.length); // 0
my_array["6xyz"] ="x";
trace(my_array.length); // 0
my_array["6"] ="x";
trace(my_array.length); // 7
When setting the length of an array, even a
malformed number string sets the length.
my_array=new Array();
my_array[" 6"] ="x";
trace(my_array.length); // 7
my_array["6xyz"] ="x";
trace(my_array.length); // 7
my_array["6"] ="x";
trace(my_array.length); // 7
SWF file published for Flash Player 7 SWF file published for earlier versions of
Flash Player