Parent Directory | Revision Log
Revision 1.1 - (view) (download)
1 : | thiswind | 1.1 | //**************************************************************************** |
2 : | //Copyright (C) 2004-2005 Macromedia, Inc. All Rights Reserved. | ||
3 : | //The following is Sample Code and is subject to all restrictions on | ||
4 : | //such code as contained in the End User License Agreement accompanying | ||
5 : | //this product. | ||
6 : | //**************************************************************************** | ||
7 : | |||
8 : | import mx.video.*; | ||
9 : | |||
10 : | class mx.video.VideoError extends Error { | ||
11 : | |||
12 : | #include "ComponentVersion.as" | ||
13 : | |||
14 : | private static var BASE_ERROR_CODE:Number = 1000; | ||
15 : | |||
16 : | /** | ||
17 : | * Unable to make connection to server or to find FLV on server | ||
18 : | */ | ||
19 : | public static var NO_CONNECTION:Number = 1000; | ||
20 : | |||
21 : | /** | ||
22 : | * No matching cue point found | ||
23 : | */ | ||
24 : | public static var NO_CUE_POINT_MATCH:Number = 1001; | ||
25 : | |||
26 : | /** | ||
27 : | * Illegal cue point | ||
28 : | */ | ||
29 : | public static var ILLEGAL_CUE_POINT:Number = 1002; | ||
30 : | |||
31 : | /** | ||
32 : | * Invalid seek | ||
33 : | */ | ||
34 : | public static var INVALID_SEEK:Number = 1003; | ||
35 : | |||
36 : | /** | ||
37 : | * Invalid content path | ||
38 : | */ | ||
39 : | public static var INVALID_CONTENT_PATH:Number = 1004; | ||
40 : | |||
41 : | /** | ||
42 : | * Invalid xml | ||
43 : | */ | ||
44 : | public static var INVALID_XML:Number = 1005; | ||
45 : | |||
46 : | /** | ||
47 : | * No bitrate match | ||
48 : | */ | ||
49 : | public static var NO_BITRATE_MATCH:Number = 1006; | ||
50 : | |||
51 : | /** | ||
52 : | * Cannot delete default VideoPlayer | ||
53 : | */ | ||
54 : | public static var DELETE_DEFAULT_PLAYER:Number = 1007; | ||
55 : | |||
56 : | private var _code:Number; | ||
57 : | |||
58 : | public function VideoError(errCode:Number , msg:String) { | ||
59 : | _code = errCode; | ||
60 : | message = "" + errCode + ": " + ERROR_MSG[errCode - BASE_ERROR_CODE] + ((msg == undefined) ? "" : (": " + msg)); | ||
61 : | name = "VideoError"; | ||
62 : | } | ||
63 : | |||
64 : | /** | ||
65 : | * Error code | ||
66 : | */ | ||
67 : | public function get code():Number { return _code; } | ||
68 : | |||
69 : | private static var ERROR_MSG:Array = [ | ||
70 : | "Unable to make connection to server or to find FLV on server", | ||
71 : | "No matching cue point found", | ||
72 : | "Illegal cue point", | ||
73 : | "Invalid seek", | ||
74 : | "Invalid contentPath", | ||
75 : | "Invalid xml", | ||
76 : | "No bitrate match, must be no default flv", | ||
77 : | "Cannot delete default VideoPlayer" | ||
78 : | ]; | ||
79 : | |||
80 : | } // class mx.video.VideoError |
cvs-admin | ViewVC Help |
Powered by ViewVC 1.0.0 |