PageRenderTime 344ms CodeModel.GetById 181ms app.highlight 2ms RepoModel.GetById 159ms app.codeStats 0ms

/src/away3d/events/ParserEvent.as

http://github.com/away3d/away3d-core-fp11
ActionScript | 47 lines | 24 code | 8 blank | 15 comment | 0 complexity | fd08ee119c6060dabbe5b3b98cb6e9ce MD5 | raw file
 1package away3d.events
 2{
 3	import flash.events.Event;
 4	
 5	public class ParserEvent extends Event
 6	{
 7		private var _message:String;
 8		
 9		/**
10		 * Dispatched when parsing of an asset completed.
11		 */
12		public static const PARSE_COMPLETE:String = 'parseComplete';
13		
14		/**
15		 * Dispatched when an error occurs while parsing the data (e.g. because it's
16		 * incorrectly formatted.)
17		 */
18		public static const PARSE_ERROR:String = 'parseError';
19		
20		/**
21		 * Dispatched when a parser is ready to have dependencies retrieved and resolved.
22		 * This is an internal event that should rarely (if ever) be listened for by
23		 * external classes.
24		 */
25		public static const READY_FOR_DEPENDENCIES:String = 'readyForDependencies';
26		
27		public function ParserEvent(type:String, message:String = '')
28		{
29			super(type);
30			
31			_message = message;
32		}
33		
34		/**
35		 * Additional human-readable message. Usually supplied for PARSE_ERROR events.
36		 */
37		public function get message():String
38		{
39			return _message;
40		}
41		
42		public override function clone():Event
43		{
44			return new ParserEvent(type, message);
45		}
46	}
47}