Greetings to all !
Have you ever seen, surfing the net, some SWF which on the right click of the mouse do no show the classic Flash Player menu?
In some case, it will appear a sentence (like a signature) of the SWF creator which will redirect you to his site.
In this article, I will explain to you how to change the menu and add your own signature so to give an extra touch of professionalism to your SWF.

Follow me...

I create a FLA and save it as 'firma.fla'.
I create a Document Class, an AS file saved as 'Firma.as', implemented the following way:
Code:
package
{
	import flash.display.MovieClip;
	import flash.events.ContextMenuEvent;
	import flash.ui.ContextMenu;
	import flash.ui.ContextMenuItem;
	import flash.net.navigateToURL;
	import flash.net.URLRequest;
	
	public class Firma extends MovieClip
	{
		public function Firma()
		{
			initMenu();
		}
		
		public function initMenu():void
		{
			var etichetta:String='© FlepStudio.org';
			var cm:ContextMenu=new ContextMenu();
			var item:ContextMenuItem=new ContextMenuItem(etichetta);
			cm.hideBuiltInItems();
			cm.customItems.push(item);
			item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,clickato);
			this.contextMenu=cm;
		}
		
		private function clickato(event:ContextMenuEvent):void
		{
			var url:String='http://www.flepstudio.org/';
			var request:URLRequest=new URLRequest(url);
			navigateToURL(request,'_parent');
		}
	}
}
Now, try to right click the following SWF:







Let's analyse the code.

Methods


initMenu();
I create a string variable inside which I insert the sentence that I would like to appear on the right click of the mouse on the SWF
var etichetta:String='© FlepStudio.org';
I create a new ContextMenu
var cm:ContextMenu=new ContextMenu();
I create a new ContextMenuItem to which I pass the value of the variable 'etichetta'
var item:ContextMenuItem=new ContextMenuItem(etichetta);
I tell the ContextMenu not to show its default menu
cm.hideBuiltInItems();
I push the variable 'item' into the properties of cm's customItems (the ContextMenu). It certainly must be a getter/setter nested in a Array.
cm.customItems.push(item);
I add a listener to the event MENU_ITEM_SELECT, so that once clicked the voice on the menu, the function clickato() is called
item.addEventListener(ContextMenuEvent.MENU_ITEM_S ELECT,clickato);
I add to my SWF the new ContextMenu ('this' equal in this case the TimeLine, the FLA, the ex _root)
this.contextMenu=cm;



clickato();
I create a string variable containing the url where I want the user to be redirected
var url:String='http://www.flepstudio.org/';
I create an instance of the URLRequest class passing it the value of the variable 'url'
var request:URLRequest=new URLRequest(url);
I tell flash to redirect the browser (using the navigateToUrl class) to the url contained into the variable 'url'
navigateToURL(request,'_parent');

Stay tuned !