• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flash Player PPAPI 11.8.800.115 Throws Double MouseEvents

New Here ,
Sep 04, 2013 Sep 04, 2013

Copy link to clipboard

Copied

I also found another bug with this Pepper Flash version and I don't know if it is reported. Mouse wheel throws the event twice instead of one in some cases and I have to make an special control for this. It only happens on Chrome with the Pepper Flash plugin

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 04, 2013 Sep 04, 2013

Copy link to clipboard

Copied

I've branched this into a new discussion to keep things on-topic. 

I've filed this bug on your behalf, and have assigned someone to triage: https://bugbase.adobe.com/index.cfm?event=bug&id=3626630

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 04, 2013 Sep 04, 2013

Copy link to clipboard

Copied

We did a quick triage and aren't seeing this in any of our simple event tests.  It would definitely speed things along if you could attach a simple example with the SWF and source that demonstrates the problem to the bug above.  Please reply to the thread when you do.  It will send me an email notification and I'll get someone on it.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 04, 2013 Sep 04, 2013

Copy link to clipboard

Copied

Hi,

I'm not at work right now and I cannot send you the example. Tomorrow I will try to get a sample and test it. I was using the Mouse_wheel event to set zoom in a map (using Mapquest API without using its implementation for zoom because we didn't like the performance). It worked well in Firefox and Chrome without Pepper Flash, but I will test it again tomorrow. I solved it with a tricky and dirty code, but that's not a solution. I try to clarify my example tomorrow.

Thanks you very much, I really appreciate it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 05, 2013 Sep 05, 2013

Copy link to clipboard

Copied

Hi,

I can't show you any log because I can't debug it in Chrome. If I do it, because I'm not using Pepper it works.

So, I will paste you my code with the problem and the dirty workaround to solve it.

The problem

At other place in the code I have this, only called once: _gmap.addEventListener( MouseEvent.MOUSE_WHEEL , onMapZoomStep);

_gmap is a TileMapComponent from MapQuest API.

And the code is this:

trace("zoom step");

                                        var mouseX:int = e.stageX;

                                        var mouseY:int = e.stageY + factorCorreccion;

 

                                        var latlng:LatLng = _gmap.pixToLL(new Point(mouseX, mouseY));

 

                                        var zoomAct:int = _gmap.zoom;

                                        var delta:int = e.delta;

                                        var sum:int = 1;

                                        if (delta < 0 ) sum = -1;

                                        _gmap.setCenter(latlng, zoomAct + sum );

It enters twice and I get two zooms instead of one.

My dirty workaround

if (!firstTime) {

                                        firstTime = true;

                                        trace("zoom step");

                                        var mouseX:int = e.stageX;

                                        var mouseY:int = e.stageY + factorCorreccion;

 

                                        var latlng:LatLng = _gmap.pixToLL(new Point(mouseX, mouseY));

 

                                        var zoomAct:int = _gmap.zoom;

                                        var delta:int = e.delta;

                                        var sum:int = 1;

                                        if (delta < 0 ) sum = -1;

                                        _gmap.setCenter(latlng, zoomAct + sum );

                                        var t:Timer = new Timer(500); //dirty trick for other browsers or Chrome without Pepper Flash

                                        t.addEventListener(TimerEvent.TIMER, function f(ev:TimerEvent):void {

                                                  t.removeEventListener(TimerEvent.TIMER, f);

                                                  t.stop();

                                                  firstTime = false;

                                        });

                                        t.start();

}

else {

                                        firstTime = false;

}

And it works fine. Thanks for your help.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 05, 2013 Sep 05, 2013

Copy link to clipboard

Copied

Hi,


It would be great if we could get the SWF, or a link to an executable that continues to reproduce the issue.  If you're not comfortable posting a SWF publicly, you can send me a private message (just click my name in the Forum) and I'll get you contact information so that I can just share it with the engineering team.

We need to debug the problem in C++ (not AS3) to figure out why you're getting the double event.  There may be a nuance here that's not even related to your actionscript, but we'd need to run it to see what's up.  The fastest way to fix it is to attach a debugger to the player and run the SWF that demonstrates the problem.  Otherwise, I have to wait a few weeks for someone to get around to making the test media, and hope that they got everything just right to reproduce the situation.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 05, 2013 Sep 05, 2013

Copy link to clipboard

Copied

LATEST

Hi,

For that I have to ask for permission because it is from work. We have it in a development website but I have to ask for permission too. But I can give you a clue. We have this code in Javascript to secure that mouse wheel events arrive to Flash, and maybe something changed in Pepper Flash that makes the flash to correctly receive the mouse_wheel events. And if we have that control in Javascript maybe now it's sending the mouse_wheel event twice.

I didn't have time to test this posibility because I am in a middle of a deadline with other bugs to resolve, but it came to my mind that this can be the problem. I paste you the javascript code:

if (!(document.attachEvent)) {//chrome

                window.addEventListener("mousewheel", handleWheel, false);

            }

            function handleWheel(event) {

                var app = window.document["flashContent"];

                if (app) {

                    var o = { x: event.screenX, y: event.screenY,

                        delta: -event.wheelDelta,

                        ctrlKey: event.ctrlKey, altKey: event.altKey,

                        shiftKey: event.shiftKey

                    }

                    app.handleWheel(o);

                }

            }

In flash we catch it and we do this:

public function handleWheel(event:Object): void {

                                        var obj:InteractiveObject = null;

                                        var objects:Array = getObjectsUnderPoint(new Point(event.x, event.y));

                                        for (var i:int = objects.length - 1; i >= 0; i--) {

                                                  if (objects is InteractiveObject) {

                                                            obj = objects as InteractiveObject;

                                                            break;

                                                  } else {

                                                            if (objects is Shape && (objects as Shape).parent) {

                                                                      obj = (objects as Shape).parent;

                                                                      break;

                                                            }

                                                  }

                                        }

                                        if (obj) {

                                                  var mEvent:MouseEvent = new MouseEvent(MouseEvent.MOUSE_WHEEL, true, false,

                                                            event.x, event.y, obj,

                                                            event.ctrlKey, event.altKey, event.shiftKey,

                                                            false, -Number(event.delta));

                                                  obj.dispatchEvent(mEvent);

                                        }

                              }

We have something similar for Firefox and the other navigators.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines