List Info

Thread: accessing global methods with swf loaded across domains




accessing global methods with swf loaded across domains
user name
2007-11-14 07:59:38
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
cheers
Mariano
Re: accessing global methods with swf loaded across domains
user name
2007-11-15 06:57:26
Hi Mariano,

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
system.

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.


good luck,
till

On Nov 14, 2007 2:59 PM, Mariano Cerrutti <vscorzagmail.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
> cheers
> Mariano
>
> _______________________________________________
> osflash mailing list
> osflashosflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>

_______________________________________________
osflash mailing list
osflashosflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )