13/05/2009, 16:29
|
| | Fecha de Ingreso: mayo-2009
Mensajes: 21
Antigüedad: 15 años, 8 meses Puntos: 0 | |
Respuesta: no se que titulo ponerle a mi problema hola, se que soy muy pesado pero es que ando mu perdido. Yo tengo este codigo en la pagina, donde debería poner el removeChild?
fm_button.visible = false;
flashmo_photo_group1.gotoAndStop( 1 );
var menu_label:Array = new Array("INICIO", "BIOGRAFIA", "AUDIO Y VIDEO",
"GALERIA", "AGENDA", "SAXAS",
"CONTACTO");
var total:Number = menu_label.length;
var i:Number = 0;
var page:Number;
var main_menu:MovieClip = new MovieClip();
stage.addChild(main_menu);
for( i = 0; i < total; i++ )
{
var btn = new flashmo_button();
btn.name = "btn" + i;
btn.x = fm_button.x;
btn.y = fm_button.y + (fm_button.height + 10) * i;
btn.item_no = i;
btn.addEventListener( Event.ENTER_FRAME, btn_enter );
var each_substring:Array = menu_label[i].split("|");
btn.flashmo_button_label.fm_label.text = each_substring[0];
btn.item_url = each_substring[1];
main_menu.addChild(btn);
}
function btn_over(e:MouseEvent):void
{
e.target.over = true;
}
function btn_out(e:MouseEvent):void
{
e.target.over = false;
}
function btn_click(e:MouseEvent):void
{
var mc = e.target.parent;
if( mc.item_url != undefined )
navigateToURL( new URLRequest( mc.item_url ), "_parent" );
else
change_page(mc.item_no);
}
function btn_enter(e:Event):void
{
var mc = e.target;
if( mc.over == true )
mc.nextFrame();
else
mc.prevFrame();
}
function change_page(no:Number):void
{
for( var i:Number = 0; i < main_menu.numChildren; i++ )
{
var mc = MovieClip( main_menu.getChildAt(i) );
mc.over = false;
mc.flashmo_click_area.visible = true;
mc.addEventListener( MouseEvent.ROLL_OVER, btn_over );
mc.addEventListener( MouseEvent.ROLL_OUT, btn_out );
mc.addEventListener( MouseEvent.CLICK, btn_click );
}
var mc_selected = MovieClip( main_menu.getChildAt(no) );
mc_selected.over = true;
mc_selected.flashmo_click_area.visible = false;
mc_selected.removeEventListener( MouseEvent.ROLL_OVER, btn_over );
mc_selected.removeEventListener( MouseEvent.ROLL_OUT, btn_out );
mc_selected.removeEventListener( MouseEvent.CLICK, btn_click );
page = no + 1;
play();
}
change_page(0); |