×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    100

    Multitouch Gesture in FlashLite 4 and N8

    Has any-one used Multitouch gestures in FlashLite 4 and Nokia N8?

    I test the examples in the Device central and all it works correctly using Multitouch Panel, but when I test the same apps on N8, nothing happens. I am not able to get any of the Muliti-touch gestures working on N8.

    Am I missing out on anthing?

    Following is the sample code for Zoom gesture:

    Code:
    Multitouch.inputMode = MultitouchInputMode.GESTURE;
    square_mc.addEventListener(TransformGestureEvent.GESTURE_ZOOM , onZoom);
    function onZoom(e:TransformGestureEvent):void
    {
    	square_mc.scaleX *= (e.scaleX+e.scaleY)/2;
    	square_mc.scaleY *= (e.scaleX+e.scaleY)/2;
    }

  2. #2
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    100

    Re: Multitouch Gesture in FlashLite 4 and N8

    No one experimenting with FlashLite 4 on N8 still :-(

  3. #3
    Regular Contributor
    Join Date
    Feb 2010
    Posts
    157

    Re: Multitouch Gesture in FlashLite 4 and N8

    Hi,

    I am not sure what multitouch gesture you are looking for to code, but left-right and up-down swipes did work on the N8 when I had coded on the Flash Lite 3.x. If you want, the code is as follows:

    var startX:Number;
    var startY:Number;
    var endX:Number;
    var endY:Number;

    var gesturesListener:Object = new Object();

    gesturesListener.onMouseDown = function()
    {
    startX = _root._xmouse;
    startY = _root._ymouse;
    }
    gesturesListener.onMouseUp = function()
    {
    endX = _root._xmouse;
    endY = _root._ymouse;

    checkGesture();
    }

    Mouse.addListener(gesturesListener);
    // minimum length of an horizontal gesture
    var MIN_H_GESTURE:Number = Stage.width / 3;
    // minimum length of a vertical gesture
    var MIN_V_GESTURE:Number = Stage.height / 3;

    // flags for each kind of gesture
    var UP_TO_DOWN:Number = 1;
    var DOWN_TO_UP:Number = 2;
    var LEFT_TO_RIGHT:Number = 4;
    var RIGHT_TO_LEFT:Number = 8;

    function checkGesture()
    {
    var xDelta:Number = endX - startX;
    var yDelta:Number = endY - startY;

    var gesture:Number = 0;

    if(xDelta > MIN_H_GESTURE)
    gesture |= LEFT_TO_RIGHT;
    else if(xDelta < - MIN_H_GESTURE)
    gesture |= RIGHT_TO_LEFT;

    if(yDelta > MIN_V_GESTURE)
    gesture |= UP_TO_DOWN;
    else if(yDelta < - MIN_V_GESTURE)
    gesture |= DOWN_TO_UP;

    if(gesture > 0)
    handleGesture(gesture);
    trace(gesture);
    }

    function handleGesture(gestureFlags:Number)
    {
    if(gestureFlags & LEFT_TO_RIGHT)
    moveLeft();
    if(gestureFlags & RIGHT_TO_LEFT)
    moveRight();
    if(gestureFlags & UP_TO_DOWN)
    trace("up to down gesture");
    if(gestureFlags & DOWN_TO_UP)
    trace("down to up gesture");
    }
    Regards,
    Supriya Tenany

  4. #4
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    100

    Re: Multitouch Gesture in FlashLite 4 and N8

    Thanks Supriya, but this is not what I am talking about.

    I know about these gestures, I am talking about the Multi-touch gestures which are supported in FlashLite 4 and N8 devices. You can rotate and zoom the content using two fingures, as supported on iphones.

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2005
    Location
    Karachi, Pakistan
    Posts
    277

    Re: Multitouch Gesture in FlashLite 4 and N8

    I tried few days ago for a prototype on N8 for multi-touch gestures. But unfortunately, it didn't worked at all on actual device. I had to switch to Nexus One for the prototype project.

    Not tried again so far, but will take a look again soon as the FL4 docs says, it supports multi-touch gestures.

    // chall3ng3r //
    Faisal Iqbal (skype: chall3ng3r)
    Flash Mobile Specialist | Orison Technologies
    _____________________________________
    blog: F·L·A·S·H·I·S·M
    swf2go: www.swf2go.com

  6. #6
    Registered User
    Join Date
    Apr 2009
    Location
    Hagenberg, Austria
    Posts
    45

    Re: Multitouch Gesture in FlashLite 4 and N8

    I also tried using TouchEvents in FL4 on my N8 but it seems to be unsupported!

    have a look at this thread: http://discussion.forum.nokia.com/fo...amp-TouchEvent

    BR

  7. #7
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Re: Multitouch Gesture in FlashLite 4 and N8

    I second that TouchEvents are not yet implemented in FL 4 on Symbian^3. Tested one of my application and do some simple tests but not able to get any positive result. Waiting for TouchEvents support in next update.

    Regards,
    Sajid Ali Anjum

Similar Threads

  1. Can S60 devices have the support of Multitouch..?
    By kamaljaiswal in forum General Development Questions
    Replies: 1
    Last Post: 2009-02-17, 09:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •