Código PHP:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
public class Boton_Blohg extends MovieClip
{
public function Boton_Blohg()
{
this.stop() ;
this.buttonMode = true ;
this.addEventListener (MouseEvent.ROLL_OVER, onRoll) ;
this.addEventListener (MouseEvent.ROLL_OUT, onOut) ;
this.addEventListener (MouseEvent.MOUSE_DOWN,onDown)
}
private function onDown (event:MouseEvent) :void
{
navigateToURL(new URLRequest("http://tuweb.com"),"_self");
}
private function onRoll (event:MouseEvent) :void
{
this.removeEventListener ("enterFrame", onRetroceder)
this.addEventListener (Event.ENTER_FRAME, onAvanzar) ;
}
private function onOut (event:MouseEvent) :void
{
this.removeEventListener ("enterFrame", onAvanzar)
this.addEventListener (Event.ENTER_FRAME, onRetroceder) ;
}
private function onAvanzar (event:Event) :void
{
if (this.currentFrame < this.totalFrames) {
this.nextFrame () ;
}else{
this.removeEventListener ("enterFrame", onAvanzar)
}
}
private function onRetroceder (event:Event) :void
{
if (this.currentFrame > 1) {
this.prevFrame () ;
}else{
this.removeEventListener ("enterFrame", onRetroceder)
}
}
}
}