Cargo en mi archivo principal un AS así:
Código ActionScript :
include "menu.as"
El código es:
Código ActionScript :
var arrBotones:Array = [textos_mc.btn_1, textos_mc.btn_2, textos_mc.btn_3];
//
for each(var btn:MovieClip in arrBotones){
btn.addEventListener(MouseEvent.CLICK,hizoClick);
btn.buttonMode = true;
}
//
function hizoClick(e:MouseEvent):void{
var btn:MovieClip = e.currentTarget as MovieClip;
switch(btn){
//////// Ayudas 2 ////////
case arrBotones[0]:
if(MovieClip(root).textos_mc.currentFrame == 2){
fscommand("exec","animacion_2.exe");
fscommand("exec","animacion_2.app");
break;
}
case arrBotones[1]:
if(MovieClip(root).textos_mc.currentFrame == 2){
fscommand("exec","video_2.exe");
fscommand("exec","video_2.app");
break;
}
case arrBotones[2]:
if(MovieClip(root).textos_mc.currentFrame == 2){
fscommand("exec","texto_2.bat");
fscommand("exec","texto_2.app");
break;
}
//////// Ayudas 3 ////////
case arrBotones[0]:
if(MovieClip(root).textos_mc.currentFrame == 3){
fscommand("exec","animacion_3.exe");
fscommand("exec","animacion_3.app");
break;
}
case arrBotones[1]:
if(MovieClip(root).textos_mc.currentFrame == 3){
fscommand("exec","video_3.exe");
fscommand("exec","video_3.app");
break;
}
case arrBotones[2]:
if(MovieClip(root).textos_mc.currentFrame == 3){
fscommand("exec","texto_3.bat");
fscommand("exec","texto_3.app");
break;
}
}
}
Los primeros 3 me carga bien, pero cuando voy al fotograma 3 presiono los otros los 3 botones me cargan sólo un archivo que es "animacion_3.exe"
Cómo hago que por cada grupo de botones me cargue archivos distintos
Gracias por su ayuda
