Through your web travels, you may have noticed that many websites do not have the typical right-click menu that displays the typical flash options such as ‘forward’ ,’play’ etc. Many contain copyright information, links to the websites designer or is maybe even used as a secondary quick navigation system. This tutorial is going to show you how to edit the right-click menu on your website. An example can be seen on Design Charts as seen below:





To create this:
1) Open up your .FLA and create a layer with a keyframe that we are going to call ‘AS’ (Actionscipt). If you look at the screenshot below you can see that all my content is inside one frame. This is how I design my sites - one keyframe which contains one movicelip which I then design inside. This leaves my main timeline clear, moves me away from designing websites within scenes (don’t do that!) and allows me to create AS on the main timeline that affects everything else. i.e the right click menu.



2) Now right click on this keyframe and scroll down and click ‘Actions’. Firstly we are going to declare functions and tell flash what to do when the user interacts with them. Copy as below but replace the links with where you want flash to go or do.



Above, I created a function and called it ‘clickMenu’. You can call the funciton whatever you like, even ‘dumdidum’ as long as whenever you want to use the function you call it ‘dumdidum’ again. After I create the ‘clickMenu’ function I have not told Flash to do anything, as this is simply going to be text in my menu. However, with ‘clickMenu2′ and ‘clickMenu3′ i have told Flash to open a URL in a new window (’_blank’)

3) Now we are going to edit the Menu directly itself. Copy the below:



So firstly we have told Flash that we are creating a new context Menu and that it should hide the default options. Now here we have told flash to create a new menu item and to make it appear as the text ‘Tutorial By’ and we have given it its function of ‘clickMenu2′. So when somebody clicks ‘Tutorial By….’ , Flash will navigate to the pre-defined URL in a new window.

Copy and apply this concept and there are a number of ways in which you can use the right click menu to add something to your website.

You may download the .FLA.

Here is what I created:

(right-click it)

rightclick.swf

This tutorial was brough to you by Acuity Design