Does anyone know how AS3/Flash runtime handles trying to modify the prototype when working between sandboxes. In particular I create object O in sandbox A, then pass it to SandBox B. What is the effect if code in sandbox B tries to modify the prototype ? (do the objects in A of the same class see this ?). Can Sandbox B overwrite public fields and methods of the object created in sandbox A ( if the object is passed in as a param)? Is it possible to create an unmodifiable class (ie. the equivalent of say final in java) that can act as a ready only proxy to pass between loaded swf's and the main swf ? I know the event class can use clone() to sort of do this, and then pass the events between the 2 swf's. Is using a final class in AS3 the right way to create read only proxies that can't be modified at all ?
you can always use the flash.utils.Proxy class, if you want a read only proxy to some object ...
ActionScript3 is not prototype based as 1 and 2 were (you would need to compile to ecma object mode, which comes at huge speed decrease) ...
it now has 2 inheritance mechanisms ... one is class based, and the other is prototype based and works only for dynamic properties of dynamic classes ... no sealed (i.e. not dynamic) class and no sealed property or sealed method of a dynamic class can be modified at runtime ... by modifying a property, i mean modifying its type, or adding a setter at runtime, or overwriting it ... if the property is writable, you can of course assign something to it ...
final only means, it cannot be subclassed ...
as far as i know, as soon as you pass an object O from sandbox A to B, code in B can access O very much the same way as code in A does ...
i don't know, if that answers you question ... maybe you could explain, what exactly you're up to ... :)