Adding an ActionScript eventListener that takes the whole sprite

Posted by Rudy on Stack Overflow See other posts from Stack Overflow or by Rudy
Published on 2010-05-26T18:33:19Z Indexed on 2010/05/26 22:01 UTC
Read the original article Hit count: 285

Hello,

I have a very simple constructor in ActionScript as the following:

public function ButtonTest() {
this.addEventListener(MouseEvent.CLICK, browseFiles);
}

My problem is that when I open the SWF file itself, the window is not full size and the whole area responds to the mouse click. If I expand the window to full size, a margin of like 200 pixels on the left is not clickable. I hope I make some sense.

The issue is that I had the .SWF file in a in my HTML code, and when I make it small, it seems that only the center of the SWF file is clickable.

I hope someone can please help me.

Thank you, Rudy

© Stack Overflow or respective owner

Related posts about actionscript

Related posts about sprite