How to hide right click flash menu using a little AS

2.10.2008, 18:0
Submited in: Flash | Total Views: 20102

Have you ever want, that, after you have created some movie, animation, intro, header… in flash, someone who visiting your site couldn’t choose right click and zoom in, zoom out your movie, set the quality…? In other words, have you ever want to hide your right click flash menu? No problem! Reading this simple action script tutorial, you’ll see how to apply action script on any flash project, which will hide your right click menu. Let’s go! :)


If you choose right click on this picture, you can’t zoom in, zoom out it! You hide a right click flash menu.



If you now choose choose right click, you can zoom in, zoom out the image, because you didn’t hide right click flash menu!

Step 1

Create some flash movie, animation, or import any picture into a  flash stage (Ctrl+R) that you will use for this example. You can also, if you like save my picture below.

Step 2

After you have imported, created any picture, movie… click on the first frame and go to the Action Script Panel (F9). Then, enter the following action script code inside the actions panel:

var NoMenu:ContextMenu = new ContextMenu ();
NoMenu.hideBuiltInItems(); = NoMenu;

That’s it! :) If you now test your movie (Ctrl+Enter) and choose the right click on movie, picture, you can’t zoom in, zoom out it or change the quality. ;)

Have a nice day!

Download example

Are you a website owner?
Click here to register and submit your tutorials!

Browse by category

Most popular tutorials