diff --git a/core/src/avm1.rs b/core/src/avm1.rs index a590fe242..0ebe0e9b2 100644 --- a/core/src/avm1.rs +++ b/core/src/avm1.rs @@ -986,7 +986,7 @@ impl<'gc> Avm1<'gc> { /// Obtain the value of `_root`. pub fn root_object(&self, context: &mut ActionContext<'_, 'gc, '_>) -> Value<'gc> { - context.start_clip.read().object() + context.root.read().object() } /// Obtain the value of `_global`. diff --git a/core/src/player.rs b/core/src/player.rs index b1f004e2e..50f9c9911 100644 --- a/core/src/player.rs +++ b/core/src/player.rs @@ -127,6 +127,13 @@ impl is_mouse_down: false, }; + player.gc_arena.mutate(|gc_context, gc_root| { + gc_root + .root + .write(gc_context) + .post_instantiation(gc_context, gc_root.root) + }); + player.build_matrices(); player.preload();