Skip to content

Commit 26939e5

Browse files
avm1: Include all named child DisplayObjects when enumerating MovieClip
1 parent a7ce2e9 commit 26939e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/avm1/object/stage_object.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ pub fn enumerate_keys<'gc>(dobj: DisplayObject<'gc>, keys: &mut Vec<AvmString<'g
136136
if let Some(ctr) = dobj.as_container() {
137137
// Button/MovieClip children are included in key list.
138138
for child in ctr.iter_render_list().rev() {
139-
if child.as_interactive().is_some() {
140-
keys.push(child.name().expect("Interactive DisplayObjects have names"));
139+
// All named DOs are included in the list, even if they're not
140+
// accessible by AVM1 code (e.g. `MorphShape`)
141+
if let Some(name) = child.name() {
142+
keys.push(name);
141143
}
142144
}
143145
}

0 commit comments

Comments
 (0)