/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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); } } }
URL: http://www.undolog.com/2008/05/18/creare-eventi-personalizzati-in-actionscript-30/
Comments
