Publishing > About security protection in Macromedia Flash MX movies |  |

About security protection in Macromedia Flash MX movies

For security reasons, a Macromedia Flash MX movie is not permitted to access ActionScript objects and variables (including functions, movie clips, text fields, and variables) in another Macromedia Flash MX movie loaded from a different Internet domain. Attempts to access cross-domain data will be ignored by the Flash Player 6.

In order for two Macromedia Flash MX movies to share objects and variables, both movies must reside in the same domain, or in compatible subdomains of the same top-level domain.

The basis of domain comparison is domain name, not IP address. This means that two domains that resolve to the same IP address are not necessarily compatible; the names themselves must be compared.

The following rules determine compatibility:

| If two domains are identical, they are compatible. This is the only way that numerically specified domains can be compatible.
| Any non-numerically-specified domain that consists of three or more components (names separated by dots) may be reduced by removing the first (and only the first), leftmost, most specific component.
| Two domains are compatible if reducing either or both of them (as described above) results in an identical domain.

Any two domains that do not meet the requirements described above are incompatible.

Here are some examples of compatible domains. In each row, the domain on the left is compatible with the domain on the right:

foobar.com | foobar.com
blah.foobar.com | foobar.com
thing.foobar.com | blah.foobar.com
wonderful.thing.foobar.com | thing.foobar.com
10.12.0.92 | 10.12.0.92

Here are some examples of incompatible domains. In each row, the domain on the left is incompatible with the domain on the right:

foobar.com | blagga.com
blah.foobar.com | blagga.com
blah.foobar.com | blah.blagga.com
wonderful.thing.foobar.com | foobar.com
wonderful.thing.foobar.com | blah.foobar.com
foobar.com | 10.12.0.92
10.12.0.92 | 10.12.0.93

This security feature affects Macromedia Flash MX movies only. Flash 4 and Flash 5 movies are able to access objects and variables from other Flash 4 or Flash 5 movies in different domains, and from Flash MX movies in the same domain. However, Flash 4 or Flash 5 movies are not able to access objects and variables from Flash MX movies in a different domain.

You can override the security feature and enable a Flash MX movie to permit access to its objects and variables for a Flash MX movie in a different domain. You use the System.security.allowDomain command to identify the domains that can have access to the objects and variables in the movie. For more information, see Flash Help (Help > ActionScript Dictionary > System.security.allowDomain).