This repository has been archived by the owner on Jan 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common-flash.js
executable file
·74 lines (66 loc) · 1.76 KB
/
common-flash.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
///////////////////////////////////////////////////////
// Cowglow Co.
// Common Flash Functions
//
// Philip Saa - [email protected]
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////
// FSCommands
///////////////////////////////////////////////////////
fscommand("fullscreen", false);
fscommand("allowscale", false);
fscommand("showmenu", false);
///////////////////////////////////////////////////////
// EventBroadcaster
///////////////////////////////////////////////////////
_global.EventBroadcaster = new Object()
EventBroadcaster.initialize = function(obj){
obj._listeners = new Array();
obj.broadcastMessage = this._broadcastMessage;
obj.addListener = this._addListener;
obj.removeListener = this._removeListener;
}
EventBroadcaster._broadcastMessage = function(){
var eventName = arguments.shift();
var list = this._listeners;
var max = list.length;
for (var i=0; i<max; i++){
list[i][eventName].apply(list[i], arguments);
}
}
EventBroadcaster._addListener = function(obj){
this.removeListener(obj);
this._listeners.push(obj);
return (true);
}
EventBroadcaster._removeListener = function(obj){
var list = this._listeners;
var i = list.length;
while (i--){
if (list[i] == obj){
list.splice(i, 1);
return (true);
}
}
return (true);
}
///////////////////////////////////////////////////////
// Misc. Functions
///////////////////////////////////////////////////////
_global.GetValue = function(sArg1, sArg2){
var sArgValue;
if (sArg1 != undefined){
if (sArg1.length != 0 or sArg1 <> ""){
sArgValue = sArg1;
} else {
sArgValue = sArg2;
}
} else {
sArgValue = sArg2;
}
return sArgValue;
}
_global.sJunk = function(){
var myData = new Date().getMilliseconds();
return myData
}