I have two frames with as3 code:
// frame1:
gotoAndPlay("show controls");
// frame2 - have movieclip with name slide0
// create menu items click listeners
for (var i:int = 0; i < slides.items.length; i++) // slides.items.length = 1
this["menu_item"+i].addEventListener(MouseEvent.CLICK, menu_item_click);
// click on the first menu item
this["menu_item0"].dispatchEvent(new MouseEvent(MouseEvent.CLICK));
// menu item click handler
function menu_item_click(e:MouseEvent):void {
this["slide0"].gotoAndPlay("show");
}
// in movieclip slide0 on frame with label "show"
trace("slide0 show begin");
And I get 2 messages "slide0 show begin". But when I click on menu_item0 I have one message.
Please help - where is a mistake?