fn preload(&mut self) {
        self.mutate_with_update_context(|context| {
            let mut morph_shapes = fnv::FnvHashMap::default();
            let root = context.stage.root_clip();
            root.as_movie_clip()
                .unwrap()
                .preload(context, &mut morph_shapes);

            let lib = context
                .library
                .library_for_movie_mut(root.as_movie_clip().unwrap().movie().unwrap());

            // Finalize morph shapes.
            for (id, static_data) in morph_shapes {
                let morph_shape = MorphShape::new(context.gc_context, static_data);
                lib.register_character(id, crate::character::Character::MorphShape(morph_shape));
            }
        });
        if self.swf.avm_type() == AvmType::Avm2 && self.warn_on_unsupported_content {
            self.ui.display_unsupported_message();
        }
    }
/// Preload the first movie in the player.
///
/// This should only be called once. Further movie loads should preload the
/// specific `MovieClip` referenced.
Preload the first movie in the player.
This should only be called once. Further movie loads should preload the
specific `MovieClip` referenced.
Preload the first movie in the player . This should only be called once . Further movie loads should preload the specific ` MovieClip ` referenced .
fn preload(&mut self) {
        self.mutate_with_update_context(|context| {
            let mut morph_shapes = fnv::FnvHashMap::default();
            let root = context.stage.root_clip();
            root.as_movie_clip()
                .unwrap()
                .preload(context, &mut morph_shapes);
            let lib = context
                .library
                .library_for_movie_mut(root.as_movie_clip().unwrap().movie().unwrap());
            // Finalize morph shapes.
            for (id, static_data) in morph_shapes {
                let morph_shape = MorphShape::new(context.gc_context, static_data);
                lib.register_character(id, crate::character::Character::MorphShape(morph_shape));
            }
        });
        if self.swf.avm_type() == AvmType::Avm2 && self.warn_on_unsupported_content {
            self.ui.display_unsupported_message();
        }
    }
fn preload ( & mut self ) { self . mutate_with_update_context ( | context | { let mut morph_shapes = fnv :: FnvHashMap :: default ( ) ; let root = context . stage . root_clip ( ) ; root . as_movie_clip ( ) . unwrap ( ) . preload ( context , & mut morph_shapes ) ; let lib = context . library . library_for_movie_mut ( root . as_movie_clip ( ) . unwrap ( ) . movie ( ) . unwrap ( ) ) ; // Finalize morph shapes. for ( id , static_data ) in morph_shapes { let morph_shape = MorphShape :: new ( context . gc_context , static_data ) ; lib . register_character ( id , crate :: character :: Character :: MorphShape ( morph_shape ) ) ; } } ) ; if self . swf . avm_type ( ) == AvmType :: Avm2 && self . warn_on_unsupported_content { self . ui . display_unsupported_message ( ) ; } }
Preload the first movie in the player.
Preload the first movie in the player .
&mut self
&mut self