avm1: duplicateMovieClip copies clip events

Clip events should be copied from the source clip to the newly
created clip. Fixes objects remaining onscreen in #815.
This commit is contained in:
Mike Welsh 2020-07-16 16:46:32 -07:00
parent 8c1ec01d75
commit 8ecae5a87f
1 changed files with 4 additions and 0 deletions

View File

@ -639,6 +639,10 @@ pub fn duplicate_movie_clip_with_bias<'gc>(
// Copy display properties from previous clip to new clip.
new_clip.set_matrix(context.gc_context, &*movie_clip.matrix());
new_clip.set_color_transform(context.gc_context, &*movie_clip.color_transform());
new_clip
.as_movie_clip()
.unwrap()
.set_clip_actions(context.gc_context, movie_clip.clip_actions().to_vec());
// TODO: Any other properties we should copy...?
// Definitely not ScriptObject properties.