diff --git a/core/src/display_object/movie_clip.rs b/core/src/display_object/movie_clip.rs index 02db84b..88f043e 100644 --- a/core/src/display_object/movie_clip.rs +++ b/core/src/display_object/movie_clip.rs @@ -18,6 +18,7 @@ use std::collections::{BTreeMap, HashMap}; use std::convert::TryFrom; use std::sync::Arc; use swf::read::SwfRead; +use swf::Tag; type FrameNumber = u16; @@ -316,6 +317,10 @@ impl<'gc> MovieClip<'gc> { .0 .write(context.gc_context) .preload_sound_stream_block(context, reader, cur_frame, &mut static_data, tag_len), + TagCode::FileAttributes => self + .0 + .write(context.gc_context) + .file_attributes(context,reader), _ => Ok(()), }; let _ = tag_utils::decode_tags(&mut reader, tag_callback, TagCode::End); @@ -2129,6 +2134,22 @@ impl<'gc, 'a> MovieClipData<'gc> { } Ok(()) } + fn file_attributes( + &mut self, + context: &mut UpdateContext<'_, 'gc, '_>, + reader: &mut SwfStream<&'a [u8]>, + ) -> DecodeResult { + let flags = reader.read_u32()?; + let realflags = swf::FileAttributes { + use_direct_blit: (flags & 0b01000000) != 0, + use_gpu: (flags & 0b00100000) != 0, + has_metadata: (flags & 0b00010000) != 0, + is_action_script_3: (flags & 0b00001000) != 0, + use_network_sandbox: (flags & 0b00000001) != 0, + }; + std::println!("is action script 3: {}", realflags.is_action_script_3); + Ok(()) + } } /// Static data shared between all instances of a movie clip.