Skip to main content
March 4, 2012
Question

System Bar (or status bar) Hindering Drop and Drag

  • March 4, 2012
  • 1 reply
  • 450 views

I built an air app in flash pro. I have pots (movieclips) that the user can drag to burners on a stovetop. The pots are the only targets and if you drag a pot anywhere else, they should snap to the nearest burner.

But draging a movieclip over the sytem bar in iOS or any version of android, mouse_up or touch_end mouse events are not sent. So the object just hovers there. any ideas anybody to fix this issue?

This topic has been closed for replies.

1 reply

March 6, 2012

What is your on touch_end function assigned to? is it to the object so pots.addEvent change it to stage.addEvent but just for the touch_end function not for the touch_begin. Because when you drag your finger off the screen your touch ends but not over your object so flash still thinks you are holding the object assigning the touch end event to the stage will solve this.

March 12, 2012

thanks for responding. sorry i missed seeing your response till now. i missed the email to notify me somehow.

i did assign the touch_end to the stage.

//http://help.adobe.com/en_US/as3/dev/WS1ca064e08d7aa93023c59dfc1257b16a3d6-7ffe.html

function fingerLeave(e:TouchEvent) :void {

               if (e.isPrimaryTouchPoint == false)

                    return;

               pot.stopDrag();

               if (e.stageX <= 0){

                  //send pot to closest burner nearest this part of the stage

               } else if (e.stageX >= stage.stageWidth){

                         //send pot to closest burner nearest this part of the stage}

                   ...

                   ...

}

this had no effect for me when the pot is dragged over the system bar. It would just get stuck there.