ぐりぐり写真
package
{
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
import flash.text.*;
import flash.utils.*;
[SWF(width=480, height=360, backgroundColor=0xFFFFFF)]
public class Main extends Sprite {
private var loader:Loader = new Loader();
public function Main() {
loader.load(new URLRequest("http://art28.photozou.jp/pub/876/237876/photo/60554808_org.v1292341456.jpg"));
addChild(loader);
stage.addEventListener(MouseEvent.MOUSE_MOVE, move)
}
private function move(e:MouseEvent):void {
var j:uint = 30 * e.stageX / 480;
if (j >= 29) {
j = 29;
}
if (j <= 0) {
j = 0;
}
var x:int = j / 6;
var y:int = j % 6;
loader.x = -x * 480;
loader.y = -y * 360;
}
}
}