Customize right click menu in Flash |
| Written by AnaS | |
|
Let's begin! 1. Create a new Adobe Flash 8 document with 300x300 dimensions
Insert two new layers and give them the following names: actions, message and movie, starting from the top to bottom. 2. Draw a rectangleIn the first frame of the movie layer using the Rectangle Tool (R) draw a rectangle about 250x150 and set a blue for the Fill Color and no color for the Stroke Color. 3. Select the rectangle
Choose Modify >> Convert to Symbol (F8). In the Convert to Symbol window set values like in the image below: 4. Select the MovieClip you just createdGo in the Properties panel and give it an instance name of context_mc. 5. Make a text field on the stageGo in the first frame of the message layer. Using the Text Tool (T) from the Tools panel make a text field on the stage, in top of the context_mc. In the Properties panel set the following properties for the text field: Text Type: Dynamic Text, instance name: message_txt, font: Verdana, size: 43, bold, text color #0066CC.
6. Action Script codeGo in the first frame of the actions panel and let's put some ActionScript: /* these are the functions to be called from the right-click menu */
function menu1() /* create a new ContextMenu object*/
contextMenu = new ContextMenu();
7. Now just test the movie (Ctrl+Enter)You can see that the custom Flash context menu appears when your mouse is over the context_mc, if you are outside context_mc the standard menu appears when you right click. Hope this tutorial helps! You need to Register in order to download the FLA file.
written by Nazmul , November 06, 2007
thanks i learned something new!!
written by Hendro Agus , December 11, 2007
hi, how to remove setting and about menu's ?? well, this tutorial is very good.. but, it would be nice if you tell fully own context menu... and there are no existing menu from default of flash it is pure we create the customize right click menu's please advise and can you respond it into my Email to? FYI, presently i'm trying to make a blog on geocities.. could you want to see my blog? this is the URL http://geocities.com/ndro_agus regards hendro
written by ddieguez , January 06, 2008
great tutorial, it helped me a lot. Thanks :D Do you need more help? Ask now!
|
|
| Last Updated ( Friday, 28 March 2008 ) |