差分発生行の前後
無視リスト:
コミット日時:
2008/12/16 00:28:25 (3 年前)
コミッタ:
uranodai
ログメッセージ:

--

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/StreetView/trunk/samples/Sample.as

    r1227 r2058  
    22{ 
    33        import flash.display.Sprite; 
     4        import flash.display.StageAlign; 
     5        import flash.display.StageScaleMode; 
     6        import flash.events.Event; 
    47        import flash.events.KeyboardEvent; 
    58        import flash.ui.Keyboard; 
    69         
    710        import uranodai.streetview.StreetView; 
     11        import uranodai.streetview.data.LocationData; 
     12        import uranodai.streetview.data.Shibuya; 
    813 
    9         [SWF(width="300",height="350",frameRate="30",backgroundColor="#FFFF00")] 
     14        [SWF(width="500",height="550",frameRate="30",backgroundColor="#FFFF00")] 
    1015 
    1116        public class Sample extends Sprite 
     
    1520                public function Sample() 
    1621                { 
    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); 
    1929                        addChild(streetView); 
     30                         
     31                        stage.addEventListener(Event.RESIZE, onResize); 
    2032                         
    2133                        stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); 
     
    2537                { 
    2638                        if(e.keyCode == Keyboard.UP){ 
    27                                 //進む 
     39                                //進む    
    2840                                streetView.goFront(); 
    2941                        } 
    3042                } 
    3143                 
     44                private function onResize(e:Event):void 
     45                { 
     46                        streetView.resize(stage.stageWidth, stage.stageHeight-50); 
     47                } 
     48                 
    3249        } 
    3350}