Flash
Right click code for Flash Action Script 3
Ever noticed how when you right-click a flash application you get a whole heap of options: ‘Zoom’, ‘Show all’, ‘Rewind’, etc… they’re not really necessary are they?
Add this code and magically they all disapear! With exception to settings and about – you can also add in two (or one or three, etc.) of your own menu options:
//right click code – table4.com
var rightClick:ContextMenu = new ContextMenu();
rightClick.hideBuiltInItems();
var rightClick1:ContextMenuItem = new ContextMenuItem(“YOUR TEXT”);
var rightClick2:ContextMenuItem = new ContextMenuItem(“MORE TEXT WITH LINK”);
rightClick2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, rightClickUrl);
rightClick.customItems.push(rightClick1, rightClick2);
this.contextMenu = rightClick;
function rightClickUrl(e:ContextMenuEvent):void {
var url:String = “http://www.table4.com/”;
var request:URLRequest = new URLRequest(url);
navigateToURL(request, ‘_blank’);
}
Plumbnation gets a new flash banner for the home page
Our good friends at Plumbnation have got themselves a new and improved flash banner for their homepage. It’s sexier than ever and can be updated quickly to show off their latest products:

www.plumbnation.co.uk
Get URL code for Flash Action Script 3
For get url buttons in AS3, use the following code:
example_btn.addEventListener(MouseEvent.MOUSE_DOWN, example1);
function example1(e:MouseEvent):void {
var request:URLRequest=new URLRequest(“http://www.table4.com/“);
navigateToURL(request, “_self“);
}
Go to frame code for Flash Action Script 3
To go to a frame in AS3, use the following code:
examplebutton_btn.addEventListener(MouseEvent.MOUSE_DOWN, examplebutton);
function examplebutton(event:MouseEvent):void {
gotoAndPlay(FRAME NUMBER HERE);
}
Animated buttons for Flash Action Script 3
For animated buttons in AS3, use the following code:
my_button_mc.buttonMode = true;
my_button_mc.addEventListener(MouseEvent.ROLL_OVER, overHandler);
my_button_mc.addEventListener(MouseEvent.ROLL_OUT, outHandler);
function overHandler(event:MouseEvent) {
event.target.gotoAndPlay(”over”);
}
function outHandler(event:MouseEvent) {
event.target.gotoAndPlay(”out”);
}


