-
-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_root, _parent, _global are not members of MovieClip.prototype #768
Labels
A-avm1
Area: AVM1 (ActionScript 1 & 2)
Comments
This was referenced Oct 18, 2021
Herschel
added a commit
to Herschel/ruffle
that referenced
this issue
May 8, 2022
…rs#768) Remove `_root`, `_parent` and `_global` from `MovieClip.prototype`. Instead, these are "magic" properties similar to `_x` and `_y`. Add `StageObject::resolve_path_property` to handle these, alongside the `_levelN` property. Fixes ruffle-rs#768.
Herschel
added a commit
to Herschel/ruffle
that referenced
this issue
May 8, 2022
Herschel
added a commit
that referenced
this issue
May 10, 2022
Remove `_root`, `_parent` and `_global` from `MovieClip.prototype`. Instead, these are "magic" properties similar to `_x` and `_y`. Add `StageObject::resolve_path_property` to handle these, alongside the `_levelN` property. Fixes #768.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we cheat by putting
_root
,_parent
, and_global
as properties on the prototype of MovieClip, Button, etc., but this isn't correct:trace(MovieClip.prototype.hasOwnProperty("_root")); // false in Flash, true in Ruffle
Instead, these should be "special" properties inherent to
StageObject
, similar to_x
,_y
, and_rotation
. The tricky part is that_root
,_parent
, and_global
respect case-sensitivity, unlike the other special properties. That is,_RoTaTiOn
works regardless of SWF version, but_RoOt
only works in SWFv6 and below.The text was updated successfully, but these errors were encountered: