Buscando en inglés encontre una persona con el mismo tipo de idea: O sea, todos los botones del escenario muestren un movieclip (cortina o transición) y luego vaya a el destino verdadero del botón.
Este ciodigo a el no le funcionaba, veo que esta cerca, pero no lo comprndo muy bien...alguna ayuda chicos?
Código:
stop();
////////////////////////////////////////////////////////////variable used to identify witch button was pressed
var btnClick:String = "home_btn";
////////////////////////////////////////////////////////////
home_btn.buttonMode = true
contact_btn.buttonMode = true
media_btn.buttonMode = true
about_btn.buttonMode = true
/////////////////////////////////////////////////////////////////////////////////////////////////////
home_btn.addEventListener(MouseEvent.CLICK,home_btnClick);
function home_btnClick(event:MouseEvent):void{
btnClick = "home_btn"
transition.gotoAndPlay(1);
}
contact_btn.addEventListener(MouseEvent.CLICK,contact_btnClick);
function contact_btnClick(event:MouseEvent):void{
btnClick = "contact_btn"
transition.gotoAndPlay(1);
}
media_btn.addEventListener(MouseEvent.CLICK,media_btnClick);
function media_btnClick(event:MouseEvent):void{
btnClick = "media_btn"
transition.gotoAndPlay(1);
}
about_btn.addEventListener(MouseEvent.CLICK,about_btnClick);
function about_btnClick(event:MouseEvent):void{
btnClick = "about_btn"
transition.gotoAndPlay(1);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
and this is AS on the last frame of the transition
//variables to test condition
var test = MovieClip(parent).btnClick;//gives variable test properties of a btnClick variable located on the main movie timeline
var home = "home_btn"
var contact = "contact_btn"
var media = "media_btn"
var about = "about_btn"
//trace(test)// just for testing
//navigation
if (test == home) {
MovieClip(parent).pages.gotoAndStop("home");
} else if (test == contact){
MovieClip(parent).pages.gotoAndStop("contact");
} else if (test == media){
MovieClip(parent).pages.gotoAndStop("media");
} else if (test == about){
MovieClip(parent).pages.gotoAndStop("about");
}