Context menu not firing when clicking on a line in a MovieClip
- by Quandary
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.