IT Community - Software Programming, Web Development and Technical Support

RightClick option for menu in Flash

This is a discussion on RightClick option for menu in Flash within the Flash Actionscript Programming forums, part of the Web Development category; Does anyone know about the RightClick option for menu in Flash...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Flash Actionscript Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-23-2007, 12:28 AM
bluesky bluesky is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 201
bluesky is on a distinguished road
Question RightClick option for menu in Flash

Does anyone know about the RightClick option for menu in Flash

Last edited by Booom : 08-13-2007 at 11:19 PM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-23-2007, 12:30 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: Can anyone know about the RightClick option for menu in Flash

Hi.. here is your answer..

Right Click menu in Falsh

Goals:

This project is used to create a right click menu.

Steps:

1) Create a Flash document.

2) Create a movieclip and right click the movieclip and goto action.

3) Copy the following code:

onClipEvent(load)
{
//MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This movie is copyrighted by Your Company Name", doSomething);
Functioned2 = new ContextMenuItem("Visite Our Website", doSomething2);
MENU.customItems.push(Functioned);
MENU.customItems.push(Functioned2);
_root.menu = MENU;
function doSomething()
{
}
function doSomething2()
{
getURL("http://www.test.com", _blank);
}
}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-13-2007, 11:16 PM
seesamjagan seesamjagan is offline
D-Web Programmer
 
Join Date: Aug 2007
Location: Chennai
Posts: 66
seesamjagan is on a distinguished road
Send a message via AIM to seesamjagan Send a message via Yahoo to seesamjagan
Post Re: Can anyone know about the RightClick option for menu in Flash

Hi try this logic it will be very usefull and simple
function menuCallback(obj, menuObj) {
menuObj.customItems = [];
if ((obj instanceof MovieClip) && (obj != _level0)) {
menuObj.customItems.push(cutItem);
menuObj.customItems.push(copyItem);
menuObj.customItems.push(pasteItem);
}
}
function mnuCut_click() {
trace("cut");
}
function mnuCopy_click() {
trace("copy");
}
function mnuPaste_click() {
trace("paste");
}
var myMenu = new ContextMenu(menuCallback);
var cutItem = new ContextMenuItem("Cut object", mnuCut_click);
var copyItem = new ContextMenuItem("Copy object", mnuCopy_click);
var pasteItem = new ContextMenuItem("Paste object", mnuPaste_click);
MovieClip.prototype.menu = myMenu;
__________________
SeeSamJagan
- Sky is not the "LIMIT", Death is not the END, There is still something beyond....
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Populate menu using sitemap and asp .net menu control and c#: Archer C# Programming 3 04-29-2008 09:23 PM
ONE SHOT option in Mysql Murali Database Support 0 12-13-2007 04:00 AM
double clicking the option in drop down list menu vijayanand HTML, CSS and Javascript Coding Techniques 3 08-06-2007 06:27 AM
How to disable right click option? Sabari HTML, CSS and Javascript Coding Techniques 1 07-23-2007 09:55 PM
Vertical menu or horizontal menu? capture Web Design Help 1 03-12-2007 06:25 PM


All times are GMT -7. The time now is 06:07 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0