[osflash] accessing global methods with swf loaded across domains
tschneidereit at gmail.com
Thu Nov 15 04:57:26 PST 2007
the short answer: You can't access global methods defined in other domains.
The Flashplayer creates new _global objects for each SecurityDomain,
which can't be accessed by code from other domains.
What you could do is create some sort of exchange object on _level0
or, better yet, change the data exchange to some interface based
Note that, in order to be able to access objects from other
SecurityDomains in a strongly typed way, you have to import the
classes from a shared library instead of defining them in the loaded
modules themselves. And even then, you might have the weird situation
that something like
myNumberFromAnotherSecurityDomain instanceof Number evaluates to
"false" because, really, 'Number' is a type defined in the
SecurityDomain and so it differs from one SecurityDomain to another.
On Nov 14, 2007 2:59 PM, Mariano Cerrutti <vscorza at gmail.com> wrote:
> Hi List:
> I have this little problem giving me big headaches. We have an application
> consisting in a container swf that loads games within itself. The
> containing application (swf) is embedded in a jsp file that loads it from
> another server.
> The problem is: we are defining a common interface to communicate the
> remote-loaded games with the remote-loaded containing swf via _global
> methods. Once we run it in remote, the _global methods are not accesible
> anymore. System.Security.allowDomain have no effect whatsoever. Anyone has
> a clue about this?
> Thanks in advance
> osflash mailing list
> osflash at osflash.org
More information about the osflash