Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-21264

Component going in/out of 3D dispatches multiple mouseOver/Out events

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • Events
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Run the code below
      2. Move the mouse into the button area (and stay there)
      3. Watch the trace output in the console

      Actual Results:
      Note that we get multiple over/out events (I count three overs, two outs)

      Expected Results:
      we should only get a single mouseOver event

      The key to the problem is that we're taking the object in and out of 3D by incrementing Z (slightly) for each event (if you change 'z' to 'x' in the code below, you will not see the problem). For some reason, this triggers Flex or the Player to issue a mouseOut event, then we notice that the mouse is over the object, so we issue another Over event, and so on.

      I tried to reproduce this in Flash authoring, but was unable to, so perhaps there is something peculiar about the way we're doing things with Flex components that is triggering the issue.

      The code:
      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
      <fx:Script>
      <![CDATA[
      import flash.events.MouseEvent;
      private function mouseOverHandler(event:MouseEvent):void

      { button.z -= .01; trace("mouseOver on " + event.currentTarget); }

      private function mouseOutHandler(event:MouseEvent):void

      { button.z += .01; trace("mouseOut on " + event.currentTarget); }

      ]]
      >
      </fx:Script>
      <s:Button id="button" x="10" mouseOver="mouseOverHandler(event)" mouseOut="mouseOutHandler(event)"/>
      </s:Application>

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: