Return to Snippet

Revision: 6620
at June 2, 2008 18:39 by gfazioli


Initial Code
package {
	/*
	** @name	: BottoneEvent.as
	** @description	: Classe derivata da Event per gestire un proprio evento personalizzato
	** @author	: =undo=
	** @web		: http://www.undolog.com
	** @email	: [email protected]
	*/
	import flash.events.*;
	public class BottoneEvent extends Event {
		public static const MIOEVENTO:String	   = 'pluto'; // codice qualsiasi, anche 'mioevento' in minuscolo
		public var Valore:Number				   = NaN;
		/*
		** @name			: BottoneEvent
		** @description	 : constructor
		*/
		public function BottoneEvent ( type:String, v:Number, bubbles:Boolean=false, cancelable:Boolean=false ):void {
			super(type, bubbles, cancelable);
			this.Value = v;
		}
		/*
		** @override
		*/
		override public function clone():Event	{
			return new KnobEvent(this.type, this.Value, this.bubbles, this.cancelable);
		}
	}
}

Initial URL
http://www.undolog.com/2008/05/18/creare-eventi-personalizzati-in-actionscript-30/

Initial Description

                                

Initial Title
Actionscript Custom Event

Initial Tags
event

Initial Language
ActionScript 3