Flash Builder 4.5 ActionScript Mobile Project의 동영상 자료
플래시빌더 4.5 에서 Actionscript Mobile Project를 이용해 아이폰에서 터치이벤트를 활용한 예제
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.TouchEvent; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; import flash.ui.Multitouch; import flash.ui.MultitouchInputMode; [SWF (backgroundColor="#cccccc", frameRate="60" ) ] public class MultiTouchTest extends Sprite { private var spots:Array; private var tf:TextField; public function MultiTouchTest() { super(); // support autoOrients stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; setTextField(); if ( Multitouch.supportsTouchEvents ) { init(); }else { tf.text = "no support multitouch"; } } private function setTextField():void { tf = new TextField(); tf.autoSize = TextFieldAutoSize.LEFT; tf.text = "hello"; tf.multiline = true; addChild ( tf ); var textFormat:TextFormat = new TextFormat(null, 20 ); tf.setTextFormat( textFormat ); } private function init():void { Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; stage.addEventListener(TouchEvent.TOUCH_BEGIN, touchEventHandler ); stage.addEventListener(TouchEvent.TOUCH_END, touchEventHandler ); spots = []; } protected function touchEventHandler(event:TouchEvent):void { var spot:Sprite; tf.appendText( event.type + "\n" ); tf.appendText( event.touchPointID.toString() + "\n" ); if ( event.type == "touchBegin" ) { spot = getCircle(); spot.x = event.stageX; spot.y = event.stageY; spot.startTouchDrag( event.touchPointID, true ); this.stage.addChild( spot ); spots[event.touchPointID] = spot; } else { spot = this.spots[event.touchPointID]; this.stage.removeChild(spot); delete this.spots[event.touchPointID]; } } private function getCircle( circ:uint = 60 ):Sprite { var sprite:Sprite = new Sprite(); sprite.graphics.beginFill( Math.random() * 0xffffff); sprite.graphics.drawCircle( 0, 0, circ ); return sprite; } } }
Multitouch with TouchPoints
플래시 빌더 4.5 모바일 프로젝트에 관련해서 도움을 얻을 수 있는 사이트
http://www.tutorialsbyibrent.com/
해당 사이트에 있는 소스들
- Flash CS5.5: Debugging via USB on Android
- Flash CS5.5: Simple Android app - Intro and Deploying content
- Flash CS5.5: Simple iOS App
- Flash CS5.5: Simple iOS App - adding a Splash Screen
- FB4.5: Simple Android App - Blank template
- FB4.5: Simple Android App - Debugging via USB
- FB4.5: Basic View App - Android
- FB4.5: Basic View App - ActionBar - Android
- FB4.5: Basic View App - Splash Screen - Android
- FB4.5: Basic View App - ViewMenu - Android
- FB4.5: Basic View App - View Transitions - Android
- FB4.5: Basic View App - List - Android
- FB4.5: Basic View App - Navigation, pushView() - Android
- FB4.5: Basic View App - user profile, user notes - Android
- FB4.5: Android - BasicViewApp - Custom ActionBar
- IconsByiBrent.zip - free to use in your apps
- FB4.5: Tabbed Application - Intro - Android
- FB4.5: Tabbed Application - hide tabBar - Android
- FB4.5: ActionScript Mobile Project - iOS - Multitouch with TouchPoints
- FB4.5: ActionScript Mobile Project - iOS - Multitouch - deploy and optimize on iPad
- FB4.5: AS Mobile Project - Debugging iOS apps and adding a splash screen
- Flash CS5.5: Android - Multitouch - GESTURES - Zoom and Rotate
- FB4.5: Android - Multitouch - GESTURES - Pan
- Flash CS5.5: iOS - Multitouch - GESTURES - Swipe
'AS3 > 아이폰' 카테고리의 다른 글
[AIR] air 2.7 아이폰 어플 제작시 해상도 관련 이슈 (0) | 2011.06.18 |
---|---|
Air 2.6 + flixel 사용해서 만들어진 게임들 (0) | 2011.06.14 |
[모바일] 표시 객체 성능을 향상 시키는 방법 (0) | 2011.06.08 |
[아이폰] 플래시빌더 아이폰 릴리즈시 해상도 체크 (0) | 2011.06.02 |
아이폰 배포시 응용 프로그램의 리소스가 수정되었기 때문에 배포할 수 없을때 (3) | 2011.06.01 |