Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

DedosMedia

Members
  • Posts

    2
  • Joined

  • Last visited

DedosMedia's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Thanks Jack.. Well it seems you are right... It's most an AIR issue. Whenever I call dispatchEvent(event), it tries to clone the event before redispatching it. And it crash when trying to clone a touchEvent. I was able to reproduce the issue without using BlitMask, so it's not an BlitMask issue. Anyway I found a workaround, if someone is having the same issue: Instead of redispath a touch event, just create a new TouchEvent, copy the properties you need and dispatch the new event. protected function _mouseEventPassthrough(event:Event):void { if (this.mouseEnabled && (!_bitmapMode || (event is MouseEvent && this.hitTestPoint(MouseEvent(event).stageX, MouseEvent(event).stageY, false)))) { if (hasEventListener(event.type)) { if (event.type.indexOf("touch") != -1) { var e:TouchEvent = event as TouchEvent; dispatchEvent(new TouchEvent(e.type, e.bubbles, e.cancelable, e.touchPointID)); } else { dispatchEvent(event); } } } }
  2. Hi... I found this issue too and I was able to reproduce it... The only thing you need to reproduce it is: A Blitmask with bitmapMode = false. Then touch the Blitmask on the PC, and once you touch the blitmask Adobe AIR crashes, even although I have not added any listener to the blitmask. I am working on Windows 8.1 x64 TouchScreen PC (Microsoft Surface Pro 1) and Adobe AIR 19. As deloki says, the issue comes from the dispatchEvent(event) line: /** @private **/ protected function _mouseEventPassthrough(event:Event):void { if (this.mouseEnabled && (!_bitmapMode || (event is MouseEvent && this.hitTestPoint(MouseEvent(event).stageX, MouseEvent(event).stageY, false)))) { dispatchEvent(event); } You can download the FlashDevelop project showing the issue here: https://dl.dropboxusercontent.com/u/20568397/Blitmask-Issue.rar And the deployed version for Windows: https://dl.dropboxusercontent.com/u/20568397/Blitmask-Issue-captive-runtime.air Here is the code to reprodduce the issue... package { import flash.display.MovieClip; import flash.display.Sprite; import flash.ui.Multitouch; import flash.ui.MultitouchInputMode; import flash.events.TouchEvent; import flash.events.MouseEvent; import com.greensock.BlitMask; /** * ... * @author Diego Diaz */ public class Main extends Sprite { private var blitmask:BlitMask; private var content:MovieClip; private var blitmask_mode:MovieClip; private var bitmapMode:Boolean = true; public function Main() { // Enable TouchMode Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; // Content to be masked content = new EndlessScrollView(); addChild(content); // Just a button to toggle blitmask BitmapMode blitmask_mode = new BlitmaskMode(); addChild(blitmask_mode); blitmask_mode.y = 500; blitmask_mode.addEventListener(MouseEvent.CLICK, onClick); blitmask = new BlitMask(content, 0, 0, 407, 407, false, true, 0, false); } // Toggle BlitMask bitmapMode private function onClick(e:MouseEvent):void { bitmapMode = !bitmapMode; bitmapMode?blitmask_mode.gotoAndStop("on"):blitmask_mode.gotoAndStop("off"); blitmask.bitmapMode = bitmapMode; } } } Hope you can help us to handle this issue. Regards, Diego
×