RSS
email

Creating custom flash menu:



Step1: Open New document in flash (Ctrl + N)

Step2: Select first frame, right-click and paste the below code in first frame

code contains explanations

var con:ContextMenu = new ContextMenu();//The ContextMenu class provides runtime control over the items in the Flash Player context menu, which appears when a user right-clicks (Windows) or Control-clicks (Macintosh) on Flash Player.
con.hideBuiltInItems();//Hides all built-in menu items (except Settings) in the specified ContextMenu object
var new_menu:ContextMenuItem = new ContextMenuItem("sara_blog", fun);//creating new menu item-fun is the event handler called on click
con.customItems.push(new_menu);//adding the new item to context menu
function fun() {
getURL("http://sara-intop.blogspot.com/","_blank")//calling new url on click
}
_root.menu = con;//Associates the ContextMenu object con



your are done now run flash and right click

Bookmark and Share

3 comments:

Anonymous said...

swf files linking and a transition must play before opening the each swf file while clicked on the button

Anonymous said...

This doesnt work in Flash CS3.

Saravanan said...

HI,

This is for Actionscript 2.0...

 

Recent Posts

Recent Visitors

Donate Me

About Me

My photo
Chennai, Tamil nadu, India
Nothing more to say about me.. Just a Action Script programmer / Flex developer having 4.5 years of experience.