ABC files are always pre-loaded.
Frame actions are handled as syntactic sugar on top of a `MovieClip` subclass and event handlers. ABC scripts do not live on the normal timeline.
This commit is contained in:
parent
502936f0fe
commit
560900e708
|
@ -68,16 +68,10 @@ impl<'gc> Avm2<'gc> {
|
|||
/// Load an ABC file embedded in a `SwfSlice`.
|
||||
///
|
||||
/// The `SwfSlice` must resolve to the contents of an ABC file.
|
||||
///
|
||||
/// The `preload` flag indicates if the file is being encountered as part
|
||||
/// of a preloading operation. If false, then this file has actually been
|
||||
/// encountered as part of normal movie playback and it's final script
|
||||
/// should be executed.
|
||||
pub fn load_abc(
|
||||
&mut self,
|
||||
abc: SwfSlice,
|
||||
context: &mut UpdateContext<'_, 'gc, '_>,
|
||||
preload: bool,
|
||||
) -> Result<(), Error> {
|
||||
let mut read = Reader::new(abc.as_ref());
|
||||
|
||||
|
|
|
@ -252,10 +252,6 @@ pub enum ActionType<'gc> {
|
|||
name: String,
|
||||
is_lazy_initialize: bool,
|
||||
abc: SwfSlice,
|
||||
|
||||
/// Whether or not this ABC file was encountered during the preloading
|
||||
/// step.
|
||||
preload: bool,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -294,13 +290,11 @@ impl fmt::Debug for ActionType<'_> {
|
|||
name,
|
||||
is_lazy_initialize,
|
||||
abc,
|
||||
preload,
|
||||
} => f
|
||||
.debug_struct("ActionType::DoABC")
|
||||
.field("name", name)
|
||||
.field("is_lazy_initialize", is_lazy_initialize)
|
||||
.field("bytecode", abc)
|
||||
.field("preload", preload)
|
||||
.finish(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -431,7 +431,6 @@ impl<'gc> MovieClip<'gc> {
|
|||
name,
|
||||
is_lazy_initialize,
|
||||
abc: slice,
|
||||
preload: true,
|
||||
},
|
||||
false,
|
||||
);
|
||||
|
|
|
@ -872,9 +872,8 @@ impl Player {
|
|||
name,
|
||||
is_lazy_initialize,
|
||||
abc,
|
||||
preload,
|
||||
} => {
|
||||
if let Err(e) = avm2.load_abc(abc, context, preload) {
|
||||
if let Err(e) = avm2.load_abc(abc, context) {
|
||||
log::warn!("Error loading ABC file: {}", e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue