Código:
si paso al boton 1 o 3 me sigue quedando activa esta parte del codigo system.useCodePage=true; var myXml:XML =new XML(); myXml.load("images_medi.xml"); myXml.ignoreWhite = true; txtFade_mc1.embedFonts = true; txtFade_mc2.embedFonts = true; var myData:Array; _root.imageNum = 1; var timer:Number = 0; var selectedMc:MovieClip; var imgHolder:MovieClip; var s_tf:TextFormat = new TextFormat(); s_tf.color = 0xFFFFFF; var tf:TextFormat = new TextFormat(); tf.color = 0x666666; myXml.onLoad = function(success:Boolean):Void { if (success) { myData = this.firstChild.childNodes; createLinks(myData.length); createScreen(myData); } else { trace("Dtat not found"); } }; function createLinks(num:Number):Void { var back:MovieClip = _root.createEmptyMovieClip("linksBack", _root.getNextHighestDepth()); var w:Number = (num*14)+6; back._x = Stage.width-(back._width+5); back._y = 4; var __x:Number = Stage.width-(14+650); for (var i = num; i>0; i--) { var num_mc:MovieClip = _root.attachMovie("num", "num"+i, _root.getNextHighestDepth()); num_mc.num.text = i; num_mc.back._alpha= 0; num_mc._y = 550; num_mc._x =__x; __x = num_mc._x-(14); num_mc.onRelease = onPressNum; } loadContaents(); } function loadContaents() { _root.loading._visible = true; selectedMc._alpha = 0; txtFade_mc._alpha = 100; selectedMc._parent.num.setTextFormat(tf); _root["num"+_root.imageNum].back._alpha = 100; selectedMc = _root["num"+_root.imageNum].back; selectedMc._parent.num.setTextFormat(s_tf); holder.link = myData[(_root.imageNum-1)].attributes.link; var loader:MovieClipLoader = new MovieClipLoader(); var listner:Object = new Object(); loader.addListener(listner); imgHolder = holder.createEmptyMovieClip("holder", 0); loader.loadClip(myData[(_root.imageNum-1)].attributes.img, imgHolder); txtHeader.text = myData[(_root.imageNum-1)].attributes.name; txtFooter.text = myData[(_root.imageNum-1)].attributes.desc; listner.onLoadInit = function(mc:MovieClip):Void { mc._height = 242; mc._width = 302; mc._alpha = 0; txtFade_mc1._alpha = 100; txtFade_mc2._alpha = 100; _root.loading._visible = false; mc.onEnterFrame = function():Void { this._alpha += 1; txtFade_mc1._alpha -= 1; txtFade_mc2._alpha -= 1; if (this._alpha>=100) { delete this.onEnterFrame; updateAfterEvent(); timer = setInterval(loadnext, 5000); } }; }; } function loadnext():Void { clearInterval(timer); imgHolder.onEnterFrame = function():Void { this._alpha -= 1; txtFade_mc1._alpha += 2; txtFade_mc2._alpha += 2; if (this._alpha<=0) { delete this.onEnterFrame; _root.imageNum = _root.imageNum>=myData.length ? 1 : _root.imageNum+1; loadContaents(); updateAfterEvent(); } }; } function onPressNum():Void { _root.imageNum = Number(this.num.text)-1; loadnext(); }
Código:
pensaba solucionar esto colocando un action script en el fream 1 o 20 para eliminar elimnar esta funcion el problema es que no se como hacerlo, agradeceria a la persoan que me pueda ayudar con este inconvenientefunction createLinks(num:Number):Void { var back:MovieClip = _root.createEmptyMovieClip("linksBack", _root.getNextHighestDepth()); var w:Number = (num*14)+6; back._x = Stage.width-(back._width+5); back._y = 4; var __x:Number = Stage.width-(14+650); for (var i = num; i>0; i--) { var num_mc:MovieClip = _root.attachMovie("num", "num"+i, _root.getNextHighestDepth()); num_mc.num.text = i; num_mc.back._alpha= 0; num_mc._y = 550; num_mc._x =__x; __x = num_mc._x-(14); num_mc.onRelease = onPressNum; } loadContaents(); }
Gracias