Posted By

gfazioli on 06/02/08


Tagged

event


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

gfazioli
zegenvs
abdsign
outbox
robobobo
benwasilewski
THEPWN3R


Actionscript Custom Event


 / Published in: ActionScript 3
 

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

  1. package {
  2. /*
  3. ** @name : BottoneEvent.as
  4. ** @description : Classe derivata da Event per gestire un proprio evento personalizzato
  5. ** @author : =undo=
  6. ** @web : http://www.undolog.com
  7. ** @email : [email protected]
  8. */
  9. import flash.events.*;
  10. public class BottoneEvent extends Event {
  11. public static const MIOEVENTO:String = 'pluto'; // codice qualsiasi, anche 'mioevento' in minuscolo
  12. public var Valore:Number = NaN;
  13. /*
  14. ** @name : BottoneEvent
  15. ** @description : constructor
  16. */
  17. public function BottoneEvent ( type:String, v:Number, bubbles:Boolean=false, cancelable:Boolean=false ):void {
  18. super(type, bubbles, cancelable);
  19. this.Value = v;
  20. }
  21. /*
  22. ** @override
  23. */
  24. override public function clone():Event {
  25. return new KnobEvent(this.type, this.Value, this.bubbles, this.cancelable);
  26. }
  27. }
  28. }

Report this snippet  

You need to login to post a comment.