Context menu not firing when clicking on a line in a MovieClip
Posted
by Quandary
on Stack Overflow
See other posts from Stack Overflow
or by Quandary
Published on 2010-03-15T13:55:56Z
Indexed on
2010/03/15
13:59 UTC
Read the original article
Hit count: 280
Question:
In Flash AS3, I have a furniture movieclip (converted from CAD) in another movieclip [to crop the border].
My first problem was that it didn't fire onclick at all.
So I had to draw a background, and it started working when I did not click on a CAD drawing line. Then I checked mousevent.target for classname, and if it was not CustomMovieClip, I took object.parent.parent. That worked for onclick.
But now I seem to have a similar problem with the contextmenu.
When I right-click anywhere, I get the contextmenu, but the context menu event-handler doesn't fire if I right-clicked on a CAD line (but it works if I right-click on the background)...
The problem now is it doesn't fire, so I can't take target.parent.parent.
© Stack Overflow or respective owner