- コミット日時:
- 2008/12/16 00:28:25 (3 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/StreetView/trunk/samples/Sample.as
r1227 r2058 2 2 { 3 3 import flash.display.Sprite; 4 import flash.display.StageAlign; 5 import flash.display.StageScaleMode; 6 import flash.events.Event; 4 7 import flash.events.KeyboardEvent; 5 8 import flash.ui.Keyboard; 6 9 7 10 import uranodai.streetview.StreetView; 11 import uranodai.streetview.data.LocationData; 12 import uranodai.streetview.data.Shibuya; 8 13 9 [SWF(width=" 300",height="350",frameRate="30",backgroundColor="#FFFF00")]14 [SWF(width="500",height="550",frameRate="30",backgroundColor="#FFFF00")] 10 15 11 16 public class Sample extends Sprite … … 15 20 public function Sample() 16 21 { 17 streetView = new StreetView(300,300); 18 streetView.load("http://localhost/Workspace/StreetView/app/"); 22 stage.scaleMode = StageScaleMode.NO_SCALE; 23 stage.align = StageAlign.TOP_LEFT; 24 25 var location:LocationData = new Shibuya().minamiguchi; 26 27 streetView = new StreetView(500,500); 28 streetView.load(location.lat, location.lon); 19 29 addChild(streetView); 30 31 stage.addEventListener(Event.RESIZE, onResize); 20 32 21 33 stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); … … 25 37 { 26 38 if(e.keyCode == Keyboard.UP){ 27 //進む 39 //進む 28 40 streetView.goFront(); 29 41 } 30 42 } 31 43 44 private function onResize(e:Event):void 45 { 46 streetView.resize(stage.stageWidth, stage.stageHeight-50); 47 } 48 32 49 } 33 50 }

