Skip to main content
December 21, 2009
Question

I am having trouble with a URL importation and URLRequest

  • December 21, 2009
  • 1 reply
  • 358 views

package

{

import flash.display.MovieClip;

import flash.events.MouseEvent;

import flash.events.TimerEvent;

import flash.net.URLRequest;

public class PixelSlaves extends MovieClip

{

private var _origXScale:Number;

private var _origYScale:Number;

private var _pageLink:String = new URLRequest("http://www.apple.com");

public function PixelSlaves ()

{

_origXScale = this.scaleX;

_origYScale = this.scaleY;

this.addEventListener (MouseEvent.ROLL_OVER,onOver);

this.addEventListener (MouseEvent.ROLL_OUT,onOut);

this.addEventListener (MouseEvent.CLICK,onClick);

}

private function onOver (event:MouseEvent):void

{

this.scaleX *= 1.5;

this.scaleY*=1.5;

}

private function onClick (event:MouseEvent):void

{

navigateToURL (_pageLink);

}

private function onOut (event:MouseEvent):void

{

this.scaleX=_origXScale;

this.scaleY=_origYScale;

}

}

}

This topic has been closed for replies.

1 reply

December 21, 2009

Don't post the same question multiple times. This is answered in your other thread.