How to hide right click flash menu using a little AS
Submited in: Flash
| Total Views: 19818
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!
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.
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 ();
this.menu = 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!