at Sint_fla::MainTimeline/frame1() )
SI ALGUIEN ME PUEDE AYUDAR MUCHISIMAS GRACIAS
Código:
import flash.events.Event; Boton1.visible = false; var menu_Clavijo:Array = new Array("Inicio","Productos","Diseño Web"); var total:Number = menu_Clavijo.length; var center_x:Number = 470; var center_y:Number = 360; 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 Boton(); btn.name = "Boton_Clavijo" + i; btn.x = center_x; btn.y = center_y; btn.scaleX = 0; btn.scaleY = 0; btn.alpha = 0; btn.item_no = i; btn.Clavijo_icono.gotoAndStop( i + 1 ); btn.addEventListener( MouseEvent.ROLL_OVER, btn_over ); btn.addEventListener( MouseEvent.ROLL_OUT, btn_out ); btn.addEventListener( MouseEvent.CLICK, btn_click ); var each_substring:Array = menu_Clavijo[i].split("|"); btn.Boton_Clavijo.fm_label.text = each_substring[0]; btn.item_url = each_substring[1]; menu_Clavijo.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; } var boton:Boton; var ejeX:Number = stage.stageWidth/ 2; var ejeY:Number = stage.stageHeight/ 2; var amplitudX:Number = 180; var amplitudY:Number = 45; var cantidad:int = 4; var difAngular:Number = ( Math.PI * 2) / 4; for (i = 0; i < cantidad; i++ ) { boton = new Boton (); boton.angulo = difAngular * i; boton.x =Math.cos (boton.angulo) * amplitudX + ejeX; boton.y =Math.sin (boton.angulo) * amplitudY + ejeY; boton.addEventListener ( Event.ENTER_FRAME, orbitarObjetos ); addChild ( boton ); } var incrAngulo:Number; function orbitarObjetos (event:Event ):void { incrAngulo = ((stage.mouseX - ejeX) / ejeX ) * 0.1; event.target.angulo += incrAngulo; event.target.x = Math.cos ( event.target.angulo ) * amplitudX + ejeX event.target.y = Math.sin ( event.target.angulo ) * amplitudY + ejeY event.target.scaleX = 1 + Math.sin ( event.target.angulo) * 0.4; event.target.scaleY = event.target.scaleX;