Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I happened to play around with habbo.com social game portal.

It clearly uses Adobe Flash as platform (if you look into the source code of the HTML page). But when you do right mouse click you don't get the Flash right-click menu popping up!

Does anybody have an idea how this is done?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

That's more a question for StackOverflow, but anyway ...

The idea is to disable the right-click menu in the JavaScript of the page, then pass that event to the underlying Flash application via the ExternalInterface class (ExternalInterface.addCallback("rightClick", rightClickHandlerMethod); or similar).

An example application with source code can be found on the Another-D-Mention blog in the "Right click and custom context menu in Flash/Flex" article.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.