android - Air zoom gesture doesn't work at all -


i have simple test flash develop air mobile project latest sdk , try make work zoom gesture. when launch on sgs nothing gonna happen on zoom gesture, image added stage. here sample code:

package { import flash.display.bitmap; import flash.display.movieclip; import flash.ui.multitouch; import flash.events.transformgestureevent; import flash.ui.multitouchinputmode; public class main extends movieclip { [embed(source = "elevator.png")] public static const graph:class; public var elevator:bitmap; public function main() { elevator = new graph(); elevator.x = 0; elevator.y = 0; addchild(elevator); init(); } private function init():void { if(multitouch.supportsgestureevents) { setupgestures(); } else { trace("it no worky"); } } private function setupgestures():void { multitouch.inputmode = multitouchinputmode.gesture; elevator.addeventlistener(transformgestureevent.gesture_rotate, handlegestures); elevator.addeventlistener(transformgestureevent.gesture_zoom, handlegestures); } private function handlegestures(event:transformgestureevent):void { if(event.type == "gesturerotate") { elevator.rotation += event.rotation; } else { elevator.scalex *= event.scalex; elevator.scaley *= event.scaley; } } } } 

where mistake?

updated. here application.xml:

<?xml version="1.0" encoding="utf-8" ?> 

<id>air.multitouch</id> <versionnumber>0.1</versionnumber> <supportedprofiles>mobiledevice</supportedprofiles> <filename>multitouch</filename> <name>multitouch</name> <description></description> <copyright></copyright> <android> <manifestadditions><![cdata[ <manifest android:installlocation="auto"> <uses-permission android:name="android.permission.internet"/> <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/> </manifest> ]]></manifestadditions> </android> <iphone> <infoadditions><![cdata[ <key>uistatusbarstyle</key> <string>uistatusbarstyleblackopaque</string> <key>uirequirespersistentwifi</key> <string>no</string> <key>uiprerenderedicon</key> <true/> <key>uiapplicationexitsonsuspend</key> <true/> <key>uidevicefamily</key> <array> <!-- iphone support --> <string>1</string> <!-- ipad support --> <!--<string>2</string>--> </array> ]]></infoadditions> <requesteddisplayresolution>high</requesteddisplayresolution> </iphone> <initialwindow> <title>multitouch</title> <content>multitouch.swf</content> <visible>true</visible> <fullscreen>true</fullscreen> <autoorients>false</autoorients> <aspectratio>landscape</aspectratio> <rendermode>direct</rendermode> </initialwindow> <icon> <image48x48>icons/icon_48.png</image48x48> <image57x57>icons/icon_57.png</image57x57> <image72x72>icons/icon_72.png</image72x72> <image114x114>icons/icon_114.png</image114x114> <image512x512>icons/icon_512.png</image512x512> </icon> <!-- air options: http://livedocs.adobe.com/flex/3/html/file_formats_1.html#1043413 air mobile options: http://help.adobe.com/en_us/air/build/wsfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffe.html android manifest documentation: http://developer.android.com/guide/topics/manifest/manifest-intro.html --> 

up. here example .apk https://dl.dropbox.com/u/78904724/multitouch.apk

i think gestures work interactiveobject-s, wrap (elevator) in sprite.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -