This content has been marked as final. Show 2 replies
"richard.szalay" <email@example.com> wrote in message
>A question for the AVM2 engineers here.
> I am the author of http://asmock.sourceforge.net/, a dynamic object
> framework, and am looking at a few features to add before 1.0. One of the
> biggest features I'd like to support is the ability to mock a "nested"
> namespace) class.
> I know that subclassing a nested class outside the "code file" is illegal,
> I have assumed that the AVM will let me do it as long as I setup the DoABC
> Based on dumps of valid SWFs that do this, there does not seem to be
> special about the classes. Both the child and the parent are declared with
> private ns multiname (0x05) and the members are declared as public traits
> the class. The ns used is copied directly from the parent (for nested
> and is always "Filename.as$number". However, during loadBytes, I get a
> ValidateError: "Class
> MockRepositoryNestedClassIntegrationFixture.as$452::NestedClass could not
> Is there anything I might have missed? Or, alternatively, is there an
> AVM restriction that nested classes can only be subclassed within the SWF
> were loaded from?
I think you're more likely to find someone who knows the framework and the
player in this kind of detail on the flexcoders yahoo group.
Thanks Amy, I'll shoot the question over to that group and see if I have any luck.
To anyone else still monitoring the question here, an update:
I realised that I was not marking my child class with the protected_namespace flag. I added this (and the ns to go with it), and now my generated BC looks the same as it does in the source swf. Unfortunately, I still get the same error as above.
Any help would be appreciated.