History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: FP-352
Type: Bug Bug
Status: New New
Priority: None None
Assignee: Dan Schaffer
Reporter: andy deng
Votes: 9
Watchers: 8
Operations

If you were logged in you would be able to see more operations.
Flash Player

Sprite.getObjectsUnderPoint can't find the object correctly after the Sprite's parent's scaleX or scaleY changed

Created: 05/28/08 03:23 AM   Updated: 01/12/09 12:39 PM
Component/s: Rendering DrawingAPI
Security Level: Public (All JIRA Users )

File Attachments: 1. File getObjectsUnderPoint_Bug.fla (64 kb)
2. File getObjectsUnderPoint_Bug.fla (32 kb)

Image Attachments:

1. after_parentSprite.x+=10.jpg
(10 kb)

2. after_parentSprite.x+=20.jpg
(10 kb)

3. original.jpg
(10 kb)

Severity: Incorrectly Functioning
Reproducibility: Every Time
Discoverability: High
Found in Version: Flex 3 - Beta 2
Affected OS(s): Windows - XP
Steps to Reproduce:
Steps to reproduce:
1. var parentSprite:Sprite = new Sprite(); // the bugSprite's parent Sprite;
    var bugSprite:Sprite = new Sprite(); // bug occured on this
    parentSprite.addChild( bugSprite );

    var shape:Shape = new Shape(); // add a child DisplayObject
    bugSprite.addChild( shape );
    shape.graphics.beginFill( 0 ); // draw something to fill the child
    shape.graphics.drawCircle( 100, 100, 20 );
    shape.graphics.endFill();

2. bugSprite.addEventListener( MouseEvent.MOUSE_OVER, handler );
    ...
    function handler( event:MouseEvent ):void
    {
        var pt:Point = new Point( event.stageX, event.stageY ); // when MOUSE_OVER event occur, the point must be over the child
        if( bugSprite.getObjectsUnderPoint( pt ).length ){
            trace( "OK: getObjectsUnderPoint works well" );
        }else{
            trace( "WARNING: getObjectsUnderPoint find nothing" ); // this line should never execute
        }
    }

3. move the mouse to test if getObjectsUnderPoint works -- yes, it works.
    then:

    parentSprite.scaleX = 2;
    parentSprite.scaleY = 2;

    retry, the bug occurs
 
 Actual Results:

 WARNING: getObjectsUnderPoint find nothing
 
 Expected Results:
 
OK: getObjectsUnderPoint works well

 Workaround (if any):
 
 
 
Language Found: English
Bugbase Id: none
Participants: andy deng and Dan Schaffer


 All   Comments      Sort Order:
andy deng - [05/28/08 05:48 AM ]
the red area is where we can "find" the child

andy deng - [05/28/08 05:52 AM ]
the red area is where we can "find" the child

andy deng - [05/28/08 06:02 AM ]
i think i've found more details:
if the parent's x or y changes, the same thing happens.
in fact, the area we can "find" the child through getObjectsUnderPoint wanes

the snapshot shows this state:
after parentSprite.x changes, the area( red area ) we can "find" the child wanes.