diff --git a/tests/tests/regression_tests.rs b/tests/tests/regression_tests.rs index 587dfc539..f252d1cfb 100644 --- a/tests/tests/regression_tests.rs +++ b/tests/tests/regression_tests.rs @@ -395,6 +395,7 @@ swf_tests! { (as3_movieclip_goto_during_frame_script, "avm2/movieclip_goto_during_frame_script", 1), (as3_movieclip_gotoandplay, "avm2/movieclip_gotoandplay", 5), (as3_movieclip_gotoandstop, "avm2/movieclip_gotoandstop", 5), + (as3_movieclip_gotoandstop_children, "avm2/movieclip_gotoandstop_children", 1), (as3_movieclip_gotoandstop_queueing, "avm2/movieclip_gotoandstop_queueing", 2), (as3_movieclip_next_frame, "avm2/movieclip_next_frame", 5), (as3_movieclip_next_scene, "avm2/movieclip_next_scene", 5), diff --git a/tests/tests/swfs/avm2/movieclip_gotoandstop_children/MainDocument.as b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/MainDocument.as new file mode 100644 index 000000000..dcd86473e --- /dev/null +++ b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/MainDocument.as @@ -0,0 +1,17 @@ +package { + import flash.display.MovieClip; + + public class MainDocument extends MovieClip { + public function MainDocument() { + trace("/// this.child.gotoAndStop(2)"); + this.child.gotoAndStop(2); + + trace("/// (Grandchildren of this.child...)"); + for (var i = 0; i < this.child.numChildren; i += 1) { + trace("Child: " + this.child.getChildAt(i).name); + } + + this.stop(); + } + } +} \ No newline at end of file diff --git a/tests/tests/swfs/avm2/movieclip_gotoandstop_children/output.txt b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/output.txt new file mode 100644 index 000000000..4fa500d3f --- /dev/null +++ b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/output.txt @@ -0,0 +1,4 @@ +/// this.child.gotoAndStop(2) +/// (Grandchildren of this.child...) +Child: grandchild_a +Child: grandchild_b diff --git a/tests/tests/swfs/avm2/movieclip_gotoandstop_children/test.fla b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/test.fla new file mode 100644 index 000000000..9ba63eaad Binary files /dev/null and b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/test.fla differ diff --git a/tests/tests/swfs/avm2/movieclip_gotoandstop_children/test.swf b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/test.swf new file mode 100644 index 000000000..1877629d8 Binary files /dev/null and b/tests/tests/swfs/avm2/movieclip_gotoandstop_children/test.swf differ