Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
DNSalehi
Posts: 47
Registered: ‎01-26-2011
My Device: Not Specified

Borders of MouseEvent

Why do the borders of my mouseevent's extend so far?

 

For example, the user could click a few inches away where there is nothing there, and it would still register it.

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Borders of MouseEvent

what kind of objects does this happen to? sample would be great! good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
DNSalehi
Posts: 47
Registered: ‎01-26-2011
My Device: Not Specified

Re: Borders of MouseEvent

            [Embed(source="img/btn/extBtn.png")] public static const exbtn1 : Class;

            exbtn = new Image();
            exbtn.setImage(new exbtn1());
            exbtn.x = -70;
            exbtn.y = 470;
            addChild(exbtn);
            exbtn.addEventListener(MouseEvent.MOUSE_DOWN, btnOver);

 

Just of the many clickable images in the app, seems to be happening with most of them.

 

Developer
RottenOgre
Posts: 274
Registered: ‎11-01-2010
My Device: PlayBook?

Re: Borders of MouseEvent

The only thing I can think of is that you've got a large transparent portion in your image and that's what you're clicking on, but you said "a few inches" so it doesn't sound like that.

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Borders of MouseEvent

try doing this on your image:

 

 

exbtn.graphics.clear();
exbtn.graphics.beginFill(0xFF0000);
exbtn.graphics.drawRect(0,0,exbtn.width,exbtn.height);
exbtn.graphics.endFill();

 

and see if it draws outside of the boundary of what it should be doing. good luck!

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
DNSalehi
Posts: 47
Registered: ‎01-26-2011
My Device: Not Specified

Re: Borders of MouseEvent

Ah good call guys, the sides were actually transparant lol, thanks!