avm1: Root clip should not have a name
Previously we set the name of the root clip to `_level0`. Top-level clips should actually have no name (`_root._name` returns `""`). However, when constructing a dot path, `_level0` still gets inserted by `DisplayObject::path` for the top-level, so that `trace(_root)` still correctly prints `_level0`. TODO: When `loadMovieNum` gets merged in, the proper level # needs to be returned by `.DisplayObject::path`.
This commit is contained in:
parent
0446644742
commit
2751b89d4e
|
@ -575,7 +575,8 @@ pub trait TDisplayObject<'gc>: 'gc + Collect + Debug {
|
|||
path.push_str(&*self.name());
|
||||
path
|
||||
} else {
|
||||
self.name().to_string()
|
||||
// TODO: Get the actual level # from somewhere.
|
||||
"_level0".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -237,7 +237,6 @@ impl<
|
|||
let root_data = gc_root.0.write(gc_context);
|
||||
let mut root = root_data.root;
|
||||
root.post_instantiation(gc_context, root, root_data.avm.prototypes().movie_clip);
|
||||
root.set_name(gc_context, "_level0");
|
||||
});
|
||||
|
||||
player.build_matrices();
|
||||
|
|
Loading…
Reference in New Issue