core: Ensure empty movie clips are born preloaded.
An "empty clip" is any clip created by the `new` or `new_with_avm2` function, intended for dynamically-created movie clips with no association to a movie symbol.
This commit is contained in:
parent
f96017e6f3
commit
3a265adcc4
|
@ -33,8 +33,6 @@ pub fn instance_init<'gc>(
|
|||
let new_do =
|
||||
MovieClip::new_with_avm2(movie, this, class_object, activation.context.gc_context);
|
||||
|
||||
new_do.preload(&mut activation.context, &mut Default::default(), None);
|
||||
|
||||
this.init_display_object(activation.context.gc_context, new_do.into());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3812,7 +3812,11 @@ struct MovieClipStatic<'gc> {
|
|||
|
||||
impl<'gc> MovieClipStatic<'gc> {
|
||||
fn empty(movie: Arc<SwfMovie>, gc_context: MutationContext<'gc, '_>) -> Self {
|
||||
Self::with_data(0, SwfSlice::empty(movie), 1, None, gc_context)
|
||||
let s = Self::with_data(0, SwfSlice::empty(movie), 1, None, gc_context);
|
||||
|
||||
s.preload_progress.write(gc_context).cur_preload_frame = s.total_frames + 1;
|
||||
|
||||
s
|
||||
}
|
||||
|
||||
fn with_data(
|
||||
|
|
Loading…
Reference in New Issue