Fecareis 0 Denunciar post Postado Janeiro 19, 2010 Olá gostaria de saber como faço para colocar link a este botões, os link destes botões estão Mstatus.text =" "; sendo assim quando eu clico ele troca o texto exibido em baixo, mas gostaria de colocar link. Este é o arquivo para visualização http://www.hollysandalias.com.br/menu.html O arquivo é este, esta em fla para baixar http://www.hollysandalias.com.br/download.zip Se puder me ajudar agradeço Compartilhar este post Link para o post Compartilhar em outros sites
Jerfs 1 Denunciar post Postado Janeiro 19, 2010 Cara, gostaria muito de poder te ajudar, mas não consigo abrir o arquivo porque a versão do meu flash é cs3. Tem jeito de você postar o código aqui!? eu dou uma olhada pra ti. Abraços Compartilhar este post Link para o post Compartilhar em outros sites
Fecareis 0 Denunciar post Postado Janeiro 19, 2010 este é o codigo loadButtons(); //load the listeners function loadButtons():void { btnGreenBig.buttonBackGreen.useHandCursor=true; btnGreenBig.buttonBackGreen.buttonMode=true; btnRedBig.buttonBackRed.useHandCursor=true; btnRedBig.buttonBackRed.buttonMode=true; btnBlueBig.buttonBackBlue.useHandCursor=true; btnBlueBig.buttonBackBlue.buttonMode=true; btnGreenBig.buttonBackGreen.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); btnGreenBig.buttonBackGreen.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); btnGreenBig.buttonBackGreen.addEventListener(MouseEvent.CLICK, onMouseClick); btnBlueBig.buttonBackBlue.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); btnBlueBig.buttonBackBlue.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); btnBlueBig.buttonBackBlue.addEventListener(MouseEvent.CLICK, onMouseClick); btnRedBig.buttonBackRed.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); btnRedBig.buttonBackRed.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); btnRedBig.buttonBackRed.addEventListener(MouseEvent.CLICK, onMouseClick); } //the glow filters to apply the swirl var glR:GlowFilter = new GlowFilter(0xcc0000,1,50,50,2.5); var glG:GlowFilter = new GlowFilter(0x91e600,1,50,50,2); var glB:GlowFilter = new GlowFilter(0x0033ff,1,50,50,3.5); //mouse over handler function onMouseOver(evt:MouseEvent):void { switch(evt.currentTarget.name) { //this is one way to find if the mouseOver is dispatched from the buttonBack MC case "buttonBackGreen": btnGreenBig.homeOverSwirl.gotoAndPlay(2); //animate the swirl grow btnGreenBig.homeLabel.gotoAndStop(2); //put the label on white btnGreenBig.homeOverSwirl.filters=[glG]; //applay filters to the swirl Mstatus.text="mouseOver Home!"; //update button status text startTimer(btnGreenBig); //start the timer to animate the cricular move of button break; case "buttonBackBlue": //same as on the green button btnBlueBig.contactOverSwirl.gotoAndPlay(2); btnBlueBig.contactLabel.gotoAndStop(2); btnBlueBig.contactOverSwirl.filters=[glB]; Mstatus.text="mouseOver Contact!"; startTimer(btnBlueBig); break; case "buttonBackRed": //same as on the green button btnRedBig.aboutOverSwirl.gotoAndPlay(2); btnRedBig.aboutLabel.gotoAndStop(2); btnRedBig.aboutOverSwirl.filters=[glR]; Mstatus.text="mouseOver About!"; startTimer(btnRedBig); break; } } //mouse out handler function onMouseOut(evt:MouseEvent):void { switch(evt.target) { //this is another way to check if the event is dispatched from buttonBack MC case btnGreenBig.buttonBackGreen: btnGreenBig.homeOverSwirl.gotoAndPlay("fade"); //play the fade effect btnGreenBig.homeLabel.gotoAndStop(1); //return label to his original color Mstatus.text="mouseOut Home!"; //update status text stopTimer(btnGreenBig); //stop the circular move break; case btnBlueBig.buttonBackBlue: //sabe as green button btnBlueBig.contactOverSwirl.gotoAndPlay("fade"); btnBlueBig.contactLabel.gotoAndStop(1); Mstatus.text="mouseOut Contact!"; stopTimer(btnBlueBig); break; case btnRedBig.buttonBackRed: //sabe as green button btnRedBig.aboutOverSwirl.gotoAndPlay("fade"); btnRedBig.aboutLabel.gotoAndStop(1); stopTimer(btnRedBig); Mstatus.text="mouseOut About!"; break; } } //click handler function onMouseClick(evt:MouseEvent):void { switch(evt.currentTarget.name) { case "buttonBackGreen": Mstatus.text="mouseClick Home!"; break; case "buttonBackBlue": Mstatus.text="mouseClick Contact!"; break; case "buttonBackRed": Mstatus.text="http://www.google.com.br"; break; } } /***circular animation ***/ var distance:Number = 0.4; //circular distance var speed:Number=20; //more hight, less speed //button timers to do the circular move var time:Timer = new Timer(speed); //green one var timerBlue:Timer = new Timer(speed); //blue var timerRed:Timer = new Timer(speed); //red //listeners to update button position time.addEventListener(TimerEvent.TIMER, moveCircle); timerRed.addEventListener(TimerEvent.TIMER, moveRed); timerBlue.addEventListener(TimerEvent.TIMER, moveBlue); //current rotation angle position var angle:Number=0; var angleB:Number = 0; var angleR:Number = 0; //green circular function function moveCircle (e:TimerEvent):void { btnGreenBig.x = btnGreenBig.x + (Math.cos(angle) * distance); btnGreenBig.y = btnGreenBig.y + (Math.sin(angle) * distance) angle += 0.1; } //red circular function function moveRed (e:TimerEvent):void { btnRedBig.x = btnRedBig.x + Math.cos(angleR) * distance; btnRedBig.y = btnRedBig.y + Math.sin(angleR) * distance; angleR += 0.1; } //blue circular function function moveBlue(e:TimerEvent):void { btnBlueBig.x = btnBlueBig.x + Math.cos(angleB) * distance; btnBlueBig.y = btnBlueBig.y + Math.sin(angleB) * distance; angleB += 0.1; } //start timer/circular anim on the provided movieclip. function startTimer(it:MovieClip):void { if(it==btnGreenBig) time.start(); if(it==btnRedBig) timerRed.start(); if(it==btnBlueBig) timerBlue.start(); } //stop timer/circular anim function stopTimer(it:MovieClip):void { if(it==btnGreenBig) time.stop(); if(it==btnRedBig) timerRed.stop(); if(it==btnBlueBig) timerBlue.stop(); } Onde esta google de link onde eu tentei adicionar mas aparece a palavra quando clico Compartilhar este post Link para o post Compartilhar em outros sites
Public2004 79 Denunciar post Postado Janeiro 19, 2010 Cara, inclua as ações neste bloco: //click handler function onMouseClick(evt:MouseEvent):void { switch(evt.currentTarget.name) { case "buttonBackGreen": Mstatus.text="mouseClick Home!"; // AQUI LINK BOTAO HOME break; case "buttonBackBlue": Mstatus.text="mouseClick Contact!"; // AQUI LINK BOTAO CONTACT break; case "buttonBackRed": Mstatus.text="http://www.google.com.br"; // AQUI LINK BOTAO GOOGLE break; } } Att. Compartilhar este post Link para o post Compartilhar em outros sites
Fecareis 0 Denunciar post Postado Janeiro 19, 2010 Mas tem um porem como coloco o link se eu mudo o texto Mstatus.text="mouseClick Contact!"; ele altera só o escrito como eu faço para ele virar um link Compartilhar este post Link para o post Compartilhar em outros sites
Public2004 79 Denunciar post Postado Janeiro 19, 2010 Insira em cada botão de acordo com o exemplo que postei acima.. navigateToURL(new URLRequest("http://www.dominio.com.br/")); Att. Compartilhar este post Link para o post Compartilhar em outros sites
Fecareis 0 Denunciar post Postado Janeiro 19, 2010 valeu mesmo muito obrigado Mas ele abre em outra janela como faço para abri na mesma Compartilhar este post Link para o post Compartilhar em outros sites
Public2004 79 Denunciar post Postado Janeiro 21, 2010 A mesma coisa do AS2 (url, window)... navigateToURL(new URLRequest("http://www.dominio.com.br/", "_self")); Att. Compartilhar este post Link para o post Compartilhar em outros sites