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

RESOLVED FIXED

Status

defect
P4
normal
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: till, Assigned: yury)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [as2])

(Reporter)

Description

5 years ago
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.
(Reporter)

Comment 1

5 years ago
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.
(Reporter)

Updated

5 years ago
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
(Assignee)

Comment 2

4 years ago
Fixed by https://github.com/mozilla/shumway/pull/2356
Assignee: till → ydelendik
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.