| [1] | 1 | /** |
|---|
| [88] | 2 | * Definitions for all event types fired by the Controller. |
|---|
| 3 | * |
|---|
| 4 | * Import this class into your project/plugin for strong-typed api references. |
|---|
| [1] | 5 | **/ |
|---|
| 6 | package com.jeroenwijering.events { |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | import flash.events.Event; |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | public class ControllerEvent extends Event { |
|---|
| 13 | |
|---|
| 14 | |
|---|
| [88] | 15 | /** Definitions for all event types. **/ |
|---|
| [1] | 16 | public static var ERROR:String = "ERROR"; |
|---|
| 17 | public static var ITEM:String = "ITEM"; |
|---|
| 18 | public static var MUTE:String = "MUTE"; |
|---|
| 19 | public static var PLAY:String = "PLAY"; |
|---|
| 20 | public static var PLAYLIST:String = "PLAYLIST"; |
|---|
| 21 | public static var QUALITY:String = "QUALITY"; |
|---|
| 22 | public static var RESIZE:String = "RESIZE"; |
|---|
| 23 | public static var SEEK:String = "SEEK"; |
|---|
| 24 | public static var STOP:String = "STOP"; |
|---|
| 25 | public static var VOLUME:String = "VOLUME"; |
|---|
| [110] | 26 | public static var BUTTON:String = "BUTTON"; |
|---|
| [1] | 27 | /** The data associated with the event. **/ |
|---|
| 28 | private var _data:Object; |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | /** |
|---|
| [88] | 32 | * Constructor; sets the event type and inserts the data value. |
|---|
| [1] | 33 | * |
|---|
| 34 | * @param typ The type of event. |
|---|
| 35 | * @param dat An object with all associated data. |
|---|
| 36 | **/ |
|---|
| [57] | 37 | public function ControllerEvent(typ:String,dat:Object=undefined,bbl:Boolean=false,ccb:Boolean=false):void { |
|---|
| [1] | 38 | super(typ,bbl,ccb); |
|---|
| 39 | _data = dat; |
|---|
| 40 | }; |
|---|
| 41 | |
|---|
| [88] | 42 | |
|---|
| 43 | /** Returns the data associated with the event. **/ |
|---|
| [1] | 44 | public function get data():Object { |
|---|
| 45 | return _data; |
|---|
| 46 | }; |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | } |
|---|