tests: Add a goto-and-stop test that inspects the children after the goto.

This commit is contained in:
David Wendt 2022-01-07 22:11:03 -05:00 committed by kmeisthax
parent c3add3db93
commit 6569edda88
5 changed files with 22 additions and 0 deletions

View File

@ -395,6 +395,7 @@ swf_tests! {
(as3_movieclip_goto_during_frame_script, "avm2/movieclip_goto_during_frame_script", 1), (as3_movieclip_goto_during_frame_script, "avm2/movieclip_goto_during_frame_script", 1),
(as3_movieclip_gotoandplay, "avm2/movieclip_gotoandplay", 5), (as3_movieclip_gotoandplay, "avm2/movieclip_gotoandplay", 5),
(as3_movieclip_gotoandstop, "avm2/movieclip_gotoandstop", 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_gotoandstop_queueing, "avm2/movieclip_gotoandstop_queueing", 2),
(as3_movieclip_next_frame, "avm2/movieclip_next_frame", 5), (as3_movieclip_next_frame, "avm2/movieclip_next_frame", 5),
(as3_movieclip_next_scene, "avm2/movieclip_next_scene", 5), (as3_movieclip_next_scene, "avm2/movieclip_next_scene", 5),

View File

@ -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();
}
}
}

View File

@ -0,0 +1,4 @@
/// this.child.gotoAndStop(2)
/// (Grandchildren of this.child...)
Child: grandchild_a
Child: grandchild_b