Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 85594

AS3 to AS2 code

$
0
0

Hello,  I have a problem with a small code.

 

I'm doing a photo gallery in as3 to insert into my website, the problem is that my site is made in as2 and when I insert the gallery into website the up and down buttons don´t work. Someone could tell me how to modify this code ? I need the code in AS2. Thanks



stop ();

 

var arriba = Boolean;

var abajo = Boolean;

 

//scroll

abajobtn.addEventListener (MouseEvent.MOUSE_DOWN, mover_abajo);

function mover_abajo (event:MouseEvent) :void {

  abajo = true;

}

arribabtn.addEventListener (MouseEvent.MOUSE_DOWN, mover_arriba);

function mover_arriba (event:MouseEvent) :void {

  arriba = true;

}

 

addEventListener (Event.ENTER_FRAME, mover);

function mover (event:Event) :void {

  if (abajo == true) {

  if (tiravip.y >= -965) {

  tiravip.y -= 12;

  }

  }

  if (arriba == true) {

  if (tiravip.y <= 7) {

  tiravip.y += 12;

  }

  }

}

 

abajobtn.addEventListener (MouseEvent.MOUSE_UP, detener_abajo);

function detener_abajo (event:MouseEvent) :void {

  abajo = false;

}

arribabtn.addEventListener (MouseEvent.MOUSE_UP, detener_arriba);

function detener_arriba (event:MouseEvent) :void {

  arriba = false;

}


Viewing all articles
Browse latest Browse all 85594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>