Closed Bug 1035166 Opened 6 years ago Closed 5 years ago

Wrap AS2 SWFs into AVM1Movie instances and use them as _levelN holder

Categories

(Firefox Graveyard :: Shumway, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: till, Assigned: yury)

References

Details

(Whiteboard: [as2])

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: nobody → till
Blocks: shumway-m3
No longer blocks: shumway-1.0
Status: NEW → ASSIGNED
Priority: -- → P2
Blocks: shumway-m4
No longer blocks: shumway-m3
Priority: P2 → P4
No longer blocks: shumway-m4
Fixed by https://github.com/mozilla/shumway/pull/2356
Assignee: till → ydelendik
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.