@@ -1765,9 +1765,6 @@ pub trait TDisplayObject<'gc>:
17651765 /// Returns the dot-syntax path to this display object, e.g. `_level0.foo.clip`
17661766 #[ no_dynamic]
17671767 fn path ( self ) -> WString {
1768- // FIXME this method doesn't work correclty when this DO is from an
1769- // AVM2 movie that was loaded into AVM1
1770-
17711768 if let Some ( parent) = self . avm1_parent ( ) {
17721769 let mut path = parent. path ( ) ;
17731770 path. push_byte ( b'.' ) ;
@@ -1855,14 +1852,14 @@ pub trait TDisplayObject<'gc>:
18551852 /// Retrieve the parent of this display object.
18561853 ///
18571854 /// This version of the function implements the concept of parenthood as
1858- /// seen in AVM1. Notably, it disallows access to the `Stage` and to
1859- /// non-AVM1 DisplayObjects ; for an unfiltered concept of parent,
1860- /// use the `parent` method.
1855+ /// seen in AVM1. Notably, it disallows access to the `Stage` and to a
1856+ /// `LoaderDisplay` ; for an unfiltered concept of parent, use the `parent`
1857+ /// method.
18611858 #[ no_dynamic]
18621859 fn avm1_parent ( self ) -> Option < DisplayObject < ' gc > > {
18631860 self . parent ( )
18641861 . filter ( |p| p. as_stage ( ) . is_none ( ) )
1865- . filter ( |p| !p . movie ( ) . is_action_script_3 ( ) )
1862+ . filter ( |p| p . as_loader_display ( ) . is_none ( ) )
18661863 }
18671864
18681865 /// Retrieve the parent of this display object.
@@ -2868,6 +2865,7 @@ impl<'gc> DisplayObject<'gc> {
28682865 pub fn as_morph_shape for MorphShape ;
28692866 pub fn as_video for Video ;
28702867 pub fn as_bitmap for Bitmap ;
2868+ pub fn as_loader_display for LoaderDisplay ;
28712869 }
28722870
28732871 pub fn as_interactive ( self ) -> Option < InteractiveObject < ' gc > > {
0 commit comments