Currently, we set the AS2MovieClip we create for AVM1 SWFs as Loader#content. Instead, we should wrap it into an `AVM1Movie` instance. Besides enabling support for loading AVM1 SWFs into AVM2 ones, this would also give us a nice place to hang the _levelN stuff off of. Right now, we have a hack in place that just stores `_level0` and `_root` vars in the AS2Globals instance. That needs to be changed to enable dynamic changing of these properties, and addition of more levels. We could do all this in AVM1Movie, where we could keep a mapping from levelNum to the dense Array of AS3 children we have for the different SWFs loaded into the levels.
Oh, and the levels and _root should then be turned into virtual variables/properties. I.e., in `as2ResolveProperty`, the `isAS2MovieClip(obj)` block should check if `name` is `_root` or matches `_level[N]` and, if true, look up the target on the AVM1Movie instance. That'd also make their behavior correct in that mc.hasOwnProperty('_root') wouldn't return true anymore.
Assignee: till → ydelendik
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.