| 1 |
package |
|---|
| 2 |
{ |
|---|
| 3 |
import flash.display.Sprite; |
|---|
| 4 |
import uranodai.streetview.StreetView; |
|---|
| 5 |
|
|---|
| 6 |
[SWF(width="500",height="300",frameRate="24",backgroundColor="#999999")] |
|---|
| 7 |
public class main extends Sprite |
|---|
| 8 |
{ |
|---|
| 9 |
public var streetView:StreetView; |
|---|
| 10 |
|
|---|
| 11 |
public function main() |
|---|
| 12 |
{ |
|---|
| 13 |
// 500x300のStreetViewインスタンスを作成する |
|---|
| 14 |
streetView = new StreetView(500, 300); |
|---|
| 15 |
// 表示リストに追加する |
|---|
| 16 |
addChild(streetView); |
|---|
| 17 |
// ストリートビューアプリケーションをロードする |
|---|
| 18 |
streetView.load("http://uranodai.com/docs/streetview/"); |
|---|
| 19 |
// ロード完了ハンドラーを設定する |
|---|
| 20 |
streetView.handleLoad = handleLoad; |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
public function handleLoad():void |
|---|
| 24 |
{ |
|---|
| 25 |
// 原宿神宮前交差点を表示する |
|---|
| 26 |
streetView.gotoLatLng(35.668478, 139.705363); |
|---|
| 27 |
} |
|---|
| 28 |
} |
|---|
| 29 |
} |
|---|