Jump to content


Photo

Trocar Mouse_Over Por Click


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 zitrone

zitrone

    12 Horas

  • Usuários
  • 288 posts
  • Sexo:Masculino

Posted 09/01/2012, 13:18

Boa tarde pessoal, estou com um problema, quero mudar a ação de MOUSE_OVER para CLICK mas a function não consigo fazer com que cada click faça o move mover de 100 em 100 px, abaixo o codigo que uso para isso mas nao consegui fazer do jeito que preciso, alguem entendeu?

Agradeço desde já.


private var selectedBtnLabel:String = "";
		private function onLeftBtnOver(evt:MouseEvent):void{
			selectedBtnLabel = "left";
			stage.addEventListener(Event.ENTER_FRAME, stageEnterFrame);		
			}
		
		private function onRightBtnOver(evt:MouseEvent):void{
			selectedBtnLabel = "right";
			stage.addEventListener(Event.ENTER_FRAME, stageEnterFrame);
			
		}
		
		private function onBtnMouseOut(evt:MouseEvent):void{
			stage.removeEventListener(Event.ENTER_FRAME, stageEnterFrame);
		}
		
		
		private function stageEnterFrame(evt:Event):void{
			if(selectedBtnLabel == "left"){
				if(thumbHolder.x < THUMB_HOLDER_STARTX){
					thumbHolder.x += 25;
				}
			}
			else{
				var maxX:Number = THUMB_HOLDER_STARTX -(thumbHolder.width - tmbHolderMask.width);
				if(thumbHolder.x > maxX){
					thumbHolder.x -= 25;
				}

A partir do momento que tiramos todos os adereços, tornamo-nos um espantalho. (Nietsche)




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq