<-------------------este es mi XML--------------------------------->
Código :
<root> <images> <image>../assets/img/image1.jpg</image> <image>../assets/img/image2.jpg</image> <image>../assets/img/image3.jpg</image> <image>../assets/img/image4.jpg</image> <image>../assets/img/image5.jpg</image> <image>../assets/img/zekda.jpg</image> </images> <buttons> <btn>hola</btn> </buttons> <background> <bg target="Bg_menu">../assets/fondos/fondoMenu.jpg</bg> <bg target="Bg_info1">../assets/fondos/informacion1.jpg</bg> </background> </root>
<-------------------Xml--------------------------------->
nececito llamra a la linea <bg target="Bg_menu">../assets/fondos/fondoMenu.jpg</bg> en una parte especifica de mi fla
ahora este es el as3
Código ActionScript :
package screens { import flash.display.MovieClip; import flash.display.*; import flash.events.*; import flash.events.MouseEvent; import com.h4ostudio.switcher.*; import com.h4ostudio.switcher.core.interfaces.*; import transitions.*; import flash.utils.Timer; import flash.events.TimerEvent; import flash.events.MouseEvent; public class Menu1 extends MovieClip implements IScreen { private var timer:Timer; private var _xml:XML; public function Menu1(xml:XML) { _xml=xml; trace('archiva de fondo '+_xml.background.bg.(@target=="Bg_menu"));//creo yo que aqui es donde tengo que identificar pero no tengo ni idea de como decirle que quieroq ue esa imagen se vea ay :cry: addEventListener(MouseEvent.MOUSE_DOWN,onClick); } public function onHide():void { timer.removeEventListener(TimerEvent.TIMER_COMPLETE,mouseInactive); gotoAndStop(1); } public function onShow():void { play(); timer = new Timer(1000,60); timer.start(); addEventListener(MouseEvent.MOUSE_MOVE,timerON,false,0,true); timer.addEventListener(TimerEvent.TIMER_COMPLETE, mouseInactive,false,0,true); } private function onClick(e:MouseEvent):void { } private function timerON(e:MouseEvent):void { timer.reset(); timer.start(); } private function mouseInactive(e:Event):void { SwitcherManager.instance.goto("Inicio"); } } }