| 1 | /** |
|---|
| 2 | * Event types fired by the View. |
|---|
| 3 | **/ |
|---|
| 4 | package com.jeroenwijering.events { |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | import flash.events.Event; |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | public class ViewEvent extends Event { |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | /** Identifiers for the accepted event types. **/ |
|---|
| 14 | public static var FULLSCREEN:String = "FULLSCREEN"; |
|---|
| 15 | public static var ITEM:String = "ITEM"; |
|---|
| 16 | public static var LINK:String = "LINK"; |
|---|
| 17 | public static var LOAD:String = "LOAD"; |
|---|
| 18 | public static var META:String = "META"; |
|---|
| 19 | public static var MUTE:String = "MUTE"; |
|---|
| 20 | public static var NEXT:String = "NEXT"; |
|---|
| 21 | public static var PLAY:String = "PLAY"; |
|---|
| 22 | public static var PREV:String = "PREV"; |
|---|
| 23 | public static var QUALITY:String = "QUALITY"; |
|---|
| 24 | public static var RESIZE:String = "RESIZE"; |
|---|
| 25 | public static var SEEK:String = "SEEK"; |
|---|
| 26 | public static var STOP:String = "STOP"; |
|---|
| 27 | public static var VOLUME:String = "VOLUME"; |
|---|
| 28 | /** The data associated with the event. **/ |
|---|
| 29 | private var _data:Object; |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | /** |
|---|
| 33 | * Constructor; sets the event type and inserts the new value. |
|---|
| 34 | * |
|---|
| 35 | * @param typ The type of event. |
|---|
| 36 | * @param dat An object with all associated data. |
|---|
| 37 | **/ |
|---|
| 38 | public function ViewEvent(typ:String,dat:Object=undefined,bbl:Boolean=false,ccb:Boolean=false):void { |
|---|
| 39 | super(typ, bbl, ccb); |
|---|
| 40 | _data = dat; |
|---|
| 41 | }; |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | /** Returns the associated data. **/ |
|---|
| 45 | public function get data():Object { |
|---|
| 46 | return _data; |
|---|
| 47 | }; |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | } |
|---|