Advertisement
Guest User

CrestronUI.swf decoded

a guest
Oct 16th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 191.63 KB | None | 0 0
  1. package Crestron {
  2. import flash.events.*;
  3.  
  4. public class ConnectEvent extends Event {
  5.  
  6. public function ConnectEvent(_arg1:String){
  7. super(_arg1);
  8. }
  9. }
  10. }//package Crestron
  11. package Crestron {
  12. import flash.events.*;
  13.  
  14. public class DisconnectEvent extends Event {
  15.  
  16. public function DisconnectEvent(_arg1:String){
  17. super(_arg1);
  18. }
  19. }
  20. }//package Crestron
  21. package Crestron {
  22. import flash.events.*;
  23. import flash.net.*;
  24. import flash.utils.*;
  25.  
  26. public class CNXConnection extends Socket {
  27.  
  28. public static const HEARTBEAT:String = "heartbeat";
  29. public static const CONNECT:String = "cnxconnect";
  30. public static const ALLCLEAR:String = "allclear";
  31. private static const ONE_SECOND:int = 1000;
  32. private static const NO_CONNECT_TIMEOUT = -1;
  33. public static const MAX_SLOT:int = 50;
  34. public static const MAX_ANALOG_JOIN:int = 0xFFFF;
  35. private static const TIMER_INTERVAL:int = 500;
  36. public static const DISCONNECT:String = "cnxdisconnect";
  37. private static const REPEAT_DIGITAL_NOT_FOUND:int = -1;
  38. public static const MAX_DIGITAL_JOIN:int = 0xFFFF;
  39. public static const MAX_SEND_STRING:int = 123;
  40. public static const ERROR:String = "cnxerror";
  41. public static const ANALOG:String = "analog";
  42. public static const SERIAL:String = "serial";
  43. public static const DIGITAL:String = "digital";
  44. private static const CONNECT_TIMEOUT_LENGTH = 30000;
  45.  
  46. private var m_iConnectTimeoutTime:int = -1;
  47. private var m_sIP:String = null;
  48. private var m_iIPID:int = 3;
  49. private var m_iHandle:int = 0;
  50. private var m_connection_supports_repeat_digitals:Boolean = true;
  51. private var response:String = "";
  52. private var m_buffer:Array;
  53. private var m_active_heartbeat:int = 0;
  54. private var m_waiting_for_heartbeat_response:Boolean = false;
  55. private var m_repeat_digitals:Array = null;
  56. private var m_heartbeat_interval:int = 0;
  57. private var m_bConnected:Boolean = false;
  58. private var m_heartbeat_event_timeout = 0;
  59. private var m_timer:Timer = null;
  60. private var m_next_heartbeat_event:int = 0;
  61. private var m_missed_heartbeat_response:Boolean = false;
  62.  
  63. public function CNXConnection(_arg1:String=null, _arg2:uint=41794, _arg3:int=3){
  64. m_iIPID = 3;
  65. m_iHandle = 0;
  66. m_sIP = null;
  67. response = "";
  68. m_timer = null;
  69. m_heartbeat_interval = 0;
  70. m_active_heartbeat = 0;
  71. m_waiting_for_heartbeat_response = false;
  72. m_missed_heartbeat_response = false;
  73. m_heartbeat_event_timeout = 0;
  74. m_next_heartbeat_event = 0;
  75. m_repeat_digitals = null;
  76. m_connection_supports_repeat_digitals = true;
  77. m_bConnected = false;
  78. m_iConnectTimeoutTime = NO_CONNECT_TIMEOUT;
  79. m_buffer = new Array();
  80. super(_arg1, _arg2);
  81. configureListeners();
  82. m_sIP = _arg1;
  83. m_iIPID = _arg3;
  84. }
  85. private function onConnect(_arg1:Event):void{
  86. if (m_repeat_digitals != null){
  87. m_repeat_digitals = null;
  88. };
  89. m_repeat_digitals = new Array();
  90. m_iConnectTimeoutTime = (getTimer() + CONNECT_TIMEOUT_LENGTH);
  91. enableTimer(true);
  92. }
  93. private function SendHeartbeat():void{
  94. var _local1:ByteArray;
  95. _local1 = new ByteArray();
  96. _local1[0] = 13;
  97. _local1[1] = 0;
  98. _local1[2] = 2;
  99. _local1[3] = (m_iHandle / 0x0100);
  100. _local1[4] = (m_iHandle % 0x0100);
  101. this.writeBytes(_local1);
  102. this.flush();
  103. }
  104. private function connError(_arg1:Event):void{
  105. cnxDisconnect();
  106. }
  107. public function SendDigital(_arg1:int, _arg2:Boolean, _arg3:int=0):void{
  108. var _local4:ByteArray;
  109. var _local5:int;
  110. if (this.connected == false){
  111. return;
  112. };
  113. _local4 = new ByteArray();
  114. _local5 = 0;
  115. if (_arg3 > 0){
  116. _local5 = 3;
  117. };
  118. _local4[0] = 5;
  119. _local4[1] = 0;
  120. _local4[2] = (6 + _local5);
  121. _local4[3] = Math.floor((m_iHandle / 0x0100));
  122. _local4[4] = (m_iHandle % 0x0100);
  123. _local4[5] = (3 + _local5);
  124. if (_arg3 > 0){
  125. _local4[6] = 32;
  126. _local4[7] = _arg3;
  127. _local4[8] = 3;
  128. };
  129. _arg1--;
  130. _local4[(6 + _local5)] = 0;
  131. _local4[(7 + _local5)] = (_arg1 % 0x0100);
  132. if (_arg2 == false){
  133. _local4[(8 + _local5)] = (Math.floor((_arg1 / 0x0100)) | 128);
  134. } else {
  135. _local4[(8 + _local5)] = Math.floor((_arg1 / 0x0100));
  136. };
  137. this.writeBytes(_local4);
  138. this.flush();
  139. }
  140. private function HandleDataPacket(_arg1:Array):void{
  141. var _local2:int;
  142. var _local3:int;
  143. var _local4:int;
  144. var _local5:uint;
  145. var _local6:uint;
  146. var _local7:uint;
  147. var _local8:Boolean;
  148. var _local9:String;
  149. var _local10:int;
  150. var _local11:int;
  151. var _local12:int;
  152. var _local13:DigitalEvent;
  153. var _local14:AnalogEvent;
  154. var _local15:SerialEvent;
  155. var _local16:int;
  156. var _local17:int;
  157. var _local18:ClearAllEvent;
  158. _local2 = ((_arg1[3] * 0x0100) + _arg1[4]);
  159. _local3 = ((_arg1[1] * 0x0100) + _arg1[2]);
  160. _local4 = 0;
  161. _local5 = 0;
  162. _local6 = 0;
  163. _local7 = 0;
  164. _local8 = true;
  165. _local9 = "";
  166. _local10 = 0;
  167. _local11 = 0;
  168. _local12 = 0;
  169. _local13 = null;
  170. _local14 = null;
  171. _local15 = null;
  172. if (_arg1[6] == 32){
  173. _local5 = _arg1[7];
  174. _local4 = 3;
  175. };
  176. if (_arg1[5] > 0){
  177. switch (_arg1[(6 + _local4)]){
  178. case 0:
  179. if (_arg1[(5 + _local4)] != 3){
  180. return;
  181. };
  182. _local6 = ((_arg1[(8 + _local4)] * 0x0100) + _arg1[(7 + _local4)]);
  183. _local6 = (_local6 & 32767);
  184. _local6++;
  185. _local7 = _arg1[(8 + _local4)];
  186. _local8 = true;
  187. if ((_local7 & 128) == 128){
  188. _local8 = false;
  189. };
  190. _local13 = new DigitalEvent(CNXConnection.DIGITAL, _local6, _local8);
  191. dispatchEvent(_local13);
  192. break;
  193. case 1:
  194. case 20:
  195. switch (_arg1[(5 + _local4)]){
  196. case 3:
  197. _local6 = _arg1[(7 + _local4)];
  198. _local7 = _arg1[(8 + _local4)];
  199. break;
  200. case 4:
  201. _local6 = _arg1[(7 + _local4)];
  202. _local7 = ((_arg1[(8 + _local4)] * 0x0100) + _arg1[(9 + _local4)]);
  203. break;
  204. case 5:
  205. _local6 = ((_arg1[(7 + _local4)] * 0x0100) + _arg1[(8 + _local4)]);
  206. _local7 = ((_arg1[(9 + _local4)] * 0x0100) + _arg1[(10 + _local4)]);
  207. break;
  208. };
  209. _local6++;
  210. _local14 = new AnalogEvent(CNXConnection.ANALOG, _local6, _local7);
  211. dispatchEvent(_local14);
  212. break;
  213. case 21:
  214. _local9 = "";
  215. _local6 = ((_arg1[(7 + _local4)] * 0x0100) + _arg1[(8 + _local4)]);
  216. _local6++;
  217. _local10 = (_arg1[(5 + _local4)] - 4);
  218. _local11 = (10 + _local4);
  219. _local12 = 0;
  220. while (_local12 < _local10) {
  221. var _temp1 = _local11;
  222. _local11 = (_local11 + 1);
  223. _local9 = (_local9 + String.fromCharCode(_arg1[_temp1]));
  224. _local12++;
  225. };
  226. _local15 = new SerialEvent(CNXConnection.SERIAL, _local6, _local9);
  227. dispatchEvent(_local15);
  228. break;
  229. case 18:
  230. _local6 = _arg1[(7 + _local4)];
  231. _local6++;
  232. _local10 = (_arg1[(5 + _local4)] - 2);
  233. _local11 = (8 + _local4);
  234. _local12 = 0;
  235. while (_local12 < _local10) {
  236. var _temp2 = _local11;
  237. _local11 = (_local11 + 1);
  238. _local9 = (_local9 + _arg1[_temp2].toString());
  239. _local12++;
  240. };
  241. _local15 = new SerialEvent(CNXConnection.SERIAL, _local6, _local9);
  242. dispatchEvent(_local15);
  243. break;
  244. case 2:
  245. if (_arg1[(7 + _local4)] == 35){
  246. _local16 = (8 + _local4);
  247. _local17 = (_local16 + (_arg1[(5 + _local4)] - 2));
  248. while (_local17 > _local16) {
  249. _local9 = "";
  250. _local6 = 0;
  251. while ((((_arg1[_local16] >= 48)) && ((_arg1[_local16] <= 57)))) {
  252. var _temp3 = _local16;
  253. _local16 = (_local16 + 1);
  254. _local6 = ((_local6 * 10) + (_arg1[_temp3] - 48));
  255. };
  256. _local16++;
  257. while ((((_local16 < _local17)) && (!((_arg1[_local16] == 13))))) {
  258. var _temp4 = _local16;
  259. _local16 = (_local16 + 1);
  260. _local9 = (_local9 + String.fromCharCode(_arg1[_temp4]));
  261. };
  262. _local15 = new SerialEvent(CNXConnection.SERIAL, _local6, _local9);
  263. dispatchEvent(_local15);
  264. _local16++;
  265. _local16++;
  266. };
  267. };
  268. break;
  269. case 3:
  270. switch (_arg1[(7 + _local4)]){
  271. case 0:
  272. case 31:
  273. _local18 = new ClearAllEvent(CNXConnection.ALLCLEAR);
  274. dispatchEvent(_local18);
  275. case 28:
  276. SendEndOfQueryResponse();
  277. };
  278. break;
  279. case 8:
  280. break;
  281. };
  282. };
  283. }
  284. private function SendConnectMessage():void{
  285. var _local1:ByteArray;
  286. _local1 = new ByteArray();
  287. _local1[0] = 1;
  288. _local1[1] = 0;
  289. _local1[2] = 7;
  290. _local1[3] = 0;
  291. _local1[4] = 0;
  292. _local1[5] = 0;
  293. _local1[6] = 0;
  294. _local1[7] = Math.floor((m_iIPID / 0x0100));
  295. _local1[8] = (m_iIPID % 0x0100);
  296. _local1[9] = 64;
  297. this.writeBytes(_local1);
  298. this.flush();
  299. }
  300. private function enableTimer(_arg1:Boolean):void{
  301. if (m_timer == null){
  302. if (true == _arg1){
  303. m_timer = new Timer(TIMER_INTERVAL);
  304. m_timer.addEventListener(TimerEvent.TIMER, onTimer);
  305. } else {
  306. return;
  307. };
  308. };
  309. if (false == _arg1){
  310. m_timer.stop();
  311. } else {
  312. if (!m_timer.running){
  313. m_timer.start();
  314. };
  315. };
  316. }
  317. private function onTimer(_arg1:TimerEvent):void{
  318. var _local2:Date;
  319. _local2 = new Date();
  320. if (((((!(this.HasCnxConnection())) && (!((m_iConnectTimeoutTime == NO_CONNECT_TIMEOUT))))) && ((m_iConnectTimeoutTime < getTimer())))){
  321. cnxDisconnect();
  322. };
  323. if ((((true == this.connected)) && ((true == this.HasCnxConnection())))){
  324. if (m_heartbeat_interval > 0){
  325. heartbeatTimer(_arg1);
  326. };
  327. };
  328. }
  329. private function heartbeatTimer(_arg1:TimerEvent):void{
  330. var _local2:HeartbeatEvent;
  331. if (!this.HasCnxConnection()){
  332. return;
  333. };
  334. if (m_active_heartbeat <= 0){
  335. if (m_waiting_for_heartbeat_response == true){
  336. _local2 = new HeartbeatEvent(CNXConnection.HEARTBEAT, true);
  337. dispatchEvent(_local2);
  338. m_missed_heartbeat_response = true;
  339. };
  340. SendHeartbeat();
  341. m_waiting_for_heartbeat_response = true;
  342. m_active_heartbeat = m_heartbeat_interval;
  343. } else {
  344. m_active_heartbeat--;
  345. };
  346. }
  347. public function SendAnalog(_arg1:int, _arg2:int, _arg3:int=0):Boolean{
  348. var _local4:ByteArray;
  349. var _local5:int;
  350. _local4 = new ByteArray();
  351. _local5 = 0;
  352. if (((((this.connected) || ((_arg1 > MAX_ANALOG_JOIN)))) || ((_arg1 < 0)))){
  353. if (_arg3 > 0){
  354. _local5 = 3;
  355. };
  356. _local4[0] = 5;
  357. _local4[1] = 0;
  358. _local4[2] = (8 + _local5);
  359. _local4[3] = Math.floor((this.m_iHandle / 0x0100));
  360. _local4[4] = (this.m_iHandle % 0x0100);
  361. _local4[5] = (5 + _local5);
  362. if (_arg3 > 0){
  363. _local4[6] = 32;
  364. _local4[7] = _arg3;
  365. _local4[8] = 5;
  366. };
  367. _local4[(6 + _local5)] = 20;
  368. _arg1--;
  369. _local4[(7 + _local5)] = Math.floor((_arg1 / 0x0100));
  370. _local4[(8 + _local5)] = (_arg1 % 0x0100);
  371. _local4[(9 + _local5)] = Math.floor((_arg2 / 0x0100));
  372. _local4[(10 + _local5)] = (_arg2 % 0x0100);
  373. this.writeBytes(_local4);
  374. this.flush();
  375. return (true);
  376. };
  377. return (false);
  378. }
  379. public function SendSerial(_arg1:int, _arg2:String, _arg3:int=0):Boolean{
  380. var _local4:int;
  381. var _local5:int;
  382. var _local6:ByteArray;
  383. var _local7:int;
  384. _local4 = 0;
  385. _local5 = 0;
  386. _local6 = new ByteArray();
  387. if (((((this.connected) || ((_arg1 > MAX_DIGITAL_JOIN)))) || ((_arg1 < 0)))){
  388. _local5 = _arg2.length;
  389. if (_arg3 > 0){
  390. _local4 = 3;
  391. };
  392. if (_local5 > MAX_SEND_STRING){
  393. _local5 = MAX_SEND_STRING;
  394. };
  395. _local6[0] = 5;
  396. _local6[1] = 0;
  397. _local6[2] = ((_local5 + 7) + _local4);
  398. _local6[3] = Math.floor((this.m_iHandle / 0x0100));
  399. _local6[4] = (this.m_iHandle % 0x0100);
  400. _local6[5] = ((_local5 + 4) + _local4);
  401. if (_arg3 > 0){
  402. _local6[6] = 32;
  403. _local6[7] = _arg3;
  404. _local6[8] = (_local5 + 4);
  405. };
  406. _local6[(6 + _local4)] = 21;
  407. _arg1--;
  408. _local6[(7 + _local4)] = (_arg1 / 0x0100);
  409. _local6[(8 + _local4)] = (_arg1 % 0x0100);
  410. _local6[(9 + _local4)] = 1;
  411. _local7 = 0;
  412. while (_local7 < _local5) {
  413. _local6[((_local7 + 10) + _local4)] = _arg2.charCodeAt(_local7);
  414. _local7++;
  415. };
  416. this.writeBytes(_local6);
  417. this.flush();
  418. if (_arg2.length > MAX_SEND_STRING){
  419. _arg1++;
  420. _arg2 = _arg2.substr(MAX_SEND_STRING);
  421. SendSerial(_arg1, _arg2, _arg3);
  422. };
  423. return (true);
  424. };
  425. return (false);
  426. }
  427. public function getAddress():String{
  428. return (m_sIP);
  429. }
  430. public function cnxConnect(_arg1:String=null, _arg2:String="03", _arg3:uint=41794, _arg4:int=0):Boolean{
  431. if (true == this.connected){
  432. return (false);
  433. };
  434. if (_arg4 < 0){
  435. _arg4 = 0;
  436. };
  437. m_heartbeat_interval = (_arg4 * (ONE_SECOND / TIMER_INTERVAL));
  438. m_heartbeat_event_timeout = (1000 / TIMER_INTERVAL);
  439. m_waiting_for_heartbeat_response = false;
  440. m_missed_heartbeat_response = false;
  441. m_sIP = _arg1;
  442. m_iIPID = parseInt(_arg2, 16);
  443. if ((((m_iIPID < 3)) || ((m_iIPID > 0xFF)))){
  444. return (false);
  445. };
  446. this.connect(_arg1, _arg3);
  447. return (true);
  448. }
  449. public function getIPID():int{
  450. return (m_iIPID);
  451. }
  452. private function ReadPacket():Array{
  453. var _local1:uint;
  454. var _local2:uint;
  455. var _local3:uint;
  456. var _local4:Array;
  457. if (m_buffer.length < 3){
  458. return (null);
  459. };
  460. _local1 = uint(m_buffer[1]);
  461. _local2 = uint(m_buffer[2]);
  462. _local3 = ((_local1 * 0x0100) + _local2);
  463. if (m_buffer.length < (_local3 + 3)){
  464. return (null);
  465. };
  466. _local4 = m_buffer.splice(0, (_local3 + 3));
  467. return (_local4);
  468. }
  469. public function HasCnxConnection():Boolean{
  470. return (m_bConnected);
  471. }
  472. private function socketDataHandler(_arg1:ProgressEvent):void{
  473. var _local2:DisconnectEvent;
  474. var _local3:ByteArray;
  475. var _local4:Array;
  476. var _local5:ByteArray;
  477. var _local6:int;
  478. var _local7:ConnectEvent;
  479. var _local8:HeartbeatEvent;
  480. _local2 = null;
  481. _local3 = new ByteArray();
  482. _local4 = null;
  483. while (this.bytesAvailable) {
  484. m_buffer.push(this.readUnsignedByte());
  485. };
  486. _local5 = new ByteArray();
  487. while (null != (_local4 = ReadPacket())) {
  488. switch (_local4[0]){
  489. case 2:
  490. if (this.HasCnxConnection() == false){
  491. if (_local4.length < 6){
  492. return;
  493. };
  494. (this.m_iHandle = ((_local4[3] * 0x0100) + _local4[4]));
  495. if (_local4.length >= 7){
  496. if (1 == (1 & _local4[6])){
  497. (m_connection_supports_repeat_digitals = true);
  498. if (m_heartbeat_interval > 0){
  499. enableTimer(true);
  500. };
  501. } else {
  502. (m_connection_supports_repeat_digitals = false);
  503. };
  504. } else {
  505. (m_connection_supports_repeat_digitals = false);
  506. };
  507. SendUpdateRequestPacket();
  508. (this.m_bConnected = true);
  509. _local7 = new ConnectEvent(CNXConnection.CONNECT);
  510. dispatchEvent(_local7);
  511. };
  512. break;
  513. case 3:
  514. if (this.connected){
  515. this.close();
  516. };
  517. if (this.HasCnxConnection() == true){
  518. _local2 = new DisconnectEvent(CNXConnection.DISCONNECT);
  519. _local2;
  520. dispatchEvent(_local2);
  521. (this.m_bConnected = false);
  522. };
  523. break;
  524. case 4:
  525. if (this.connected){
  526. this.close();
  527. };
  528. if (this.HasCnxConnection() == true){
  529. _local2 = new DisconnectEvent(CNXConnection.DISCONNECT);
  530. _local2;
  531. dispatchEvent(_local2);
  532. (this.m_bConnected = false);
  533. };
  534. break;
  535. case 5:
  536. HandleDataPacket(_local4);
  537. break;
  538. case 14:
  539. if (true == m_missed_heartbeat_response){
  540. _local8 = new HeartbeatEvent(CNXConnection.HEARTBEAT, false);
  541. dispatchEvent(_local8);
  542. (m_missed_heartbeat_response = false);
  543. };
  544. (m_waiting_for_heartbeat_response = 0);
  545. break;
  546. case 15:
  547. if (_local4[3] == undefined){
  548. return;
  549. };
  550. _local6 = _local4[3];
  551. if (_local6 == 0){
  552. cnxDisconnect();
  553. break;
  554. };
  555. if (_local6 == 1){
  556. break;
  557. };
  558. if ((((_local6 == 2)) && (!(HasCnxConnection())))){
  559. SendConnectMessage();
  560. };
  561. break;
  562. };
  563. };
  564. }
  565. public function cnxDisconnect():void{
  566. var _local1:DisconnectEvent;
  567. if (this.connected){
  568. this.close();
  569. };
  570. if (this.HasCnxConnection() == true){
  571. _local1 = new DisconnectEvent(CNXConnection.DISCONNECT);
  572. dispatchEvent(_local1);
  573. this.m_bConnected = false;
  574. };
  575. enableTimer(false);
  576. }
  577. private function SendUpdateRequestPacket():void{
  578. var _local1:ByteArray;
  579. _local1 = new ByteArray();
  580. _local1[0] = 5;
  581. _local1[1] = 0;
  582. _local1[2] = 5;
  583. _local1[3] = (this.m_iHandle / 0x0100);
  584. _local1[4] = (this.m_iHandle % 0x0100);
  585. _local1[5] = 2;
  586. _local1[6] = 3;
  587. _local1[7] = 30;
  588. this.writeBytes(_local1);
  589. this.flush();
  590. }
  591. private function readResponse():void{
  592. var _local1:String;
  593. _local1 = readUTFBytes(bytesAvailable);
  594. (response = (response + _local1));
  595. }
  596. private function configureListeners():void{
  597. this.addEventListener(Event.CONNECT, onConnect);
  598. this.addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);
  599. this.addEventListener(Event.CLOSE, connError);
  600. this.addEventListener(IOErrorEvent.IO_ERROR, connError);
  601. this.addEventListener(SecurityErrorEvent.SECURITY_ERROR, connError);
  602. }
  603. private function SendEndOfQueryResponse():void{
  604. var _local1:ByteArray;
  605. _local1 = new ByteArray();
  606. _local1[0] = 5;
  607. _local1[1] = 0;
  608. _local1[2] = 5;
  609. _local1[3] = (this.m_iHandle / 0x0100);
  610. _local1[4] = (this.m_iHandle % 0x0100);
  611. _local1[5] = 2;
  612. _local1[6] = 3;
  613. _local1[7] = 29;
  614. this.writeBytes(_local1);
  615. this.flush();
  616. }
  617.  
  618. }
  619. }//package Crestron
  620. package Crestron {
  621. import flash.events.*;
  622.  
  623. public class HeartbeatEvent extends Event {
  624.  
  625. public var Missed:Boolean = true;
  626.  
  627. public function HeartbeatEvent(_arg1:String, _arg2:Boolean){
  628. Missed = true;
  629. super(_arg1);
  630. Missed = _arg2;
  631. }
  632. override public function clone():Event{
  633. return (new HeartbeatEvent(type, Missed));
  634. }
  635.  
  636. }
  637. }//package Crestron
  638. package Crestron {
  639. import flash.events.*;
  640.  
  641. public class AnalogEvent extends Event {
  642.  
  643. public var Join:int = 0;
  644. public var Value:int = 0;
  645.  
  646. public function AnalogEvent(_arg1:String, _arg2:int, _arg3:int){
  647. Join = 0;
  648. Value = 0;
  649. super(_arg1);
  650. Join = _arg2;
  651. Value = _arg3;
  652. }
  653. override public function clone():Event{
  654. return (new AnalogEvent(type, Join, Value));
  655. }
  656.  
  657. }
  658. }//package Crestron
  659. package Crestron {
  660. import flash.events.*;
  661.  
  662. public class ClearAllEvent extends Event {
  663.  
  664. public function ClearAllEvent(_arg1:String){
  665. super(_arg1);
  666. }
  667. }
  668. }//package Crestron
  669. package Crestron {
  670. import flash.events.*;
  671.  
  672. public class SerialEvent extends Event {
  673.  
  674. public var Join:int = 0;
  675. public var Value:String = "";
  676.  
  677. public function SerialEvent(_arg1:String, _arg2:int, _arg3:String){
  678. Join = 0;
  679. Value = "";
  680. super(_arg1);
  681. Join = _arg2;
  682. Value = _arg3;
  683. }
  684. override public function clone():Event{
  685. return (new SerialEvent(type, Join, Value));
  686. }
  687.  
  688. }
  689. }//package Crestron
  690. package Crestron {
  691. import flash.events.*;
  692.  
  693. public class DigitalEvent extends Event {
  694.  
  695. public var Join:int = 0;
  696. public var Value:Boolean = false;
  697.  
  698. public function DigitalEvent(_arg1:String, _arg2:int, _arg3:Boolean){
  699. Join = 0;
  700. Value = false;
  701. super(_arg1);
  702. Join = _arg2;
  703. Value = _arg3;
  704. }
  705. override public function clone():Event{
  706. return (new DigitalEvent(type, Join, Value));
  707. }
  708.  
  709. }
  710. }//package Crestron
  711. package fl.motion {
  712. import flash.geom.*;
  713. import flash.display.*;
  714.  
  715. public class Color extends ColorTransform {
  716.  
  717. private var _tintMultiplier:Number = 0;
  718. private var _tintColor:Number = 0;
  719.  
  720. public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
  721. _tintColor = 0;
  722. _tintMultiplier = 0;
  723. super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
  724. }
  725. public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
  726. var _local4:Number;
  727. var _local5:uint;
  728. var _local6:uint;
  729. var _local7:uint;
  730. var _local8:uint;
  731. var _local9:uint;
  732. var _local10:uint;
  733. var _local11:uint;
  734. var _local12:uint;
  735. var _local13:uint;
  736. var _local14:uint;
  737. var _local15:uint;
  738. var _local16:uint;
  739. var _local17:uint;
  740. _local4 = (1 - _arg3);
  741. _local5 = ((_arg1 >> 24) & 0xFF);
  742. _local6 = ((_arg1 >> 16) & 0xFF);
  743. _local7 = ((_arg1 >> 8) & 0xFF);
  744. _local8 = (_arg1 & 0xFF);
  745. _local9 = ((_arg2 >> 24) & 0xFF);
  746. _local10 = ((_arg2 >> 16) & 0xFF);
  747. _local11 = ((_arg2 >> 8) & 0xFF);
  748. _local12 = (_arg2 & 0xFF);
  749. _local13 = ((_local5 * _local4) + (_local9 * _arg3));
  750. _local14 = ((_local6 * _local4) + (_local10 * _arg3));
  751. _local15 = ((_local7 * _local4) + (_local11 * _arg3));
  752. _local16 = ((_local8 * _local4) + (_local12 * _arg3));
  753. _local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
  754. return (_local17);
  755. }
  756. public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
  757. var _local4:Number;
  758. var _local5:ColorTransform;
  759. _local4 = (1 - _arg3);
  760. _local5 = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
  761. return (_local5);
  762. }
  763. public static function fromXML(_arg1:XML):Color{
  764. return (Color(new (Color).parseXML(_arg1)));
  765. }
  766.  
  767. public function setTint(_arg1:uint, _arg2:Number):void{
  768. var _local3:uint;
  769. var _local4:uint;
  770. var _local5:uint;
  771. this._tintColor = _arg1;
  772. this._tintMultiplier = _arg2;
  773. this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
  774. _local3 = ((_arg1 >> 16) & 0xFF);
  775. _local4 = ((_arg1 >> 8) & 0xFF);
  776. _local5 = (_arg1 & 0xFF);
  777. this.redOffset = Math.round((_local3 * _arg2));
  778. this.greenOffset = Math.round((_local4 * _arg2));
  779. this.blueOffset = Math.round((_local5 * _arg2));
  780. }
  781. public function set tintColor(_arg1:uint):void{
  782. this.setTint(_arg1, this.tintMultiplier);
  783. }
  784. public function get brightness():Number{
  785. return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
  786. }
  787. private function deriveTintColor():uint{
  788. var _local1:Number;
  789. var _local2:uint;
  790. var _local3:uint;
  791. var _local4:uint;
  792. var _local5:uint;
  793. _local1 = (1 / this.tintMultiplier);
  794. _local2 = Math.round((this.redOffset * _local1));
  795. _local3 = Math.round((this.greenOffset * _local1));
  796. _local4 = Math.round((this.blueOffset * _local1));
  797. _local5 = (((_local2 << 16) | (_local3 << 8)) | _local4);
  798. return (_local5);
  799. }
  800. public function get tintMultiplier():Number{
  801. return (this._tintMultiplier);
  802. }
  803. public function get tintColor():uint{
  804. return (this._tintColor);
  805. }
  806. public function set brightness(_arg1:Number):void{
  807. var _local2:Number;
  808. var _local3:Number;
  809. if (_arg1 > 1){
  810. _arg1 = 1;
  811. } else {
  812. if (_arg1 < -1){
  813. _arg1 = -1;
  814. };
  815. };
  816. _local2 = (1 - Math.abs(_arg1));
  817. _local3 = 0;
  818. if (_arg1 > 0){
  819. _local3 = (_arg1 * 0xFF);
  820. };
  821. this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
  822. this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
  823. }
  824. public function set tintMultiplier(_arg1:Number):void{
  825. this.setTint(this.tintColor, _arg1);
  826. }
  827. private function parseXML(_arg1:XML=null):Color{
  828. var _local2:XML;
  829. var _local3:XML;
  830. var _local4:String;
  831. var _local5:uint;
  832. if (!_arg1){
  833. return (this);
  834. };
  835. _local2 = _arg1.elements()[0];
  836. if (!_local2){
  837. return (this);
  838. };
  839. for each (_local3 in _local2.attributes()) {
  840. _local4 = _local3.localName();
  841. if (_local4 == "tintColor"){
  842. _local5 = (Number(_local3.toString()) as uint);
  843. this.tintColor = _local5;
  844. } else {
  845. this[_local4] = Number(_local3.toString());
  846. };
  847. };
  848. return (this);
  849. }
  850.  
  851. }
  852. }//package fl.motion
  853. package CrestronDLP {
  854.  
  855. public class Base64 {
  856.  
  857. private static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
  858. private static var _EndOfInput = -1;
  859. private static var _Chars:Array = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
  860.  
  861. private var _base64Str:String;
  862. private var _base64Count:Number;
  863.  
  864. public static function Encode(_arg1:String):String{
  865. var _local2:Base64;
  866. _local2 = new (Base64);
  867. return (_local2.encodeBase64(_arg1));
  868. }
  869.  
  870. private function setBase64Str(_arg1:String){
  871. _base64Str = _arg1;
  872. _base64Count = 0;
  873. }
  874. private function readBase64():Number{
  875. var _local1:Number;
  876. if (!_base64Str){
  877. return (_EndOfInput);
  878. };
  879. if (_base64Count >= _base64Str.length){
  880. return (_EndOfInput);
  881. };
  882. _local1 = (_base64Str.charCodeAt(_base64Count) & 0xFF);
  883. _base64Count++;
  884. return (_local1);
  885. }
  886. private function encodeBase64(_arg1:String){
  887. var _local2:*;
  888. var _local3:*;
  889. var _local4:*;
  890. var _local5:*;
  891. setBase64Str(_arg1);
  892. _local2 = "";
  893. _local3 = new Array(3);
  894. _local4 = 0;
  895. _local5 = false;
  896. while (((!(_local5)) && (!(((_local3[0] = readBase64()) == _EndOfInput))))) {
  897. _local3[1] = readBase64();
  898. _local3[2] = readBase64();
  899. _local2 = (_local2 + _Chars[(_local3[0] >> 2)]);
  900. if (_local3[1] != _EndOfInput){
  901. _local2 = (_local2 + _Chars[(((_local3[0] << 4) & 48) | (_local3[1] >> 4))]);
  902. if (_local3[2] != _EndOfInput){
  903. _local2 = (_local2 + _Chars[(((_local3[1] << 2) & 60) | (_local3[2] >> 6))]);
  904. _local2 = (_local2 + _Chars[(_local3[2] & 63)]);
  905. } else {
  906. _local2 = (_local2 + _Chars[((_local3[1] << 2) & 60)]);
  907. _local2 = (_local2 + "=");
  908. _local5 = true;
  909. };
  910. } else {
  911. _local2 = (_local2 + _Chars[((_local3[0] << 4) & 48)]);
  912. _local2 = (_local2 + "=");
  913. _local2 = (_local2 + "=");
  914. _local5 = true;
  915. };
  916. _local4 = (_local4 + 4);
  917. if (_local4 >= 76){
  918. _local2 = (_local2 + "\n");
  919. _local4 = 0;
  920. };
  921. };
  922. return (_local2);
  923. }
  924.  
  925. }
  926. }//package CrestronDLP
  927. package CrestronDLP {
  928.  
  929. public class DLPSource {
  930.  
  931. public var sourceName:String = "";
  932. public var join:uint = 0;
  933. public var index:uint = 0;
  934.  
  935. public function DLPSource(_arg1:String, _arg2:uint, _arg3:uint=0){
  936. sourceName = "";
  937. join = 0;
  938. index = 0;
  939. super();
  940. sourceName = _arg1;
  941. join = _arg2;
  942. index = _arg3;
  943. }
  944. public function isHidden():Boolean{
  945. if (sourceName.substr(0, 1) == " "){
  946. return (true);
  947. };
  948. return (false);
  949. }
  950. public function toString():String{
  951. return (index.toString());
  952. }
  953. public function getSourceName(){
  954. if (sourceName.substr(0, 1) == " "){
  955. return ("");
  956. };
  957. return (sourceName);
  958. }
  959.  
  960. }
  961. }//package CrestronDLP
  962. package CrestronDLP {
  963. import flash.events.*;
  964. import flash.net.*;
  965.  
  966. public class DLPConfig {
  967.  
  968. public var hasdhcp:String = "";
  969. public var company_name:String;
  970. var loader:URLLoader;
  971. public var link1:String;
  972. protected var disp:EventDispatcher;
  973. public var ui_color:Number = 0;
  974. public var company_banner:String;
  975. public var dhcp_msg:String;
  976. public var company_logo:String;
  977. public var ui_hidetransport:Boolean = false;
  978. public var modelnum:String = "";
  979. public var sources:Array;
  980. public var extendedcommands:Array;
  981. public var standardcommands:Array;
  982. public var staticmsg:String;
  983. public var canedit:Boolean = false;
  984. public var link2:String;
  985. public var restart_time:uint;
  986. public var hidden_objects:Array;
  987.  
  988. public function DLPConfig(){
  989. ui_color = 0;
  990. ui_hidetransport = false;
  991. modelnum = "";
  992. hasdhcp = "";
  993. canedit = false;
  994. sources = new Array();
  995. standardcommands = new Array();
  996. extendedcommands = new Array();
  997. hidden_objects = new Array();
  998. super();
  999. }
  1000. public function Load(){
  1001. loader = new URLLoader();
  1002. loader.addEventListener(Event.COMPLETE, OnXmlLoaded);
  1003. loader.load(new URLRequest("CrestronDLPConfig.xml"));
  1004. }
  1005. private function LoadExtendedCommands(_arg1:XML){
  1006. var _local2:uint;
  1007. var _local3:uint;
  1008. var _local4:ExtendedCommand;
  1009. _local2 = _arg1.ecs.*.length();
  1010. _local3 = 0;
  1011. while (_local3 < _local2) {
  1012. _local4 = new ExtendedCommand(_arg1.ecs.ec[_local3]);
  1013. extendedcommands[_local4.cmdidx] = _local4;
  1014. _local3++;
  1015. };
  1016. }
  1017. public function CrestronDLPConfig(){
  1018. }
  1019. public function GetSourcesForJoin(_arg1:uint):Array{
  1020. var _local2:Array;
  1021. var _local3:DLPSource;
  1022. _local2 = new Array();
  1023. for each (_local3 in sources) {
  1024. if (_local3.join == _arg1){
  1025. _local2.push(_local3);
  1026. };
  1027. };
  1028. return (_local2);
  1029. }
  1030. private function LoadStandardCommands(_arg1:XML){
  1031. var _local2:uint;
  1032. var _local3:uint;
  1033. var _local4:String;
  1034. var _local5:StandardCommand;
  1035. _local2 = _arg1.scs.*.length();
  1036. _local3 = 0;
  1037. while (_local3 < _local2) {
  1038. _local4 = "";
  1039. _local4 = _arg1.scs.sc[_local3].@btnlabel;
  1040. _local5 = new StandardCommand(_arg1.scs.sc[_local3].@name, _arg1.scs.sc[_local3].@join, _local4);
  1041. if (_local5.cmd != StandardCommand.CMD_NONE){
  1042. standardcommands[_local5.cmd] = _local5;
  1043. };
  1044. _local3++;
  1045. };
  1046. }
  1047. public function getSourceAt(_arg1:uint):DLPSource{
  1048. return (sources[_arg1]);
  1049. }
  1050. public function getVisibleSourceAt(_arg1:uint):DLPSource{
  1051. var _local2:int;
  1052. var _local3:int;
  1053. _local2 = 0;
  1054. _local3 = 0;
  1055. while (_local3 < 17) {
  1056. if (!isSourceHidden(_local3)){
  1057. if (_local2 == _arg1){
  1058. return (sources[_local3]);
  1059. };
  1060. _local2++;
  1061. };
  1062. _local3++;
  1063. };
  1064. return (undefined);
  1065. }
  1066. public function GetStandardCommand(_arg1:uint){
  1067. return (standardcommands[_arg1]);
  1068. }
  1069. public function dispatchEvent(_arg1:Event):void{
  1070. if (disp == null){
  1071. return;
  1072. };
  1073. disp.dispatchEvent(_arg1);
  1074. }
  1075. private function OnXmlLoaded(_arg1:Event){
  1076. var xml:* = null;
  1077. var rts:* = null;
  1078. var e:* = _arg1;
  1079. xml = new XML(e.target.data);
  1080. company_name = xml.company[0].@name;
  1081. company_logo = xml.company[0].@logo;
  1082. company_banner = xml.company[0].@banner;
  1083. try {
  1084. link1 = xml.ui[0].@link1;
  1085. link2 = xml.ui[0].@link2;
  1086. } catch(e:Error) {
  1087. trace("Could not read config links");
  1088. };
  1089. try {
  1090. staticmsg = xml.msg[0].@static;
  1091. dhcp_msg = xml.msg[0].@dhcp;
  1092. } catch(e:Error) {
  1093. };
  1094. if (dhcp_msg.length < 1){
  1095. dhcp_msg = "Ip Address has changed";
  1096. };
  1097. if (staticmsg.length < 1){
  1098. staticmsg = "Device restarting";
  1099. };
  1100. modelnum = xml.device.@model;
  1101. hasdhcp = xml.device.@hasdhcp;
  1102. restart_time = 30;
  1103. try {
  1104. rts = xml.device[0].@restartlen;
  1105. if (rts.length > 0){
  1106. restart_time = parseInt(rts);
  1107. };
  1108. } catch(e:Error) {
  1109. trace("error reading restart time");
  1110. restart_time = 30;
  1111. };
  1112. if ((((restart_time < 1)) || ((restart_time > 120)))){
  1113. restart_time = 30;
  1114. };
  1115. ui_color = xml.ui[0].@color;
  1116. if (xml.ui[0].@hidetransport == true){
  1117. ui_hidetransport = true;
  1118. };
  1119. try {
  1120. if (xml.ui[0].@edit == "1"){
  1121. canedit = true;
  1122. };
  1123. } catch(e:Error) {
  1124. trace("error reading edit");
  1125. };
  1126. LoadStandardCommands(xml);
  1127. LoadExtendedCommands(xml);
  1128. LoadHiddenElements(xml);
  1129. dispatchEvent(new Event(Event.COMPLETE));
  1130. }
  1131. public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
  1132. if (disp == null){
  1133. return;
  1134. };
  1135. disp.removeEventListener(_arg1, _arg2, _arg3);
  1136. }
  1137. public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
  1138. if (disp == null){
  1139. disp = new EventDispatcher();
  1140. };
  1141. disp.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
  1142. }
  1143. public function GetStandardCommandsForJoin(_arg1:uint):Array{
  1144. var _local2:Array;
  1145. var _local3:StandardCommand;
  1146. _local2 = new Array();
  1147. for each (_local3 in standardcommands) {
  1148. if (_local3.join == _arg1){
  1149. _local2.push(_local3);
  1150. };
  1151. };
  1152. return (_local2);
  1153. }
  1154. public function getVisibleSourceCount():uint{
  1155. var _local1:int;
  1156. var _local2:int;
  1157. _local1 = 0;
  1158. _local2 = 0;
  1159. while (_local2 < 17) {
  1160. if (!isSourceHidden(_local2)){
  1161. _local1++;
  1162. };
  1163. _local2++;
  1164. };
  1165. return (_local1);
  1166. }
  1167. private function LoadHiddenElements(_arg1:XML){
  1168. var _local2:uint;
  1169. var _local3:*;
  1170. var _local4:uint;
  1171. _local2 = _arg1.ui_elems.*.length();
  1172. _local4 = 0;
  1173. while (_local4 < _local2) {
  1174. _local3 = new Object();
  1175. if (_arg1.ui_elems.ui_elem[_local4].@hidden == "true"){
  1176. _local3.visible = false;
  1177. } else {
  1178. _local3.visible = true;
  1179. };
  1180. _local3.text = _arg1.ui_elems.ui_elem[_local4].@text;
  1181. _local3.name = _arg1.ui_elems.ui_elem[_local4].@name;
  1182. _local3.icon = _arg1.ui_elems.ui_elem[_local4].@icon;
  1183. _local3.setcolor = false;
  1184. if (("@color" in _arg1.ui_elems.ui_elem[_local4])){
  1185. _local3.setcolor = true;
  1186. _local3.color = _arg1.ui_elems.ui_elem[_local4].@color;
  1187. };
  1188. _local3.tint = 1;
  1189. if (("@tint" in _arg1.ui_elems.ui_elem[_local4])){
  1190. _local3.tint = _arg1.ui_elems.ui_elem[_local4].@tint;
  1191. };
  1192. hidden_objects.push(_local3);
  1193. _local4++;
  1194. };
  1195. }
  1196. public function isSourceHidden(_arg1:uint):Boolean{
  1197. var _local2:DLPSource;
  1198. _local2 = sources[_arg1];
  1199. if (_local2 == undefined){
  1200. return (true);
  1201. };
  1202. if (_local2.sourceName.substr(0, 1) == " "){
  1203. return (true);
  1204. };
  1205. return (false);
  1206. }
  1207. public function AddSource(_arg1:String, _arg2:uint, _arg3:uint){
  1208. var _local4:DLPSource;
  1209. _local4 = new DLPSource(_arg1, _arg3, _arg2);
  1210. sources[_local4.index] = _local4;
  1211. }
  1212.  
  1213. }
  1214. }//package CrestronDLP
  1215. package CrestronDLP {
  1216.  
  1217. public class StandardCommand {
  1218.  
  1219. public static const TXT_CS_PORT:String = "cs_port";
  1220. public static const CMD_MENU_LEFT:uint = 8;
  1221. public static const CMD_LAMP_HOURS:uint = 41;
  1222. public static const CMD_POWER_OFF:uint = 2;
  1223. public static const CMD_PROJECTOR_NAME:uint = 23;
  1224. public static const CMD_KEYPAD_EXT3_T:uint = 55;
  1225. public static const TXT_DEFAULT_GATEWAY:String = "gateway";
  1226. public static const TXT_POWER_STATUS:String = "power_status";
  1227. public static const CMD_MENU_ENTER:uint = 11;
  1228. public static const CMD_MUTE:uint = 5;
  1229. public static const TXT_MAC_ADDR:String = "mac_addr";
  1230. public static const TXT_PROJECTOR_NAME:String = "proj_name";
  1231. public static const CMD_CS_IP_ID:uint = 21;
  1232. public static const CMD_KEYPAD_EXT1:uint = 48;
  1233. public static const CMD_KEYPAD_EXT2:uint = 49;
  1234. public static const CMD_KEYPAD_EXT3:uint = 50;
  1235. public static const CMD_KEYPAD_EXT4:uint = 51;
  1236. public static const TXT_JUMP_TO_TOOLS:String = "jump_to_tools";
  1237. public static const CMD_KEYPAD_EXT2_T:uint = 54;
  1238. public static const TXT_MENU_DOWN:String = "down";
  1239. public static const TXT_WARMING_UP = "warming_up";
  1240. public static const CMD_A_PWRD_ENABLED:uint = 36;
  1241. public static const TXT_A_PWRD_ENABLED:String = "apwd_enabled";
  1242. public static const TXT_DHCP_ENABLED:String = "dhcp_enabled";
  1243. public static const TXT_MENU_RIGHT:String = "right";
  1244. public static const TXT_KEYPAD_EXT2:String = "menu_ext2";
  1245. public static const TXT_KEYPAD_EXT4:String = "menu_ext4";
  1246. public static const TXT_KEYPAD_EXT1:String = "menu_ext1";
  1247. public static const TXT_KEYPAD_EXT3:String = "menu_ext3";
  1248. public static const CMD_JUMP_TO_HELP:uint = 34;
  1249. public static const TXT_HELP_MSG = "help_msg";
  1250. public static const TXT_LAMP_MODE:String = "lamp_mode";
  1251. public static const CMD_MAC_ADDR:uint = 39;
  1252. public static const TXT_POWER_ON:String = "power_on";
  1253. public static const TXT_CS_IP_ADDR:String = "cs_ipaddr";
  1254. public static const CMD_KEYPAD_EXT1_T:uint = 53;
  1255. public static const TXT_DNS_SERVER:String = "dns";
  1256. public static const TXT_JUMP_TO_INFO:String = "jump_to_info";
  1257. public static const TXT_MENU_UP:String = "up";
  1258. public static const CMD_LAST:uint = 56;
  1259. public static const TXT_KEYPAD_EXT4_T:String = "menu_ext4_t";
  1260. public static const CMD_MENU_DOWN:uint = 7;
  1261. public static const TXT_MUTE:String = "mute";
  1262. public static const TXT_VOLUME_UP:String = "vol_up";
  1263. public static const CMD_LAMP_MODE:uint = 46;
  1264. public static const CMD_U_PWRD_ENABLED:uint = 35;
  1265. public static const CMD_CS_PORT:uint = 22;
  1266. public static const TXT_MENU_EXIT:String = "exit";
  1267. public static const TXT_FIRMWARE:String = "firmware";
  1268. public static const TXT_KEYPAD_EXT3_T:String = "menu_ext3_t";
  1269. public static const TXT_LOCATION:String = "location";
  1270. public static const TXT_U_PWRD_ENABLED:String = "upwd_enabled";
  1271. public static const TXT_ADMIN_PWRD:String = "apwd";
  1272. public static const CMD_DEFAULT_GATEWAY:uint = 27;
  1273. public static const CMD_ASSIGNED_TO:uint = 42;
  1274. public static const CMD_HELP_MSG:uint = 17;
  1275. public static const CMD_SUBNET_MASK:uint = 26;
  1276. public static const CMD_RESOLUTION:uint = 40;
  1277. public static const CMD_VOLUME_UP:uint = 3;
  1278. public static const CMD_VOLUME_DOWN:uint = 4;
  1279. public static const TXT_JUMP_TO_HELP:String = "jump_to_help";
  1280. public static const CMD_POWER_ON:uint = 1;
  1281. public static const TXT_KEYPAD_EXT2_T:String = "menu_ext2_t";
  1282. public static const CMD_MENU_EXIT:uint = 12;
  1283. public static const TXT_IP_ADDR:String = "ipaddr";
  1284. public static const TXT_ASSIGNED_TO:String = "assigned_to";
  1285. public static const TXT_LAMP_HOURS:String = "lamp_hours";
  1286. public static const TXT_SUBNET_MASK:String = "subnet";
  1287. public static const TXT_MENU_ENTER:String = "enter";
  1288. public static const CMD_ADMIN_CONFIRM:uint = 33;
  1289. public static const CMD_ERROR_STATUS:uint = 47;
  1290. public static const CMD_USER_CONFIRM:uint = 31;
  1291. public static const CMD_FIRST:uint = 1;
  1292. public static const TXT_VOLUME_DOWN:String = "vol_down";
  1293. public static const CMD_WARMING_VAL:uint = 16;
  1294. public static const CMD_NONE:uint = 0;
  1295. public static const TXT_USER_PWRD:String = "upwd";
  1296. public static const TXT_MUTE_OFF:String = "mute_off";
  1297. public static const CMD_FIRMWARE:uint = 38;
  1298. public static const CMD_LOCATION:uint = 24;
  1299. public static const CMD_WARMING_UP:uint = 15;
  1300. public static const CMD_HELP:uint = 13;
  1301. public static const TXT_KEYPAD_EXT1_T:String = "menu_ext1_t";
  1302. public static const CMD_MENU_UP:uint = 6;
  1303. public static const TXT_USER_NAME:String = "uname";
  1304. public static const CMD_PRESET_MODE:uint = 44;
  1305. public static const CMD_MENU_RIGHT:uint = 9;
  1306. public static const CMD_MENU:uint = 10;
  1307. public static const TXT_PROJ_POS:String = "proj_pos";
  1308. public static const TXT_WARMING_VAL = "warming_val";
  1309. public static const CMD_DNS_SERVER:uint = 28;
  1310. public static const CMD_CS_IP_ADDR:uint = 20;
  1311. public static const CMD_JUMP_TO_TOOLS:uint = 18;
  1312. public static const CMD_USER_PWRD:uint = 30;
  1313. public static const CMD_POWER_STATUS:uint = 43;
  1314. public static const CMD_USER_NAME:uint = 29;
  1315. public static const TXT_PRESET_MODE:String = "preset_mode";
  1316. public static const TXT_CS_IP_ID:String = "cs_ipid";
  1317. public static const CMD_MUTE_OFF:uint = 52;
  1318. public static const TXT_MENU_LEFT:String = "left";
  1319. public static const TXT_USER_CONFIRM:String = "uconfirm";
  1320. public static const TXT_ERROR_STATUS:String = "error_status";
  1321. public static const TXT_POWER_OFF:String = "power_off";
  1322. public static const CMD_ADMIN_PWRD:uint = 32;
  1323. public static const CMD_PROJ_POS:uint = 45;
  1324. public static const CMD_DHCP_ENABLED:uint = 37;
  1325. public static const CMD_KEYPAD_EXT4_T:uint = 56;
  1326. public static const CMD_VOLUME:uint = 14;
  1327. public static const TXT_ADMIN_CONFIRM:String = "aconfirm";
  1328. public static const CMD_IP_ADDR:uint = 25;
  1329. public static const CMD_JUMP_TO_INFO:uint = 19;
  1330. public static const TXT_HELP:String = "help";
  1331. public static const TXT_VOLUME:String = "volume";
  1332. public static const TXT_MENU:String = "menu";
  1333. public static const TXT_RESOLUTION:String = "resolution";
  1334.  
  1335. public var lbl:String = "";
  1336. public var join:uint = 0;
  1337. public var cmd:uint = 0;
  1338.  
  1339. public function StandardCommand(_arg1:String, _arg2:uint, _arg3:String){
  1340. cmd = CMD_NONE;
  1341. join = 0;
  1342. lbl = "";
  1343. super();
  1344. switch (_arg1.toLowerCase()){
  1345. case TXT_KEYPAD_EXT1:
  1346. cmd = CMD_KEYPAD_EXT1;
  1347. break;
  1348. case TXT_KEYPAD_EXT2:
  1349. cmd = CMD_KEYPAD_EXT2;
  1350. break;
  1351. case TXT_KEYPAD_EXT3:
  1352. cmd = CMD_KEYPAD_EXT3;
  1353. break;
  1354. case TXT_KEYPAD_EXT4:
  1355. cmd = CMD_KEYPAD_EXT4;
  1356. break;
  1357. case TXT_KEYPAD_EXT1_T:
  1358. cmd = CMD_KEYPAD_EXT1_T;
  1359. break;
  1360. case TXT_KEYPAD_EXT2_T:
  1361. cmd = CMD_KEYPAD_EXT2_T;
  1362. break;
  1363. case TXT_KEYPAD_EXT3_T:
  1364. cmd = CMD_KEYPAD_EXT3_T;
  1365. break;
  1366. case TXT_KEYPAD_EXT4_T:
  1367. cmd = CMD_KEYPAD_EXT4_T;
  1368. break;
  1369. case TXT_FIRMWARE:
  1370. cmd = CMD_FIRMWARE;
  1371. break;
  1372. case TXT_MAC_ADDR:
  1373. cmd = CMD_MAC_ADDR;
  1374. break;
  1375. case TXT_RESOLUTION:
  1376. cmd = CMD_RESOLUTION;
  1377. break;
  1378. case TXT_LAMP_HOURS:
  1379. cmd = CMD_LAMP_HOURS;
  1380. break;
  1381. case TXT_ASSIGNED_TO:
  1382. cmd = CMD_ASSIGNED_TO;
  1383. break;
  1384. case TXT_POWER_STATUS:
  1385. cmd = CMD_POWER_STATUS;
  1386. break;
  1387. case TXT_PRESET_MODE:
  1388. cmd = CMD_PRESET_MODE;
  1389. break;
  1390. case TXT_PROJ_POS:
  1391. cmd = CMD_PROJ_POS;
  1392. break;
  1393. case TXT_LAMP_MODE:
  1394. cmd = CMD_LAMP_MODE;
  1395. break;
  1396. case TXT_ERROR_STATUS:
  1397. cmd = CMD_ERROR_STATUS;
  1398. break;
  1399. case TXT_U_PWRD_ENABLED:
  1400. cmd = CMD_U_PWRD_ENABLED;
  1401. break;
  1402. case TXT_A_PWRD_ENABLED:
  1403. cmd = CMD_A_PWRD_ENABLED;
  1404. break;
  1405. case TXT_DHCP_ENABLED:
  1406. cmd = CMD_DHCP_ENABLED;
  1407. break;
  1408. case TXT_POWER_ON:
  1409. cmd = CMD_POWER_ON;
  1410. break;
  1411. case TXT_POWER_OFF:
  1412. cmd = CMD_POWER_OFF;
  1413. break;
  1414. case TXT_VOLUME_UP:
  1415. cmd = CMD_VOLUME_UP;
  1416. break;
  1417. case TXT_VOLUME_DOWN:
  1418. cmd = CMD_VOLUME_DOWN;
  1419. break;
  1420. case TXT_MUTE:
  1421. cmd = CMD_MUTE;
  1422. break;
  1423. case TXT_MUTE_OFF:
  1424. cmd = CMD_MUTE_OFF;
  1425. break;
  1426. case TXT_MENU_UP:
  1427. cmd = CMD_MENU_UP;
  1428. break;
  1429. case TXT_MENU_DOWN:
  1430. cmd = CMD_MENU_DOWN;
  1431. break;
  1432. case TXT_MENU_LEFT:
  1433. cmd = CMD_MENU_LEFT;
  1434. break;
  1435. case TXT_MENU_RIGHT:
  1436. cmd = CMD_MENU_RIGHT;
  1437. break;
  1438. case TXT_MENU:
  1439. cmd = CMD_MENU;
  1440. break;
  1441. case TXT_MENU_ENTER:
  1442. cmd = CMD_MENU_ENTER;
  1443. break;
  1444. case TXT_MENU_EXIT:
  1445. cmd = CMD_MENU_EXIT;
  1446. break;
  1447. case TXT_HELP:
  1448. cmd = CMD_HELP;
  1449. break;
  1450. case TXT_VOLUME:
  1451. cmd = CMD_VOLUME;
  1452. break;
  1453. case TXT_WARMING_UP:
  1454. cmd = CMD_WARMING_UP;
  1455. break;
  1456. case TXT_WARMING_VAL:
  1457. cmd = CMD_WARMING_VAL;
  1458. break;
  1459. case TXT_HELP_MSG:
  1460. cmd = CMD_HELP_MSG;
  1461. break;
  1462. case TXT_JUMP_TO_TOOLS:
  1463. cmd = CMD_JUMP_TO_TOOLS;
  1464. break;
  1465. case TXT_JUMP_TO_INFO:
  1466. cmd = CMD_JUMP_TO_INFO;
  1467. break;
  1468. case TXT_JUMP_TO_HELP:
  1469. cmd = CMD_JUMP_TO_HELP;
  1470. break;
  1471. case TXT_CS_IP_ADDR:
  1472. cmd = CMD_CS_IP_ADDR;
  1473. break;
  1474. case TXT_CS_IP_ID:
  1475. cmd = CMD_CS_IP_ID;
  1476. break;
  1477. case TXT_CS_PORT:
  1478. cmd = CMD_CS_PORT;
  1479. break;
  1480. case TXT_PROJECTOR_NAME:
  1481. cmd = CMD_PROJECTOR_NAME;
  1482. break;
  1483. case TXT_LOCATION:
  1484. cmd = CMD_LOCATION;
  1485. break;
  1486. case TXT_IP_ADDR:
  1487. cmd = CMD_IP_ADDR;
  1488. break;
  1489. case TXT_SUBNET_MASK:
  1490. cmd = CMD_SUBNET_MASK;
  1491. break;
  1492. case TXT_DEFAULT_GATEWAY:
  1493. cmd = CMD_DEFAULT_GATEWAY;
  1494. break;
  1495. case TXT_DNS_SERVER:
  1496. cmd = CMD_DNS_SERVER;
  1497. break;
  1498. case TXT_USER_NAME:
  1499. cmd = CMD_USER_NAME;
  1500. break;
  1501. case TXT_USER_PWRD:
  1502. cmd = CMD_USER_PWRD;
  1503. break;
  1504. case TXT_USER_CONFIRM:
  1505. cmd = CMD_USER_CONFIRM;
  1506. break;
  1507. case TXT_ADMIN_PWRD:
  1508. cmd = CMD_ADMIN_PWRD;
  1509. break;
  1510. case TXT_ADMIN_CONFIRM:
  1511. cmd = CMD_ADMIN_CONFIRM;
  1512. break;
  1513. };
  1514. join = _arg2;
  1515. lbl = _arg3;
  1516. }
  1517. }
  1518. }//package CrestronDLP
  1519. package CrestronDLP {
  1520.  
  1521. public class ExtendedCommand {
  1522.  
  1523. public static const JOIN_PAN_LEFT = 2;
  1524. public static const JOIN_STATE_0 = 0;
  1525. public static const JOIN_STATE_1 = 1;
  1526. public static const CMD_EXT_RAMP = 2;
  1527. public static const CMD_EXT_ZOOM = 3;
  1528. public static const CMD_EXT_TOGGLE = 1;
  1529. public static const JOIN_FBACK_DIGITAL = 0;
  1530. public static const JOIN_PAN_UP = 3;
  1531. public static const TXT_EXT_MOMENTARY = "momentary";
  1532. public static const TXT_EXT_RAMP = "ramp";
  1533. public static const TXT_EXT_ZOOM = "zoom";
  1534. public static const TXT_EXT_TOGGLE = "toggle";
  1535. public static const CMD_EXT_MOMENTARY = 0;
  1536. public static const JOIN_PAN_DOWN = 5;
  1537. public static const JOIN_RAMPUP = 0;
  1538. public static const JOIN_RAMPED = 2;
  1539. public static const JOIN_RAMPDOWN = 1;
  1540. public static const JOIN_MOMENTARY = 0;
  1541. public static const JOIN_ZOOMIN = 0;
  1542. public static const JOIN_ZOOMOUT = 1;
  1543. public static const JOIN_PAN_RIGHT = 4;
  1544.  
  1545. public var cmdidx:uint = 0;
  1546. public var cmdjoin:Array;
  1547. public var cmdname:String = "";
  1548. public var disable_for_sources:Array;
  1549. public var cmdfback:Array;
  1550. public var cmdtype:uint = 0;
  1551. public var valid:Boolean = false;
  1552.  
  1553. public function ExtendedCommand(_arg1:XML){
  1554. var _local2:String;
  1555. cmdname = "";
  1556. cmdjoin = new Array();
  1557. cmdfback = new Array();
  1558. cmdidx = 0;
  1559. cmdtype = CMD_EXT_MOMENTARY;
  1560. valid = false;
  1561. disable_for_sources = new Array();
  1562. super();
  1563. cmdname = _arg1.@name;
  1564. cmdidx = _arg1.@index;
  1565. _local2 = TXT_EXT_MOMENTARY;
  1566. if (0 < _arg1.@cmdtype.length()){
  1567. _local2 = _arg1.@cmdtype;
  1568. };
  1569. switch (_local2.toLowerCase()){
  1570. case TXT_EXT_MOMENTARY:
  1571. cmdtype = CMD_EXT_MOMENTARY;
  1572. cmdjoin[JOIN_MOMENTARY] = _arg1.@join;
  1573. break;
  1574. case TXT_EXT_TOGGLE:
  1575. cmdtype = CMD_EXT_TOGGLE;
  1576. cmdjoin[JOIN_STATE_0] = _arg1.@join0;
  1577. cmdjoin[JOIN_STATE_1] = _arg1.@join1;
  1578. break;
  1579. case TXT_EXT_RAMP:
  1580. cmdtype = CMD_EXT_RAMP;
  1581. cmdjoin[JOIN_RAMPUP] = _arg1.@rampup;
  1582. cmdjoin[JOIN_RAMPDOWN] = _arg1.@rampdown;
  1583. cmdjoin[JOIN_RAMPED] = _arg1.@ramped;
  1584. break;
  1585. case TXT_EXT_ZOOM:
  1586. cmdtype = CMD_EXT_ZOOM;
  1587. cmdjoin[JOIN_ZOOMIN] = _arg1.@zoomin;
  1588. cmdjoin[JOIN_ZOOMOUT] = _arg1.@zoomout;
  1589. cmdjoin[JOIN_PAN_LEFT] = _arg1.@panleft;
  1590. cmdjoin[JOIN_PAN_RIGHT] = _arg1.@panright;
  1591. cmdjoin[JOIN_PAN_UP] = _arg1.@panup;
  1592. cmdjoin[JOIN_PAN_DOWN] = _arg1.@pandown;
  1593. break;
  1594. };
  1595. if (0 < _arg1.@digfb.length()){
  1596. cmdfback[JOIN_FBACK_DIGITAL] = _arg1.@digfb;
  1597. };
  1598. if (0 < _arg1.@sd.length()){
  1599. disable_for_sources = _arg1.@sd.split(",");
  1600. };
  1601. }
  1602. public function getFeedbackJoin(_arg1:uint):uint{
  1603. if (cmdfback[_arg1] != undefined){
  1604. return (cmdfback[_arg1]);
  1605. };
  1606. return (0);
  1607. }
  1608. public function toString():String{
  1609. return (cmdidx.toString());
  1610. }
  1611.  
  1612. }
  1613. }//package CrestronDLP
  1614. package Crestron_fla {
  1615. import flash.events.*;
  1616. import CrestronDLP.*;
  1617. import flash.geom.*;
  1618. import Crestron.*;
  1619. import flash.net.*;
  1620. import flash.utils.*;
  1621. import flash.display.*;
  1622. import flash.text.*;
  1623. import flash.ui.*;
  1624. import adobe.utils.*;
  1625. import flash.accessibility.*;
  1626. import flash.errors.*;
  1627. import flash.external.*;
  1628. import flash.filters.*;
  1629. import flash.media.*;
  1630. import flash.printing.*;
  1631. import flash.system.*;
  1632. import flash.xml.*;
  1633.  
  1634. public dynamic class InfoPopup_53 extends MovieClip {
  1635.  
  1636. public const SERIAL_PROJ_POS:uint = 5053;
  1637. public const SERIAL_ERROR_STATUS:uint = 2;
  1638. public const SERIAL_ASSIGNED_TO:uint = 5051;
  1639. public const SERIAL_SOURCE:uint = 5010;
  1640. public const SERIAL_MAC_ADDR:uint = 5044;
  1641. public const SERIAL_LAMP_HOURS:uint = 5004;
  1642. public const SERIAL_POWER_STATUS:uint = 5002;
  1643. public const SERIAL_LAMP_MODE:uint = 5003;
  1644. public const SERIAL_PRESET_MODE:uint = 5055;
  1645. public const SERIAL_LOCATION:uint = 5052;
  1646. public const SERIAL_PROJ_NAME:uint = 5050;
  1647. public const SERIAL_FIRMWARE:uint = 5056;
  1648. public const SERIAL_RESOLUTION:uint = 5054;
  1649.  
  1650. public var lblMacAddress:TextField;
  1651. public var txtLampMode:TextField;
  1652. public var txtMacAddress:TextField;
  1653. public var txtLocation:TextField;
  1654. public var txtFirmware:TextField;
  1655. public var m_strSource:String;
  1656. public var objs:Array;
  1657. public var lblErrorStatus:TextField;
  1658. public var lcl_digitals:Array;
  1659. public var lcl_serials:Array;
  1660. public var txtSource:TextField;
  1661. public var ExitBttn:SimpleButton;
  1662. public var txtPowerStatus:TextField;
  1663. public var txtProjectorName:TextField;
  1664. public var lblProjectorPosition:TextField;
  1665. public var lblLampHours:TextField;
  1666. public var lblResolution:TextField;
  1667. public var txtResolution:TextField;
  1668. public var lblAssignedTo:TextField;
  1669. public var exittext:TextField;
  1670. public var lblProjectorName:TextField;
  1671. public var lblLampMode:TextField;
  1672. public var txtProjectorPosition:TextField;
  1673. public var lblSource:TextField;
  1674. public var txtAssignedTo:TextField;
  1675. public var lblPresetMode:TextField;
  1676. public var txtLampHours:TextField;
  1677. public var txtErrorStatus:TextField;
  1678. public var lblLocation:TextField;
  1679. public var lblFirmware:TextField;
  1680. public var txtPresetMode:TextField;
  1681. public var lblPowerStatus:TextField;
  1682.  
  1683. public function InfoPopup_53(){
  1684. addFrameScript(0, frame1, 1, frame2);
  1685. }
  1686. public function setStandardCommandText(_arg1:uint, _arg2:Object){
  1687. var _local3:StandardCommand;
  1688. _local3 = MovieClip(parent).projconfig.GetStandardCommand(_arg1);
  1689. if (((!((_local3 == undefined))) && ((_local3.lbl.length > 0)))){
  1690. _arg2.text = _local3.lbl;
  1691. };
  1692. }
  1693. function frame2(){
  1694. stop();
  1695. ExitBttn.addEventListener(MouseEvent.CLICK, exitpage);
  1696. exittext.mouseEnabled = false;
  1697. objs = new Array();
  1698. objs.push(ExitBttn);
  1699. MovieClip(parent).ThemeButtonObjects(objs, MovieClip(parent).projconfig.ui_color);
  1700. updateText();
  1701. MovieClip(parent).applyUiXml();
  1702. }
  1703. public function updateSource(_arg1:String){
  1704. m_strSource = _arg1;
  1705. }
  1706. function frame1(){
  1707. m_strSource = "";
  1708. stop();
  1709. }
  1710. public function exitpage(_arg1:MouseEvent):void{
  1711. MovieClip(parent).showInfoPage(false);
  1712. }
  1713. public function onSerial(_arg1:SerialEvent){
  1714. if (this.currentFrame == 2){
  1715. updateText();
  1716. };
  1717. }
  1718. public function getSerialText(_arg1:uint){
  1719. var retStr:* = null;
  1720. var join:* = _arg1;
  1721. retStr = "";
  1722. try {
  1723. retStr = lcl_serials[join];
  1724. } catch(e) {
  1725. retStr = "";
  1726. };
  1727. if (retStr == null){
  1728. retStr = "";
  1729. };
  1730. return (retStr);
  1731. }
  1732. public function updateText(){
  1733. txtProjectorName.text = getSerialText(SERIAL_PROJ_NAME);
  1734. setStandardCommandText(StandardCommand.CMD_PROJECTOR_NAME, lblProjectorName);
  1735. txtLocation.text = getSerialText(SERIAL_LOCATION);
  1736. setStandardCommandText(StandardCommand.CMD_LOCATION, lblLocation);
  1737. txtFirmware.text = getSerialText(SERIAL_FIRMWARE);
  1738. setStandardCommandText(StandardCommand.CMD_FIRMWARE, lblFirmware);
  1739. txtMacAddress.text = getSerialText(SERIAL_MAC_ADDR);
  1740. setStandardCommandText(StandardCommand.CMD_MAC_ADDR, lblMacAddress);
  1741. txtResolution.text = getSerialText(SERIAL_RESOLUTION);
  1742. setStandardCommandText(StandardCommand.CMD_RESOLUTION, lblResolution);
  1743. txtLampHours.text = getSerialText(SERIAL_LAMP_HOURS);
  1744. setStandardCommandText(StandardCommand.CMD_LAMP_HOURS, lblLampHours);
  1745. txtAssignedTo.text = getSerialText(SERIAL_ASSIGNED_TO);
  1746. setStandardCommandText(StandardCommand.CMD_ASSIGNED_TO, lblAssignedTo);
  1747. txtPowerStatus.text = getSerialText(SERIAL_POWER_STATUS);
  1748. setStandardCommandText(StandardCommand.CMD_POWER_STATUS, lblPowerStatus);
  1749. txtPresetMode.text = getSerialText(SERIAL_PRESET_MODE);
  1750. setStandardCommandText(StandardCommand.CMD_PRESET_MODE, lblPresetMode);
  1751. txtProjectorPosition.text = getSerialText(SERIAL_PROJ_POS);
  1752. setStandardCommandText(StandardCommand.CMD_PROJ_POS, lblProjectorPosition);
  1753. txtLampMode.text = getSerialText(SERIAL_LAMP_MODE);
  1754. setStandardCommandText(StandardCommand.CMD_LAMP_MODE, lblLampMode);
  1755. txtErrorStatus.text = getSerialText(SERIAL_ERROR_STATUS);
  1756. setStandardCommandText(StandardCommand.CMD_ERROR_STATUS, lblErrorStatus);
  1757. txtSource.text = getSerialText(SERIAL_SOURCE);
  1758. }
  1759.  
  1760. }
  1761. }//package Crestron_fla
  1762. package Crestron_fla {
  1763. import flash.events.*;
  1764. import CrestronDLP.*;
  1765. import flash.geom.*;
  1766. import Crestron.*;
  1767. import flash.net.*;
  1768. import flash.utils.*;
  1769. import flash.display.*;
  1770. import flash.text.*;
  1771. import flash.ui.*;
  1772. import adobe.utils.*;
  1773. import flash.accessibility.*;
  1774. import flash.errors.*;
  1775. import flash.external.*;
  1776. import flash.filters.*;
  1777. import flash.media.*;
  1778. import flash.printing.*;
  1779. import flash.system.*;
  1780. import flash.xml.*;
  1781.  
  1782. public dynamic class pictmodePopup_44 extends MovieClip {
  1783.  
  1784. public var slidername:TextField;
  1785. public var r_Bttn:SimpleButton;
  1786. public var l_Bttn:SimpleButton;
  1787. public var objs:Array;
  1788. public var closeBttn:SimpleButton;
  1789. public var gaugeMC:MovieClip;
  1790.  
  1791. public function pictmodePopup_44(){
  1792. addFrameScript(0, frame1, 11, frame12);
  1793. }
  1794. public function rampdownstart(_arg1:Event){
  1795. var _local2:uint;
  1796. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_RAMPDOWN];
  1797. MovieClip(parent).cnx.SendDigital(_local2, 1);
  1798. }
  1799. function frame12(){
  1800. stop();
  1801. this.closeBttn.addEventListener(MouseEvent.CLICK, closepopup);
  1802. l_Bttn.addEventListener(MouseEvent.MOUSE_DOWN, rampdownstart);
  1803. l_Bttn.addEventListener(MouseEvent.MOUSE_UP, rampdownstop);
  1804. r_Bttn.addEventListener(MouseEvent.MOUSE_DOWN, rampupstart);
  1805. r_Bttn.addEventListener(MouseEvent.MOUSE_UP, rampupstop);
  1806. objs = new Array();
  1807. objs.push(l_Bttn);
  1808. objs.push(r_Bttn);
  1809. objs.push(closeBttn);
  1810. MovieClip(parent).ThemeButtonObjects(objs, MovieClip(parent).projconfig.ui_color);
  1811. objs = new Array();
  1812. objs.push(gaugeMC);
  1813. MovieClip(parent).ThemeObjects(objs, MovieClip(parent).projconfig.ui_color);
  1814. slidername.text = MovieClip(parent).extCmd.cmdname;
  1815. setJoinVal();
  1816. MovieClip(parent).cnx.addEventListener(CNXConnection.ANALOG, onAnalog);
  1817. }
  1818. public function rampupstart(_arg1:Event){
  1819. var _local2:uint;
  1820. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_RAMPUP];
  1821. MovieClip(parent).cnx.SendDigital(_local2, 1);
  1822. }
  1823. function frame1(){
  1824. stop();
  1825. }
  1826. public function rampupstop(_arg1:Event){
  1827. var _local2:uint;
  1828. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_RAMPUP];
  1829. MovieClip(parent).cnx.SendDigital(_local2, 0);
  1830. }
  1831. public function closepopup(_arg1:MouseEvent):void{
  1832. gotoAndPlay("close");
  1833. }
  1834. public function rampdownstop(_arg1:Event){
  1835. var _local2:uint;
  1836. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_RAMPDOWN];
  1837. MovieClip(parent).cnx.SendDigital(_local2, 0);
  1838. }
  1839. public function onAnalog(_arg1:Event){
  1840. setJoinVal();
  1841. }
  1842. public function setJoinVal(){
  1843. var _local1:uint;
  1844. var _local2:Number;
  1845. if (gaugeMC == null){
  1846. return;
  1847. };
  1848. _local1 = 0;
  1849. if (MovieClip(parent).analogs[MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_RAMPED]] != undefined){
  1850. _local1 = MovieClip(parent).analogs[MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_RAMPED]];
  1851. };
  1852. _local2 = Math.ceil(((_local1 / 65536) * 0xFF));
  1853. gaugeMC.gotoAndStop((_local2 + 2));
  1854. }
  1855.  
  1856. }
  1857. }//package Crestron_fla
  1858. package Crestron_fla {
  1859. import flash.display.*;
  1860.  
  1861. public dynamic class AnimatedBKG_56 extends MovieClip {
  1862.  
  1863. public function AnimatedBKG_56(){
  1864. addFrameScript(7, frame8);
  1865. }
  1866. function frame8(){
  1867. stop();
  1868. }
  1869.  
  1870. }
  1871. }//package Crestron_fla
  1872. package Crestron_fla {
  1873. import flash.display.*;
  1874.  
  1875. public dynamic class DownStateBttn_24 extends MovieClip {
  1876.  
  1877. public var MainUpMC:MovieClip;
  1878.  
  1879. }
  1880. }//package Crestron_fla
  1881. package Crestron_fla {
  1882. import flash.events.*;
  1883. import CrestronDLP.*;
  1884. import fl.motion.*;
  1885. import flash.geom.*;
  1886. import Crestron.*;
  1887. import flash.net.*;
  1888. import flash.utils.*;
  1889. import flash.display.*;
  1890. import flash.text.*;
  1891. import flash.ui.*;
  1892. import adobe.utils.*;
  1893. import flash.accessibility.*;
  1894. import flash.errors.*;
  1895. import flash.external.*;
  1896. import flash.filters.*;
  1897. import flash.media.*;
  1898. import flash.printing.*;
  1899. import flash.system.*;
  1900. import flash.xml.*;
  1901.  
  1902. public dynamic class HelpDeskPopup_40 extends MovieClip {
  1903.  
  1904. public var curmode:int;
  1905. public var ScrollDown:SimpleButton;
  1906. public var SendMC:MovieClip;
  1907. public var ScrollDownGF:MovieClip;
  1908. public var ScrollUpGF:MovieClip;
  1909. public var objs:Array;
  1910. public var closeBttn:SimpleButton;
  1911. public var textBox:TextField;
  1912. public var ScrollUp:SimpleButton;
  1913. public var msg:String;
  1914. public var MessageMC:MovieClip;
  1915. public var minheight:int;
  1916.  
  1917. public function HelpDeskPopup_40(){
  1918. addFrameScript(0, frame1, 11, frame12);
  1919. }
  1920. public function readMsg(_arg1:Event){
  1921. curmode = 1;
  1922. MessageMC.gotoAndStop(2);
  1923. textBox.type = "dynamic";
  1924. SendMC.gotoAndStop(2);
  1925. UpdateText(msg);
  1926. }
  1927. public function sendHelpMsg(_arg1:KeyboardEvent){
  1928. var _local2:MouseEvent;
  1929. if (curmode != 0){
  1930. return;
  1931. };
  1932. if (_arg1.keyCode == 13){
  1933. sendMsg(_local2);
  1934. };
  1935. }
  1936. public function writeMode(_arg1:Event){
  1937. textBox.type = "input";
  1938. textBox.text = "";
  1939. curmode = 0;
  1940. SendMC.gotoAndStop(1);
  1941. handleScrollBars();
  1942. ScrollUp.visible = false;
  1943. ScrollDown.visible = false;
  1944. }
  1945. public function scrolled(_arg1:Event){
  1946. handleScrollBars();
  1947. }
  1948. function frame12(){
  1949. stop();
  1950. if ((((msg == null)) || ((msg.length == 0)))){
  1951. MessageMC.visible = false;
  1952. };
  1953. this.closeBttn.addEventListener(MouseEvent.CLICK, closepopup);
  1954. ScrollUp.addEventListener(MouseEvent.CLICK, scrollup);
  1955. ScrollDown.addEventListener(MouseEvent.CLICK, scrolldown);
  1956. textBox.addEventListener(Event.SCROLL, scrolled);
  1957. ScrollUp.visible = false;
  1958. ScrollDown.visible = false;
  1959. MessageMC.gotoAndStop(2);
  1960. objs = new Array();
  1961. objs.push(closeBttn);
  1962. MovieClip(parent).ThemeButtonObjects(objs, MovieClip(parent).projconfig.ui_color);
  1963. if (curmode == 1){
  1964. readMsg(null);
  1965. };
  1966. textBox.addEventListener(KeyboardEvent.KEY_UP, sendHelpMsg);
  1967. ScrollDownGF.mouseEnabled = false;
  1968. ScrollUpGF.mouseEnabled = false;
  1969. }
  1970. public function handleScrollBars(){
  1971. if (textBox.bottomScrollV < textBox.numLines){
  1972. ScrollDown.visible = true;
  1973. } else {
  1974. ScrollDown.visible = false;
  1975. };
  1976. ScrollDownGF.visible = ScrollDown.visible;
  1977. if (textBox.scrollV > 1){
  1978. ScrollUp.visible = true;
  1979. } else {
  1980. ScrollUp.visible = false;
  1981. };
  1982. ScrollUpGF.visible = ScrollUp.visible;
  1983. }
  1984. function frame1(){
  1985. stop();
  1986. if (msg == null){
  1987. msg = "";
  1988. };
  1989. minheight = 11;
  1990. }
  1991. public function scrollup(_arg1:Event){
  1992. textBox.scrollV--;
  1993. handleScrollBars();
  1994. }
  1995. public function showingNew():Boolean{
  1996. if ((((this.currentFrame == 12)) && ((curmode == 1)))){
  1997. return (true);
  1998. };
  1999. return (false);
  2000. }
  2001. public function closepopup(_arg1:MouseEvent){
  2002. gotoAndPlay("close");
  2003. }
  2004. public function UpdateText(_arg1:String){
  2005. var _local2:int;
  2006. var _local3:int;
  2007. if (textBox == null){
  2008. return;
  2009. };
  2010. _local2 = textBox.scrollV;
  2011. _local3 = textBox.maxScrollV;
  2012. MessageMC.transform.colorTransform = new Color();
  2013. textBox.text = msg;
  2014. textBox.scrollV = textBox.maxScrollV;
  2015. handleScrollBars();
  2016. }
  2017. public function setMsg(_arg1:String){
  2018. var _local2:Date;
  2019. var _local3:Color;
  2020. if (_arg1.length == 0){
  2021. return;
  2022. };
  2023. if (msg.length != 0){
  2024. msg = (msg + "\n");
  2025. };
  2026. _local2 = new Date();
  2027. msg = ((((msg + "[") + _local2.toLocaleTimeString()) + "]: ") + _arg1);
  2028. if (curmode == 0){
  2029. if (MessageMC != null){
  2030. MessageMC.visible = true;
  2031. _local3 = new Color();
  2032. _local3.setTint(MovieClip(parent).projconfig.ui_color, 0.6);
  2033. MessageMC.transform.colorTransform = _local3;
  2034. };
  2035. } else {
  2036. UpdateText(msg);
  2037. };
  2038. }
  2039. public function sendMsg(_arg1:Event){
  2040. var _local2:StandardCommand;
  2041. var _local3:String;
  2042. _local2 = MovieClip(parent).projconfig.GetStandardCommand(StandardCommand.CMD_HELP_MSG);
  2043. if (_local2 != undefined){
  2044. _local3 = textBox.text.replace("\r", "");
  2045. MovieClip(parent).cnx.SendSerial(_local2.join, _local3);
  2046. textBox.scrollV = 0;
  2047. ScrollUp.visible = false;
  2048. ScrollDown.visible = false;
  2049. textBox.text = "";
  2050. };
  2051. }
  2052. public function scrolldown(_arg1:Event){
  2053. textBox.scrollV++;
  2054. handleScrollBars();
  2055. }
  2056.  
  2057. }
  2058. }//package Crestron_fla
  2059. package Crestron_fla {
  2060. import flash.display.*;
  2061.  
  2062. public dynamic class CustomCheckbox_52 extends MovieClip {
  2063.  
  2064. public function CustomCheckbox_52(){
  2065. addFrameScript(0, frame1, 1, frame2);
  2066. }
  2067. function frame1(){
  2068. stop();
  2069. }
  2070. function frame2(){
  2071. stop();
  2072. }
  2073.  
  2074. }
  2075. }//package Crestron_fla
  2076. package Crestron_fla {
  2077. import flash.net.*;
  2078. import flash.display.*;
  2079.  
  2080. public dynamic class IconButton_21 extends MovieClip {
  2081.  
  2082. public var btn:SimpleButton;
  2083.  
  2084. public function IconButton_21(){
  2085. addFrameScript(0, frame1);
  2086. }
  2087. function frame1(){
  2088. }
  2089. public function setIconURL(_arg1:String){
  2090. var _local2:Loader;
  2091. var _local3:URLRequest;
  2092. _local2 = new Loader();
  2093. _local3 = new URLRequest(_arg1);
  2094. _local2.load(_local3);
  2095. addChild(_local2);
  2096. _local2.mouseEnabled = false;
  2097. }
  2098.  
  2099. }
  2100. }//package Crestron_fla
  2101. package Crestron_fla {
  2102. import flash.events.*;
  2103. import flash.geom.*;
  2104. import flash.net.*;
  2105. import flash.utils.*;
  2106. import flash.display.*;
  2107. import flash.text.*;
  2108. import flash.ui.*;
  2109. import adobe.utils.*;
  2110. import flash.accessibility.*;
  2111. import flash.errors.*;
  2112. import flash.external.*;
  2113. import flash.filters.*;
  2114. import flash.media.*;
  2115. import flash.printing.*;
  2116. import flash.system.*;
  2117. import flash.xml.*;
  2118.  
  2119. public dynamic class MessegeMC_29 extends MovieClip {
  2120.  
  2121. public var objs:Array;
  2122. public var WriteBttn:SimpleButton;
  2123.  
  2124. public function MessegeMC_29(){
  2125. addFrameScript(0, frame1, 1, frame2, 23, frame24);
  2126. }
  2127. function frame1(){
  2128. stop();
  2129. }
  2130. function frame24(){
  2131. gotoAndPlay("start");
  2132. }
  2133. function frame2(){
  2134. stop();
  2135. objs = new Array();
  2136. objs.push(WriteBttn);
  2137. MovieClip(parent.parent).ThemeButtonObjects(objs, MovieClip(parent.parent).projconfig.ui_color);
  2138. WriteBttn.addEventListener(MouseEvent.CLICK, MovieClip(parent).readMsg);
  2139. }
  2140.  
  2141. }
  2142. }//package Crestron_fla
  2143. package Crestron_fla {
  2144. import flash.events.*;
  2145. import CrestronDLP.*;
  2146. import flash.geom.*;
  2147. import Crestron.*;
  2148. import flash.net.*;
  2149. import flash.utils.*;
  2150. import flash.display.*;
  2151. import flash.text.*;
  2152. import flash.ui.*;
  2153. import adobe.utils.*;
  2154. import flash.accessibility.*;
  2155. import flash.errors.*;
  2156. import flash.external.*;
  2157. import flash.filters.*;
  2158. import flash.media.*;
  2159. import flash.printing.*;
  2160. import flash.system.*;
  2161. import flash.xml.*;
  2162.  
  2163. public dynamic class WarmingPopup_48 extends MovieClip {
  2164.  
  2165. public var prompt_txt:TextField;
  2166. public var tmr:Timer;
  2167. public var objs:Array;
  2168. public var fakeanalogval:Number;
  2169. public var tmrgauge:MovieClip;
  2170. public var bwarming:Boolean;
  2171.  
  2172. public function WarmingPopup_48(){
  2173. addFrameScript(0, frame1, 6, frame7, 11, frame12);
  2174. }
  2175. public function fakevalue(_arg1:Event){
  2176. var e:* = _arg1;
  2177. try {
  2178. fakeanalogval = (fakeanalogval + 5);
  2179. if (fakeanalogval > 0xFF){
  2180. fakeanalogval = 0;
  2181. };
  2182. tmrgauge.gotoAndStop(fakeanalogval);
  2183. } catch(e) {
  2184. tmr.stop();
  2185. };
  2186. }
  2187. public function closewarming(){
  2188. gotoAndPlay("close");
  2189. }
  2190. function frame12(){
  2191. stop();
  2192. fakeanalogval = 0;
  2193. tmr = new Timer(300);
  2194. tmr.addEventListener(TimerEvent.TIMER, fakevalue);
  2195. tmr.start();
  2196. prompt_txt.mouseEnabled = false;
  2197. objs = new Array();
  2198. objs.push(tmrgauge);
  2199. MovieClip(this.parent).ThemeObjects(objs, MovieClip(this.parent).projconfig.ui_color);
  2200. tmrgauge.gotoAndStop(2);
  2201. MovieClip(parent).cnx.addEventListener(CNXConnection.ANALOG, onAnalog);
  2202. setJoinVal();
  2203. }
  2204. function frame7(){
  2205. if (bwarming){
  2206. prompt_txt.text = "Warming Up";
  2207. } else {
  2208. prompt_txt.text = "Cooling Down";
  2209. };
  2210. }
  2211. function frame1(){
  2212. bwarming = true;
  2213. stop();
  2214. }
  2215. public function showwarming(_arg1:Boolean){
  2216. bwarming = _arg1;
  2217. gotoAndPlay("open");
  2218. }
  2219. public function onAnalog(_arg1:AnalogEvent){
  2220. var _local2:StandardCommand;
  2221. _local2 = MovieClip(parent).projconfig.GetStandardCommand(StandardCommand.CMD_WARMING_VAL);
  2222. if (((!((_local2 == undefined))) && ((_local2.join == _arg1.Join)))){
  2223. tmr.stop();
  2224. };
  2225. if (_arg1.Join == 5011){
  2226. tmr.stop();
  2227. };
  2228. setJoinVal();
  2229. }
  2230. public function setJoinVal(){
  2231. var _local1:uint;
  2232. var _local2:Number;
  2233. var _local3:StandardCommand;
  2234. if (tmrgauge == null){
  2235. return;
  2236. };
  2237. _local1 = 0;
  2238. if (bwarming){
  2239. _local3 = MovieClip(parent).projconfig.GetStandardCommand(StandardCommand.CMD_WARMING_VAL);
  2240. if (_local3 == undefined){
  2241. return;
  2242. };
  2243. if (MovieClip(parent).analogs[_local3.join] != undefined){
  2244. _local1 = MovieClip(parent).analogs[_local3.join];
  2245. };
  2246. } else {
  2247. _local1 = MovieClip(parent).analogs[5011];
  2248. };
  2249. _local2 = Math.ceil(((_local1 / 65536) * 0xFF));
  2250. tmrgauge.gotoAndStop((_local2 + 2));
  2251. }
  2252.  
  2253. }
  2254. }//package Crestron_fla
  2255. package Crestron_fla {
  2256. import flash.display.*;
  2257.  
  2258. public dynamic class HorGauge_39 extends MovieClip {
  2259.  
  2260. public function HorGauge_39(){
  2261. addFrameScript(0, frame1);
  2262. }
  2263. function frame1(){
  2264. stop();
  2265. }
  2266.  
  2267. }
  2268. }//package Crestron_fla
  2269. package Crestron_fla {
  2270. import flash.display.*;
  2271. import flash.text.*;
  2272.  
  2273. public dynamic class d_20 extends MovieClip {
  2274.  
  2275. public var okbtn:MovieClip;
  2276. public var leftbtn:MovieClip;
  2277. public var lblExt1:TextField;
  2278. public var lblExt3:TextField;
  2279. public var lblExt4:TextField;
  2280. public var lblExt2:TextField;
  2281. public var menutext:TextField;
  2282. public var oktext:TextField;
  2283. public var leftgf:MovieClip;
  2284. public var uptext:TextField;
  2285. public var righttext:TextField;
  2286. public var exittext:TextField;
  2287. public var rightgf:MovieClip;
  2288. public var downgfx:MovieClip;
  2289. public var downbtn:MovieClip;
  2290. public var menubtn:MovieClip;
  2291. public var btnExt4:MovieClip;
  2292. public var btnExt1:MovieClip;
  2293. public var btnExt3:MovieClip;
  2294. public var exitbtn:MovieClip;
  2295. public var upgf:MovieClip;
  2296. public var lefttext:TextField;
  2297. public var btnExt2:MovieClip;
  2298. public var downtext:TextField;
  2299. public var upbtn:MovieClip;
  2300. public var rightbtn:MovieClip;
  2301.  
  2302. }
  2303. }//package Crestron_fla
  2304. package Crestron_fla {
  2305. import flash.display.*;
  2306. import flash.text.*;
  2307.  
  2308. public dynamic class Ver_ScrollNewMC_31 extends MovieClip {
  2309.  
  2310. public var ScrollDOWN:SimpleButton;
  2311. public var source2text:TextField;
  2312. public var source4text:TextField;
  2313. public var hide2:TextField;
  2314. public var hide3:TextField;
  2315. public var hide4:TextField;
  2316. public var hide5:TextField;
  2317. public var hide1:TextField;
  2318. public var downsource:MovieClip;
  2319. public var ScrollUP:SimpleButton;
  2320. public var edit3:TextField;
  2321. public var edit4:TextField;
  2322. public var edit5:TextField;
  2323. public var edit1:TextField;
  2324. public var source3:SimpleButton;
  2325. public var edit2:TextField;
  2326. public var source4:SimpleButton;
  2327. public var source1:SimpleButton;
  2328. public var source2:SimpleButton;
  2329. public var source5text:TextField;
  2330. public var source3text:TextField;
  2331. public var upsource:MovieClip;
  2332. public var source5:SimpleButton;
  2333. public var source1text:TextField;
  2334. public var reset1:TextField;
  2335. public var reset2:TextField;
  2336. public var reset4:TextField;
  2337. public var reset5:TextField;
  2338. public var reset3:TextField;
  2339.  
  2340. public function Ver_ScrollNewMC_31(){
  2341. addFrameScript(0, frame1);
  2342. }
  2343. function frame1(){
  2344. stop();
  2345. stop();
  2346. }
  2347.  
  2348. }
  2349. }//package Crestron_fla
  2350. package Crestron_fla {
  2351. import flash.events.*;
  2352. import flash.geom.*;
  2353. import flash.net.*;
  2354. import flash.utils.*;
  2355. import flash.display.*;
  2356. import flash.text.*;
  2357. import flash.ui.*;
  2358. import adobe.utils.*;
  2359. import flash.accessibility.*;
  2360. import flash.errors.*;
  2361. import flash.external.*;
  2362. import flash.filters.*;
  2363. import flash.media.*;
  2364. import flash.printing.*;
  2365. import flash.system.*;
  2366. import flash.xml.*;
  2367.  
  2368. public dynamic class EmergencyAlertMC_58 extends MovieClip {
  2369.  
  2370. public var SendBttn:SimpleButton;
  2371. public var clearonclick:Boolean;
  2372. public var txtReportEmergency:TextField;
  2373. public var etype:String;
  2374. public var ScrollDown:SimpleButton;
  2375. public var ScrollDownGF:MovieClip;
  2376. public var txtEmergencyIncoming:TextField;
  2377. public var ScrollUp:SimpleButton;
  2378. public var msg:String;
  2379. public var InstanceName_0:MovieClip;
  2380. public var boxEmergencyOutgoing:MovieClip;
  2381. public var SendTXT:TextField;
  2382. public var txtEmergencyOutgoing:TextField;
  2383. public var ScrollUpGF:MovieClip;
  2384. public var txtEmergencyTitle:TextField;
  2385.  
  2386. public function EmergencyAlertMC_58(){
  2387. addFrameScript(0, frame1, 1, frame2);
  2388. }
  2389. public function sendEmergencyMsg(_arg1:KeyboardEvent){
  2390. var _local2:MouseEvent;
  2391. if (_arg1.keyCode == 13){
  2392. sendmsg(_local2);
  2393. };
  2394. }
  2395. public function setEmergencyType(_arg1:String){
  2396. etype = _arg1;
  2397. if (etype.length == 0){
  2398. etype = "Emergency";
  2399. };
  2400. if (txtEmergencyTitle != null){
  2401. txtEmergencyTitle.text = (etype + " Alert");
  2402. };
  2403. }
  2404. public function scrolled(_arg1:Event){
  2405. handleScrollBars();
  2406. }
  2407. function frame1(){
  2408. stop();
  2409. msg = "";
  2410. etype = "";
  2411. }
  2412. public function handleScrollBars(){
  2413. if (txtEmergencyIncoming.bottomScrollV < txtEmergencyIncoming.numLines){
  2414. ScrollDown.visible = true;
  2415. } else {
  2416. ScrollDown.visible = false;
  2417. };
  2418. ScrollDownGF.visible = ScrollDown.visible;
  2419. if (txtEmergencyIncoming.scrollV > 1){
  2420. ScrollUp.visible = true;
  2421. } else {
  2422. ScrollUp.visible = false;
  2423. };
  2424. ScrollUpGF.visible = ScrollUp.visible;
  2425. }
  2426. function frame2(){
  2427. stop();
  2428. clearonclick = true;
  2429. SendTXT.mouseEnabled = false;
  2430. txtEmergencyIncoming.type = "dynamic";
  2431. txtEmergencyOutgoing.addEventListener(KeyboardEvent.KEY_UP, sendEmergencyMsg);
  2432. SendBttn.addEventListener(MouseEvent.CLICK, sendmsg);
  2433. ScrollUp.addEventListener(MouseEvent.CLICK, scrollup);
  2434. ScrollDown.addEventListener(MouseEvent.CLICK, scrolldown);
  2435. txtEmergencyOutgoing.addEventListener(FocusEvent.FOCUS_IN, focused);
  2436. txtEmergencyIncoming.addEventListener(Event.SCROLL, scrolled);
  2437. ScrollUp.visible = false;
  2438. ScrollDown.visible = false;
  2439. ScrollDownGF.mouseEnabled = false;
  2440. ScrollUpGF.mouseEnabled = false;
  2441. txtEmergencyIncoming.text = msg;
  2442. txtEmergencyIncoming.type = "dynamic";
  2443. txtEmergencyIncoming.scrollV = txtEmergencyIncoming.maxScrollV;
  2444. handleScrollBars();
  2445. MovieClip(parent).applyUiXml();
  2446. setEmergencyType(etype);
  2447. }
  2448. public function scrollup(_arg1:Event){
  2449. txtEmergencyIncoming.scrollV--;
  2450. handleScrollBars();
  2451. }
  2452. public function focused(_arg1:Event){
  2453. if (clearonclick == true){
  2454. txtEmergencyOutgoing.textColor = 0;
  2455. txtEmergencyOutgoing.text = "";
  2456. };
  2457. clearonclick = false;
  2458. }
  2459. public function setMsg(_arg1:String){
  2460. var _local2:Date;
  2461. if (_arg1.length == 0){
  2462. return;
  2463. };
  2464. if (msg.length != 0){
  2465. msg = (msg + "\n");
  2466. };
  2467. _local2 = new Date();
  2468. msg = ((((msg + "[") + _local2.toLocaleTimeString()) + "]: ") + _arg1);
  2469. if (txtEmergencyIncoming != null){
  2470. txtEmergencyIncoming.text = msg;
  2471. txtEmergencyIncoming.type = "dynamic";
  2472. txtEmergencyIncoming.scrollV = txtEmergencyIncoming.maxScrollV;
  2473. handleScrollBars();
  2474. };
  2475. }
  2476. public function scrolldown(_arg1:Event){
  2477. txtEmergencyIncoming.scrollV++;
  2478. handleScrollBars();
  2479. }
  2480. public function sendmsg(_arg1:Event){
  2481. var _local2:String;
  2482. if (txtEmergencyOutgoing.text.length == 0){
  2483. return;
  2484. };
  2485. _local2 = txtEmergencyOutgoing.text.replace("\r", "");
  2486. MovieClip(parent).cnx.SendSerial(22, _local2);
  2487. setMsg(("[Sent] " + _local2));
  2488. txtEmergencyOutgoing.text = "";
  2489. }
  2490.  
  2491. }
  2492. }//package Crestron_fla
  2493. package Crestron_fla {
  2494. import flash.events.*;
  2495. import flash.geom.*;
  2496. import flash.net.*;
  2497. import flash.utils.*;
  2498. import flash.display.*;
  2499. import flash.text.*;
  2500. import flash.ui.*;
  2501. import adobe.utils.*;
  2502. import flash.accessibility.*;
  2503. import flash.errors.*;
  2504. import flash.external.*;
  2505. import flash.filters.*;
  2506. import flash.media.*;
  2507. import flash.printing.*;
  2508. import flash.system.*;
  2509. import flash.xml.*;
  2510.  
  2511. public dynamic class PowerPopup_61 extends MovieClip {
  2512.  
  2513. public var yesbtn:SimpleButton;
  2514. public var yes_txt:TextField;
  2515. public var objs:Array;
  2516. public var closeBttn:SimpleButton;
  2517. public var nobtn:SimpleButton;
  2518. public var no_txt:TextField;
  2519.  
  2520. public function PowerPopup_61(){
  2521. addFrameScript(0, frame1, 11, frame12);
  2522. }
  2523. function frame12(){
  2524. stop();
  2525. this.closeBttn.addEventListener(MouseEvent.CLICK, closepopup);
  2526. this.nobtn.addEventListener(MouseEvent.CLICK, closepopup);
  2527. yesbtn.addEventListener(MouseEvent.CLICK, MovieClip(parent).powerOffConfirmed);
  2528. yesbtn.addEventListener(MouseEvent.CLICK, closepopup);
  2529. yes_txt.mouseEnabled = false;
  2530. no_txt.mouseEnabled = false;
  2531. objs = new Array();
  2532. objs.push(yesbtn);
  2533. objs.push(nobtn);
  2534. objs.push(closeBttn);
  2535. MovieClip(parent).ThemeButtonObjects(objs, MovieClip(parent).projconfig.ui_color);
  2536. }
  2537. function frame1(){
  2538. stop();
  2539. }
  2540. public function closepopup(_arg1:MouseEvent):void{
  2541. gotoAndPlay("close");
  2542. }
  2543.  
  2544. }
  2545. }//package Crestron_fla
  2546. package Crestron_fla {
  2547. import flash.display.*;
  2548. import flash.text.*;
  2549.  
  2550. public dynamic class Hor_ScrollMC_36 extends MovieClip {
  2551.  
  2552. public var extended3:SimpleButton;
  2553. public var extended4:SimpleButton;
  2554. public var extended1:SimpleButton;
  2555. public var extended2:SimpleButton;
  2556. public var extended1text:TextField;
  2557. public var extended3text:TextField;
  2558. public var leftarrow:MovieClip;
  2559. public var Left_bttn:SimpleButton;
  2560. public var rightarrow:MovieClip;
  2561. public var Right_bttn:SimpleButton;
  2562. public var extended2text:TextField;
  2563. public var extended4text:TextField;
  2564.  
  2565. public function Hor_ScrollMC_36(){
  2566. addFrameScript(0, frame1);
  2567. }
  2568. function frame1(){
  2569. stop();
  2570. }
  2571.  
  2572. }
  2573. }//package Crestron_fla
  2574. package Crestron_fla {
  2575. import flash.events.*;
  2576. import flash.display.*;
  2577. import flash.text.*;
  2578.  
  2579. public dynamic class UpdateCompleteMC_60 extends MovieClip {
  2580.  
  2581. public var closeBttn:SimpleButton;
  2582. public var txtUpdateComplete:TextField;
  2583. public var gmsg:String;
  2584.  
  2585. public function UpdateCompleteMC_60(){
  2586. addFrameScript(0, frame1, 1, frame2, 7, frame8, 11, frame12);
  2587. }
  2588. function frame12(){
  2589. stop();
  2590. this.closeBttn.addEventListener(MouseEvent.CLICK, closepopup);
  2591. if (gmsg.length > 0){
  2592. txtUpdateComplete.text = gmsg;
  2593. };
  2594. }
  2595. function frame8(){
  2596. if (gmsg.length > 0){
  2597. txtUpdateComplete.text = gmsg;
  2598. };
  2599. }
  2600. function frame2(){
  2601. if (gmsg.length == 0){
  2602. gmsg = "Update Complete";
  2603. };
  2604. }
  2605. function frame1(){
  2606. stop();
  2607. gmsg = "";
  2608. }
  2609. public function closepopup(_arg1:MouseEvent):void{
  2610. gotoAndPlay("close");
  2611. }
  2612. public function setMsg(_arg1:String){
  2613. gmsg = _arg1;
  2614. play();
  2615. }
  2616.  
  2617. }
  2618. }//package Crestron_fla
  2619. package Crestron_fla {
  2620. import flash.events.*;
  2621. import CrestronDLP.*;
  2622. import fl.motion.*;
  2623. import flash.geom.*;
  2624. import Crestron.*;
  2625. import flash.net.*;
  2626. import flash.utils.*;
  2627. import flash.display.*;
  2628. import flash.text.*;
  2629. import flash.ui.*;
  2630. import adobe.utils.*;
  2631. import flash.accessibility.*;
  2632. import flash.errors.*;
  2633. import flash.external.*;
  2634. import flash.filters.*;
  2635. import flash.media.*;
  2636. import flash.printing.*;
  2637. import flash.system.*;
  2638. import flash.xml.*;
  2639.  
  2640. public dynamic class ToolsPopup_49 extends MovieClip {
  2641.  
  2642. public const SERIAL_DNS_SERVER:uint = 5043;
  2643. public const SERIAL_CS_IP_ADDR:uint = 5045;
  2644. public const SERIAL_USER_PWD:uint = 5061;
  2645. public const SERIAL_IP_ADDR:uint = 5040;
  2646. public const SERIAL_ASSIGNED_TO:uint = 5051;
  2647. public const SERIAL_SUBNET_MASK:uint = 5041;
  2648. public const SERIAL_DHCP_ADDR:uint = 5039;
  2649. public const SERIAL_ADMIN_PWD:uint = 5062;
  2650. public const SERIAL_LOCATION:uint = 5052;
  2651. public const SERIAL_PROJ_NAME:uint = 5050;
  2652. public const SERIAL_CS_IPID:uint = 5046;
  2653. public const SERIAL_CS_PORT:uint = 5047;
  2654. public const SERIAL_DEFAULT_GATEWAY:uint = 5042;
  2655. public const _FILLALL:String = "All fields must be completed";
  2656. public const SERIAL_USER_NAME:uint = 5051;
  2657.  
  2658. public var CSendTXT:TextField;
  2659. public var lblHostname:TextField;
  2660. public var btnUpdateAdmin:SimpleButton;
  2661. public var lblDefaultGateway:TextField;
  2662. public var txtConfirmPassword_BG:MovieClip;
  2663. public var txtAdminPassword_BG:MovieClip;
  2664. public var txtDNSServer_BG:MovieClip;
  2665. public var lblSubnetMask:TextField;
  2666. public var txtIpAddress:TextField;
  2667. public var txtLocation:TextField;
  2668. public var txtIpAddr:TextField;
  2669. public var chkAdmin:MovieClip;
  2670. public var btnUpdateEtcInfo:SimpleButton;
  2671. public var ASendTXT:TextField;
  2672. public var objs:Array;
  2673. public var lblPassword:TextField;
  2674. public var txtSubnetMask:TextField;
  2675. public var lcl_digitals:Array;
  2676. public var lblDHCPEnabled:TextField;
  2677. public var lcl_serials:Array;
  2678. public var txtAdminPassword:TextField;
  2679. public var dhcp_on_to_start:Boolean;
  2680. public var ExitBttn:SimpleButton;
  2681. public var txtDefaultGateway_BG:MovieClip;
  2682. public var lblDNSServer:TextField;
  2683. public var txtConfirmAdminPassword:TextField;
  2684. public var txtHostname:TextField;
  2685. public var CSendTXT2:TextField;
  2686. public var txtProjectorName:TextField;
  2687. public var lblConfirmPassword:TextField;
  2688. public var txtConfirmPassword:TextField;
  2689. public var CSendTXT10:TextField;
  2690. public var lblConfirmAdminPassword:TextField;
  2691. public var lblAdminPassword:TextField;
  2692. public var lblIpAddr:TextField;
  2693. public var btnUpdateIpInfo:SimpleButton;
  2694. public var txtName:TextField;
  2695. public var txtPort:TextField;
  2696. public var txtPassword:TextField;
  2697. public var txtIpId:TextField;
  2698. public var txtDNSServer:TextField;
  2699. public var txtHostname_BG:MovieClip;
  2700. public var exittext:TextField;
  2701. public var txtDefaultGateway:TextField;
  2702. public var lblPort:TextField;
  2703. public var lblProjectorName:TextField;
  2704. public var lblName:TextField;
  2705. public var lblIpId:TextField;
  2706. public var txtIpAddress_BG:MovieClip;
  2707. public var lblLocation:TextField;
  2708. public var lblPasswordEnabled:TextField;
  2709. public var chkUser:MovieClip;
  2710. public var chkDHCP:MovieClip;
  2711. public var lblAdminPasswordEnabled:TextField;
  2712. public var btnUpdateUser:SimpleButton;
  2713. public var USendTXT:TextField;
  2714. public var lblIpAddress:TextField;
  2715. public var txtSubnetMask_BG:MovieClip;
  2716. public var txtPassword_BG:MovieClip;
  2717. public var txtConfirmAdminPassword_BG:MovieClip;
  2718. public var btnUpdateProjector:SimpleButton;
  2719.  
  2720. public function ToolsPopup_49(){
  2721. addFrameScript(0, frame1, 1, frame2);
  2722. }
  2723. public function enableDHCP(_arg1:Boolean){
  2724. var _local2:Color;
  2725. txtIpAddress.mouseEnabled = !(_arg1);
  2726. txtSubnetMask.mouseEnabled = !(_arg1);
  2727. txtDNSServer.mouseEnabled = !(_arg1);
  2728. txtDefaultGateway.mouseEnabled = !(_arg1);
  2729. if (_arg1){
  2730. chkDHCP.gotoAndStop(2);
  2731. _local2 = new Color();
  2732. _local2.setTint(0xC0C0C0, 0.6);
  2733. txtIpAddress_BG.transform.colorTransform = _local2;
  2734. txtSubnetMask_BG.transform.colorTransform = _local2;
  2735. txtDNSServer_BG.transform.colorTransform = _local2;
  2736. txtDefaultGateway_BG.transform.colorTransform = _local2;
  2737. txtIpAddress.transform.colorTransform = _local2;
  2738. txtSubnetMask.transform.colorTransform = _local2;
  2739. txtDNSServer.transform.colorTransform = _local2;
  2740. txtDefaultGateway.transform.colorTransform = _local2;
  2741. } else {
  2742. chkDHCP.gotoAndStop(1);
  2743. txtIpAddress_BG.transform.colorTransform = new Color();
  2744. txtSubnetMask_BG.transform.colorTransform = new Color();
  2745. txtDNSServer_BG.transform.colorTransform = new Color();
  2746. txtDefaultGateway_BG.transform.colorTransform = new Color();
  2747. txtIpAddress.transform.colorTransform = new Color();
  2748. txtSubnetMask.transform.colorTransform = new Color();
  2749. txtDNSServer.transform.colorTransform = new Color();
  2750. txtDefaultGateway.transform.colorTransform = new Color();
  2751. };
  2752. }
  2753. public function updateAdmin(_arg1:Event){
  2754. var _local2:String;
  2755. if (chkAdmin.currentFrame != 2){
  2756. MovieClip(parent).cnx.SendDigital(5217, true);
  2757. MovieClip(parent).cnx.SendDigital(5216, false);
  2758. MovieClip(parent).UpdateCompleteMC.play();
  2759. return;
  2760. };
  2761. if (txtAdminPassword.text.length > 0){
  2762. if (txtAdminPassword.text == txtConfirmAdminPassword.text){
  2763. MovieClip(parent).cnx.SendDigital(5216, true);
  2764. MovieClip(parent).cnx.SendDigital(5217, false);
  2765. _local2 = Base64.Encode(txtAdminPassword.text);
  2766. MovieClip(parent).cnx.SendSerial(5062, _local2);
  2767. MovieClip(parent).UpdateCompleteMC.play();
  2768. } else {
  2769. alert("Passwords do not match");
  2770. };
  2771. } else {
  2772. alert("Invalid password entered");
  2773. };
  2774. }
  2775. public function updateEtc(_arg1:Event){
  2776. if (!(((((txtProjectorName.text.length > 0)) && ((txtLocation.text.length > 0)))) && ((txtName.text.length > 0)))){
  2777. alert(_FILLALL);
  2778. return;
  2779. };
  2780. MovieClip(parent).cnx.SendSerial(5050, txtProjectorName.text);
  2781. MovieClip(parent).cnx.SendSerial(5052, txtLocation.text);
  2782. MovieClip(parent).cnx.SendSerial(5051, txtName.text);
  2783. MovieClip(parent).UpdateCompleteMC.play();
  2784. }
  2785. public function updateUser(_arg1:Event){
  2786. var _local2:String;
  2787. if (chkUser.currentFrame != 2){
  2788. MovieClip(parent).cnx.SendDigital(5213, true);
  2789. MovieClip(parent).cnx.SendDigital(5212, false);
  2790. MovieClip(parent).UpdateCompleteMC.play();
  2791. return;
  2792. };
  2793. if (txtPassword.text.length > 0){
  2794. if (txtPassword.text == txtConfirmPassword.text){
  2795. MovieClip(parent).cnx.SendDigital(5212, true);
  2796. MovieClip(parent).cnx.SendDigital(5213, false);
  2797. _local2 = Base64.Encode(txtPassword.text);
  2798. MovieClip(parent).cnx.SendSerial(5061, _local2);
  2799. MovieClip(parent).UpdateCompleteMC.play();
  2800. } else {
  2801. alert("Passwords do not match");
  2802. };
  2803. } else {
  2804. alert("Invalid password entered");
  2805. };
  2806. }
  2807. public function validAddress(_arg1:String):Boolean{
  2808. var _local2:Array;
  2809. var _local3:*;
  2810. _local2 = _arg1.split(".");
  2811. if (_local2.length != 4){
  2812. return (false);
  2813. };
  2814. for (_local3 in _local2) {
  2815. if ((((parseInt(_local2[_local3]) < 0)) || ((parseInt(_local2[_local3]) > 0xFF)))){
  2816. return (false);
  2817. };
  2818. };
  2819. return (true);
  2820. }
  2821. public function setStandardCommandText(_arg1:uint, _arg2:Object){
  2822. var _local3:StandardCommand;
  2823. _local3 = MovieClip(parent).projconfig.GetStandardCommand(_arg1);
  2824. if (((!((_local3 == undefined))) && ((_local3.lbl.length > 0)))){
  2825. _arg2.text = _local3.lbl;
  2826. };
  2827. }
  2828. public function toggleAdmin(_arg1:Event){
  2829. if (chkAdmin.currentFrame == 1){
  2830. enableAdmin(true);
  2831. } else {
  2832. enableAdmin(false);
  2833. };
  2834. }
  2835. function frame1(){
  2836. stop();
  2837. }
  2838. function frame2(){
  2839. stop();
  2840. if (MovieClip(parent).projconfig.hasdhcp != "1"){
  2841. txtHostname.visible = false;
  2842. txtHostname_BG.visible = false;
  2843. lblHostname.visible = false;
  2844. btnUpdateProjector.y = ((txtDNSServer.y + txtDNSServer.height) + 5);
  2845. CSendTXT.y = (btnUpdateProjector.y + 1.4);
  2846. };
  2847. ExitBttn.addEventListener(MouseEvent.CLICK, exitpage);
  2848. objs = new Array();
  2849. objs.push(ExitBttn);
  2850. MovieClip(parent).ThemeButtonObjects(objs, MovieClip(parent).projconfig.ui_color);
  2851. exittext.mouseEnabled = false;
  2852. CSendTXT.mouseEnabled = false;
  2853. CSendTXT2.mouseEnabled = false;
  2854. CSendTXT10.mouseEnabled = false;
  2855. ASendTXT.mouseEnabled = false;
  2856. USendTXT.mouseEnabled = false;
  2857. updateText();
  2858. chkDHCP.addEventListener(MouseEvent.CLICK, toggleDHCP);
  2859. chkUser.addEventListener(MouseEvent.CLICK, toggleUser);
  2860. chkAdmin.addEventListener(MouseEvent.CLICK, toggleAdmin);
  2861. btnUpdateEtcInfo.addEventListener(MouseEvent.CLICK, updateEtc);
  2862. btnUpdateIpInfo.addEventListener(MouseEvent.CLICK, updateIp);
  2863. btnUpdateProjector.addEventListener(MouseEvent.CLICK, updateProj);
  2864. btnUpdateUser.addEventListener(MouseEvent.CLICK, updateUser);
  2865. btnUpdateAdmin.addEventListener(MouseEvent.CLICK, updateAdmin);
  2866. MovieClip(parent).applyUiXml();
  2867. }
  2868. public function exitpage(_arg1:MouseEvent):void{
  2869. MovieClip(parent).showToolsPage(false);
  2870. }
  2871. public function onSerial(_arg1:SerialEvent){
  2872. if (this.currentFrame == 2){
  2873. updateText();
  2874. };
  2875. }
  2876. public function onDigital(_arg1:DigitalEvent){
  2877. if (this.currentFrame == 2){
  2878. updateText();
  2879. };
  2880. }
  2881. public function getSerialText(_arg1:uint){
  2882. var retStr:* = null;
  2883. var join:* = _arg1;
  2884. retStr = "";
  2885. try {
  2886. retStr = lcl_serials[join];
  2887. } catch(e) {
  2888. retStr = "";
  2889. };
  2890. if (retStr == null){
  2891. retStr = "";
  2892. };
  2893. return (retStr);
  2894. }
  2895. public function toggleUser(_arg1:Event){
  2896. if (chkUser.currentFrame == 1){
  2897. enableUser(true);
  2898. } else {
  2899. enableUser(false);
  2900. };
  2901. }
  2902. public function toggleDHCP(_arg1:Event){
  2903. if (chkDHCP.currentFrame == 1){
  2904. enableDHCP(true);
  2905. } else {
  2906. enableDHCP(false);
  2907. };
  2908. }
  2909. public function alert(_arg1:String){
  2910. MovieClip(parent).UpdateCompleteMC.setMsg(_arg1);
  2911. }
  2912. public function enableAdmin(_arg1:Boolean){
  2913. var _local2:Color;
  2914. txtAdminPassword.mouseEnabled = _arg1;
  2915. txtConfirmAdminPassword.mouseEnabled = _arg1;
  2916. if (_arg1){
  2917. chkAdmin.gotoAndStop(2);
  2918. txtAdminPassword_BG.transform.colorTransform = new Color();
  2919. txtConfirmAdminPassword_BG.transform.colorTransform = new Color();
  2920. } else {
  2921. chkAdmin.gotoAndStop(1);
  2922. _local2 = new Color();
  2923. _local2.setTint(0xC0C0C0, 0.6);
  2924. txtAdminPassword_BG.transform.colorTransform = _local2;
  2925. txtConfirmAdminPassword_BG.transform.colorTransform = _local2;
  2926. };
  2927. }
  2928. public function updateText(){
  2929. txtIpAddr.text = getSerialText(SERIAL_CS_IP_ADDR);
  2930. setStandardCommandText(StandardCommand.CMD_CS_IP_ADDR, lblIpAddr);
  2931. txtIpId.text = getSerialText(SERIAL_CS_IPID);
  2932. setStandardCommandText(StandardCommand.CMD_CS_IP_ID, lblIpId);
  2933. txtPort.text = getSerialText(SERIAL_CS_PORT);
  2934. setStandardCommandText(StandardCommand.CMD_CS_PORT, lblPort);
  2935. txtProjectorName.text = getSerialText(SERIAL_PROJ_NAME);
  2936. setStandardCommandText(StandardCommand.CMD_PROJECTOR_NAME, lblProjectorName);
  2937. txtLocation.text = getSerialText(SERIAL_LOCATION);
  2938. setStandardCommandText(StandardCommand.CMD_LOCATION, lblLocation);
  2939. txtIpAddress.text = getSerialText(SERIAL_IP_ADDR);
  2940. setStandardCommandText(StandardCommand.CMD_IP_ADDR, lblIpAddress);
  2941. txtSubnetMask.text = getSerialText(SERIAL_SUBNET_MASK);
  2942. setStandardCommandText(StandardCommand.CMD_SUBNET_MASK, lblSubnetMask);
  2943. txtDefaultGateway.text = getSerialText(SERIAL_DEFAULT_GATEWAY);
  2944. setStandardCommandText(StandardCommand.CMD_DEFAULT_GATEWAY, lblDefaultGateway);
  2945. txtDNSServer.text = getSerialText(SERIAL_DNS_SERVER);
  2946. setStandardCommandText(StandardCommand.CMD_DNS_SERVER, lblDNSServer);
  2947. txtHostname.text = getSerialText(SERIAL_DHCP_ADDR);
  2948. enableDHCP(lcl_digitals[5210]);
  2949. dhcp_on_to_start = lcl_digitals[5210];
  2950. setStandardCommandText(StandardCommand.CMD_DHCP_ENABLED, lblDHCPEnabled);
  2951. enableUser(lcl_digitals[5212]);
  2952. setStandardCommandText(StandardCommand.CMD_U_PWRD_ENABLED, lblPasswordEnabled);
  2953. enableAdmin(lcl_digitals[5216]);
  2954. setStandardCommandText(StandardCommand.CMD_A_PWRD_ENABLED, lblAdminPasswordEnabled);
  2955. txtName.text = getSerialText(SERIAL_ASSIGNED_TO);
  2956. setStandardCommandText(StandardCommand.CMD_USER_NAME, lblName);
  2957. setStandardCommandText(StandardCommand.CMD_USER_PWRD, lblPassword);
  2958. setStandardCommandText(StandardCommand.CMD_USER_CONFIRM, lblConfirmPassword);
  2959. setStandardCommandText(StandardCommand.CMD_ADMIN_PWRD, lblAdminPassword);
  2960. setStandardCommandText(StandardCommand.CMD_ADMIN_CONFIRM, lblConfirmAdminPassword);
  2961. }
  2962. public function updateProj(_arg1:Event){
  2963. if (!verifyData()){
  2964. return;
  2965. };
  2966. if (chkDHCP.currentFrame == 2){
  2967. MovieClip(parent).cnx.SendDigital(5210, true);
  2968. } else {
  2969. MovieClip(parent).cnx.SendDigital(5210, false);
  2970. };
  2971. MovieClip(parent).cnx.SendSerial(5040, txtIpAddress.text);
  2972. MovieClip(parent).cnx.SendSerial(5041, txtSubnetMask.text);
  2973. MovieClip(parent).cnx.SendSerial(5042, txtDefaultGateway.text);
  2974. MovieClip(parent).cnx.SendSerial(5043, txtDNSServer.text);
  2975. MovieClip(parent).cnx.SendSerial(5039, txtHostname.text);
  2976. MovieClip(parent).UpdateCompleteMC.play();
  2977. if (chkDHCP.currentFrame == 2){
  2978. MovieClip(parent).ipInfoChanged("");
  2979. } else {
  2980. MovieClip(parent).ipInfoChanged(txtIpAddress.text);
  2981. };
  2982. }
  2983. public function updateIp(_arg1:Event){
  2984. if ((((((txtIpAddr.text.length > 0)) && ((txtIpId.text.length > 0)))) && ((txtPort.text.length > 0)))){
  2985. MovieClip(parent).cnx.SendSerial(5045, txtIpAddr.text);
  2986. MovieClip(parent).cnx.SendSerial(5046, txtIpId.text);
  2987. MovieClip(parent).cnx.SendSerial(5047, txtPort.text);
  2988. MovieClip(parent).UpdateCompleteMC.play();
  2989. };
  2990. }
  2991. public function verifyData():Boolean{
  2992. var _local1:uint;
  2993. var _local2:uint;
  2994. if (chkDHCP.currentFrame == 1){
  2995. if (!(((((((txtIpAddress.text.length > 0)) && ((txtSubnetMask.text.length > 0)))) && ((txtDNSServer.text.length > 0)))) && ((txtDefaultGateway.text.length > 0)))){
  2996. alert(_FILLALL);
  2997. return (false);
  2998. };
  2999. if (!((((((validAddress(txtIpAddress.text)) && (validAddress(txtSubnetMask.text)))) && (validAddress(txtDNSServer.text)))) && (validAddress(txtDefaultGateway.text)))){
  3000. alert("Invalid address entered");
  3001. return (false);
  3002. };
  3003. };
  3004. _local1 = 0;
  3005. _local2 = 0;
  3006. while (_local2 < txtHostname.text.length) {
  3007. _local1 = txtHostname.text.charCodeAt(_local2);
  3008. if ((((((_local1 >= 65)) && ((_local1 <= 90)))) || ((((_local1 >= 97)) && ((_local1 <= 122)))))){
  3009. } else {
  3010. alert("Invalid host name");
  3011. return (false);
  3012. };
  3013. _local2++;
  3014. };
  3015. return (true);
  3016. }
  3017. public function enableUser(_arg1:Boolean){
  3018. var _local2:Color;
  3019. txtPassword.mouseEnabled = _arg1;
  3020. txtConfirmPassword.mouseEnabled = _arg1;
  3021. if (_arg1){
  3022. chkUser.gotoAndStop(2);
  3023. txtPassword_BG.transform.colorTransform = new Color();
  3024. txtConfirmPassword_BG.transform.colorTransform = new Color();
  3025. } else {
  3026. chkUser.gotoAndStop(1);
  3027. _local2 = new Color();
  3028. _local2.setTint(0xC0C0C0, 0.6);
  3029. txtPassword_BG.transform.colorTransform = _local2;
  3030. txtConfirmPassword_BG.transform.colorTransform = _local2;
  3031. };
  3032. }
  3033.  
  3034. }
  3035. }//package Crestron_fla
  3036. package Crestron_fla {
  3037. import flash.events.*;
  3038. import CrestronDLP.*;
  3039. import flash.geom.*;
  3040. import flash.net.*;
  3041. import flash.utils.*;
  3042. import flash.display.*;
  3043. import flash.text.*;
  3044. import flash.ui.*;
  3045. import adobe.utils.*;
  3046. import flash.accessibility.*;
  3047. import flash.errors.*;
  3048. import flash.external.*;
  3049. import flash.filters.*;
  3050. import flash.media.*;
  3051. import flash.printing.*;
  3052. import flash.system.*;
  3053. import flash.xml.*;
  3054.  
  3055. public dynamic class ZoomPopup_45 extends MovieClip {
  3056.  
  3057. public var leftbtn:SimpleButton;
  3058. public var zoominbtn:SimpleButton;
  3059. public var txtHeader:TextField;
  3060. public var objs:Array;
  3061. public var closeBttn:SimpleButton;
  3062. public var downbtn:SimpleButton;
  3063. public var rightbtn:SimpleButton;
  3064. public var upbtn:SimpleButton;
  3065. public var zoomoutbtn:SimpleButton;
  3066.  
  3067. public function ZoomPopup_45(){
  3068. addFrameScript(0, frame1, 11, frame12);
  3069. }
  3070. public function panleft(_arg1:Event){
  3071. var _local2:uint;
  3072. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_PAN_LEFT];
  3073. MovieClip(parent).cnx.SendDigital(_local2, 1);
  3074. MovieClip(parent).cnx.SendDigital(_local2, 0);
  3075. }
  3076. public function zoomin(_arg1:Event){
  3077. var _local2:uint;
  3078. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_ZOOMIN];
  3079. MovieClip(parent).cnx.SendDigital(_local2, 1);
  3080. MovieClip(parent).cnx.SendDigital(_local2, 0);
  3081. }
  3082. function frame12(){
  3083. stop();
  3084. this.closeBttn.addEventListener(MouseEvent.CLICK, closepopup);
  3085. zoominbtn.addEventListener(MouseEvent.CLICK, zoomin);
  3086. zoomoutbtn.addEventListener(MouseEvent.CLICK, zoomout);
  3087. upbtn.addEventListener(MouseEvent.CLICK, panup);
  3088. leftbtn.addEventListener(MouseEvent.CLICK, panleft);
  3089. rightbtn.addEventListener(MouseEvent.CLICK, panright);
  3090. downbtn.addEventListener(MouseEvent.CLICK, pandown);
  3091. objs = new Array();
  3092. objs.push(zoominbtn);
  3093. objs.push(zoomoutbtn);
  3094. objs.push(upbtn);
  3095. objs.push(downbtn);
  3096. objs.push(leftbtn);
  3097. objs.push(rightbtn);
  3098. objs.push(closeBttn);
  3099. MovieClip(parent).ThemeButtonObjects(objs, MovieClip(parent).projconfig.ui_color);
  3100. txtHeader.text = MovieClip(parent).extCmd.cmdname;
  3101. }
  3102. function frame1(){
  3103. stop();
  3104. }
  3105. public function panright(_arg1:Event){
  3106. var _local2:uint;
  3107. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_PAN_RIGHT];
  3108. MovieClip(parent).cnx.SendDigital(_local2, 1);
  3109. MovieClip(parent).cnx.SendDigital(_local2, 0);
  3110. }
  3111. public function zoomout(_arg1:Event){
  3112. var _local2:uint;
  3113. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_ZOOMOUT];
  3114. MovieClip(parent).cnx.SendDigital(_local2, 1);
  3115. MovieClip(parent).cnx.SendDigital(_local2, 0);
  3116. }
  3117. public function closepopup(_arg1:MouseEvent):void{
  3118. gotoAndPlay("close");
  3119. }
  3120. public function pandown(_arg1:Event){
  3121. var _local2:uint;
  3122. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_PAN_DOWN];
  3123. MovieClip(parent).cnx.SendDigital(_local2, 1);
  3124. MovieClip(parent).cnx.SendDigital(_local2, 0);
  3125. }
  3126. public function panup(_arg1:Event){
  3127. var _local2:uint;
  3128. _local2 = MovieClip(parent).extCmd.cmdjoin[ExtendedCommand.JOIN_PAN_UP];
  3129. MovieClip(parent).cnx.SendDigital(_local2, 1);
  3130. MovieClip(parent).cnx.SendDigital(_local2, 0);
  3131. }
  3132.  
  3133. }
  3134. }//package Crestron_fla
  3135. package Crestron_fla {
  3136. import flash.events.*;
  3137. import flash.geom.*;
  3138. import flash.net.*;
  3139. import flash.utils.*;
  3140. import flash.display.*;
  3141. import flash.text.*;
  3142. import flash.ui.*;
  3143. import adobe.utils.*;
  3144. import flash.accessibility.*;
  3145. import flash.errors.*;
  3146. import flash.external.*;
  3147. import flash.filters.*;
  3148. import flash.media.*;
  3149. import flash.printing.*;
  3150. import flash.system.*;
  3151. import flash.xml.*;
  3152.  
  3153. public dynamic class SendMC_42 extends MovieClip {
  3154.  
  3155. public var SendBttn:SimpleButton;
  3156. public var send_txt:TextField;
  3157. public var objs:Array;
  3158. public var objs2:Array;
  3159. public var WriteBttn:SimpleButton;
  3160.  
  3161. public function SendMC_42(){
  3162. addFrameScript(0, frame1, 1, frame2);
  3163. }
  3164. function frame1(){
  3165. stop();
  3166. send_txt.mouseEnabled = false;
  3167. objs = new Array();
  3168. objs.push(SendBttn);
  3169. MovieClip(parent.parent).ThemeButtonObjects(objs, MovieClip(parent.parent).projconfig.ui_color);
  3170. SendBttn.addEventListener(MouseEvent.CLICK, MovieClip(parent).sendMsg);
  3171. }
  3172. function frame2(){
  3173. stop();
  3174. objs2 = new Array();
  3175. objs2.push(WriteBttn);
  3176. MovieClip(parent.parent).ThemeButtonObjects(objs2, MovieClip(parent.parent).projconfig.ui_color);
  3177. WriteBttn.addEventListener(MouseEvent.CLICK, MovieClip(parent).writeMode);
  3178. }
  3179.  
  3180. }
  3181. }//package Crestron_fla
  3182. package Crestron_fla {
  3183. import flash.display.*;
  3184. import flash.text.*;
  3185.  
  3186. public dynamic class LoadingMC_62 extends MovieClip {
  3187.  
  3188. public var loadingText:TextField;
  3189. public var ltext:String;
  3190.  
  3191. public function LoadingMC_62(){
  3192. addFrameScript(0, frame1, 11, frame12);
  3193. }
  3194. function frame12(){
  3195. stop();
  3196. if (ltext != null){
  3197. loadingText.text = ltext;
  3198. };
  3199. }
  3200. function frame1(){
  3201. stop();
  3202. ltext = "";
  3203. }
  3204. public function setText(_arg1:String){
  3205. this.gotoAndStop(12);
  3206. if (((!((this.loadingText == undefined))) && (!((this.loadingText == null))))){
  3207. this.loadingText.text = _arg1;
  3208. };
  3209. ltext = _arg1;
  3210. }
  3211.  
  3212. }
  3213. }//package Crestron_fla
  3214. package Crestron_fla {
  3215. import flash.events.*;
  3216. import flash.display.*;
  3217. import flash.text.*;
  3218.  
  3219. public dynamic class UserPassword_55 extends MovieClip {
  3220.  
  3221. public var ExitTXT:TextField;
  3222. public var Usertxt:TextField;
  3223. public var ExitBttn:SimpleButton;
  3224. public var USendTXT:TextField;
  3225.  
  3226. public function UserPassword_55(){
  3227. addFrameScript(0, frame1, 1, frame2);
  3228. }
  3229. function frame1(){
  3230. stop();
  3231. }
  3232. function frame2(){
  3233. stop();
  3234. ExitBttn.addEventListener(MouseEvent.CLICK, exitpage);
  3235. USendTXT.mouseEnabled = false;
  3236. ExitTXT.mouseEnabled = false;
  3237. }
  3238. public function exitpage(_arg1:MouseEvent):void{
  3239. gotoAndPlay(1);
  3240. }
  3241.  
  3242. }
  3243. }//package Crestron_fla
  3244. package Crestron_fla {
  3245. import flash.events.*;
  3246. import CrestronDLP.*;
  3247. import flash.geom.*;
  3248. import Crestron.*;
  3249. import flash.net.*;
  3250. import flash.utils.*;
  3251. import flash.display.*;
  3252. import flash.text.*;
  3253. import flash.ui.*;
  3254. import adobe.utils.*;
  3255. import flash.accessibility.*;
  3256. import flash.errors.*;
  3257. import flash.external.*;
  3258. import flash.filters.*;
  3259. import flash.media.*;
  3260. import flash.printing.*;
  3261. import flash.system.*;
  3262. import flash.xml.*;
  3263.  
  3264. public dynamic class ADMINPassword_57 extends MovieClip {
  3265.  
  3266. public const ADMIN_PWD:uint = 2;
  3267. public const USER_PWD:uint = 1;
  3268.  
  3269. public var ExitTXT:TextField;
  3270. public var correct:Boolean;
  3271. public var ExitBttn:SimpleButton;
  3272. public var USendTXT:TextField;
  3273. public var btnEnterPwd:SimpleButton;
  3274. public var pwordType:uint;
  3275. public var Admintxt:TextField;
  3276. public var txtLoginTitle:TextField;
  3277.  
  3278. public function ADMINPassword_57(){
  3279. addFrameScript(0, frame1, 1, frame2);
  3280. }
  3281. public function WaitingForUserPassword():Boolean{
  3282. if ((((this.currentFrame == 2)) && ((pwordType == USER_PWD)))){
  3283. return (true);
  3284. };
  3285. return (false);
  3286. }
  3287. public function WaitingForAdminPassword():Boolean{
  3288. if ((((this.currentFrame == 2)) && ((pwordType == ADMIN_PWD)))){
  3289. return (true);
  3290. };
  3291. return (false);
  3292. }
  3293. public function sendPassword(_arg1:KeyboardEvent){
  3294. var _local2:MouseEvent;
  3295. if (_arg1.keyCode == 13){
  3296. sendpwd(_local2);
  3297. };
  3298. }
  3299. public function onDigital(_arg1:DigitalEvent){
  3300. if (this.currentFrame != 2){
  3301. return;
  3302. };
  3303. if (txtLoginTitle == null){
  3304. return;
  3305. };
  3306. if ((((_arg1.Join == 5215)) && (_arg1.Value))){
  3307. if (WaitingForUserPassword()){
  3308. txtLoginTitle.text = "User Login - Incorrect";
  3309. };
  3310. } else {
  3311. if ((((_arg1.Join == 5219)) && (_arg1.Value))){
  3312. if (WaitingForAdminPassword()){
  3313. txtLoginTitle.text = "Admin Login - Incorrect";
  3314. };
  3315. };
  3316. };
  3317. }
  3318. function frame1(){
  3319. stop();
  3320. }
  3321. function frame2(){
  3322. stop();
  3323. ExitBttn.addEventListener(MouseEvent.CLICK, exitpage);
  3324. btnEnterPwd.addEventListener(MouseEvent.CLICK, sendpwd);
  3325. USendTXT.mouseEnabled = false;
  3326. ExitTXT.mouseEnabled = false;
  3327. txtLoginTitle.addEventListener(TextEvent.TEXT_INPUT, clearErrorText);
  3328. Admintxt.addEventListener(KeyboardEvent.KEY_DOWN, sendPassword);
  3329. Admintxt.text = "";
  3330. if (pwordType == USER_PWD){
  3331. txtLoginTitle.text = "User Login";
  3332. ExitTXT.visible = false;
  3333. ExitBttn.visible = false;
  3334. } else {
  3335. txtLoginTitle.text = "Admin Login";
  3336. ExitTXT.visible = true;
  3337. ExitBttn.visible = true;
  3338. };
  3339. }
  3340. public function clearErrorText(_arg1:Event){
  3341. if (pwordType == USER_PWD){
  3342. txtLoginTitle.text = "User Login";
  3343. ExitTXT.visible = false;
  3344. ExitBttn.visible = false;
  3345. } else {
  3346. txtLoginTitle.text = "Admin Login";
  3347. ExitTXT.visible = true;
  3348. ExitBttn.visible = true;
  3349. };
  3350. }
  3351. public function exitpage(_arg1:MouseEvent):void{
  3352. gotoAndPlay(1);
  3353. }
  3354. public function sendpwd(_arg1:MouseEvent){
  3355. var _local2:String;
  3356. _local2 = Base64.Encode(Admintxt.text);
  3357. if (pwordType == USER_PWD){
  3358. MovieClip(parent).cnx.SendSerial(5063, _local2);
  3359. } else {
  3360. MovieClip(parent).cnx.SendSerial(5063, _local2);
  3361. };
  3362. Admintxt.text = "";
  3363. }
  3364.  
  3365. }
  3366. }//package Crestron_fla
  3367. package Crestron_fla {
  3368. import flash.events.*;
  3369. import CrestronDLP.*;
  3370. import fl.motion.*;
  3371. import flash.geom.*;
  3372. import Crestron.*;
  3373. import flash.net.*;
  3374. import flash.utils.*;
  3375. import flash.display.*;
  3376. import flash.text.*;
  3377. import flash.ui.*;
  3378. import adobe.utils.*;
  3379. import flash.accessibility.*;
  3380. import flash.errors.*;
  3381. import flash.external.*;
  3382. import flash.filters.*;
  3383. import flash.media.*;
  3384. import flash.printing.*;
  3385. import flash.system.*;
  3386. import flash.xml.*;
  3387.  
  3388. public dynamic class MainTimeline extends MovieClip {
  3389.  
  3390. public const LOGIN_NONE:int = 0;
  3391. public const DIG_USR_PWD_CORRECT:uint = 5214;
  3392. public const LOGIN_USER:int = 1;
  3393. public const _SRC:String = "source";
  3394. public const LOGIN_ADMIN:int = 2;
  3395. public const DIG_ADM_PWD_CORRECT:uint = 5218;
  3396. public const DIG_PROMPT_PASSWORD:uint = 5212;
  3397. public const verstr:String = "2.6.3";
  3398.  
  3399. public var txti:uint;
  3400. public var txts:Array;
  3401. public var versiontext:TextField;
  3402. public var tools_txt:TextField;
  3403. public var bDisableRetry:Boolean;
  3404. public var volumeMC:MovieClip;
  3405. public var volTimer:Timer;
  3406. public var Extensions:MovieClip;
  3407. public var msgTimer:Timer;
  3408. public var headerBar:MovieClip;
  3409. public var InfoBttn:SimpleButton;
  3410. public var UpdateCompleteMC:MovieClip;
  3411. public var voldownbtn:MovieClip;
  3412. public var loggedIn:Boolean;
  3413. public var exti:uint;
  3414. public var emergencyType:String;
  3415. public var help_txt:TextField;
  3416. public var ToolsMC:MovieClip;
  3417. public var ZoomPopUp:MovieClip;
  3418. public var disabledAnalog:uint;
  3419. public var coverup:MovieClip;
  3420. public var btnRoomView:SimpleButton;
  3421. public var ipid:String;
  3422. public var ToolsBttn:SimpleButton;
  3423. public var voldowntext:TextField;
  3424. public var hdrLoader:MovieClip;
  3425. public var PowerPrompt:MovieClip;
  3426. public var expansion:MovieClip;
  3427. public var UserMC:MovieClip;
  3428. public var compline2text:TextField;
  3429. public var mutetext:TextField;
  3430. public var EmergencyMC:MovieClip;
  3431. public var hightlight_x_size:uint;
  3432. public var currentIndex:uint;
  3433. public var voluptext:TextField;
  3434. public var WarmingPrompt:MovieClip;
  3435. public var InfoMC:MovieClip;
  3436. public var projconfig:DLPConfig;
  3437. public var conTimer:Timer;
  3438. public var volupbtn:MovieClip;
  3439. public var transportControls:MovieClip;
  3440. public var btnLogout:SimpleButton;
  3441. public var serials:Array;
  3442. public var RestartDeviceTimer:Timer;
  3443. public var compline1text:TextField;
  3444. public var powerbtn:MovieClip;
  3445. public var gaugePopUp:MovieClip;
  3446. public var HelpBttn:SimpleButton;
  3447. public var digitals:Array;
  3448. public var info_txt:TextField;
  3449. public var hightlight_y_size:uint;
  3450. public var cnx:CNXConnection;
  3451. public var warmingPopup:MovieClip;
  3452. public var SourceList:MovieClip;
  3453. public var extCmd:ExtendedCommand;
  3454. public var analogs:Array;
  3455. public var HelpDesk:MovieClip;
  3456. public var ipaddr;
  3457. public var mutebtn:MovieClip;
  3458. public var powertext:TextField;
  3459. public var loginLevel:int;
  3460. public var retryConTimer:Timer;
  3461. public var loadingMC:MovieClip;
  3462. public var modeltext:TextField;
  3463. public var currentExtIndex:uint;
  3464. public var my_cm:ContextMenu;
  3465. public var coverup2:MovieClip;
  3466. public var AdminrMC:MovieClip;
  3467. public var ldr:Loader;
  3468.  
  3469. public function MainTimeline(){
  3470. addFrameScript(0, frame1);
  3471. }
  3472. public function inEmergency():Boolean{
  3473. if (EmergencyMC.currentFrame == 2){
  3474. return (true);
  3475. };
  3476. return (false);
  3477. }
  3478. public function showPower(_arg1:Boolean){
  3479. if (true == _arg1){
  3480. coverup.visible = false;
  3481. coverup2.visible = false;
  3482. SetObjectHighlight(powerbtn, projconfig.ui_color);
  3483. } else {
  3484. showToolsPage(false);
  3485. showInfoPage(false);
  3486. coverup.visible = true;
  3487. coverup2.visible = true;
  3488. ClearObjectHighlight(powerbtn);
  3489. };
  3490. }
  3491. public function onConnect(_arg1:Event){
  3492. var _local2:DigitalEvent;
  3493. digitals = new Array();
  3494. analogs = new Array();
  3495. serials = new Array();
  3496. InfoMC.lcl_serials = serials;
  3497. InfoMC.lcl_digitals = digitals;
  3498. ToolsMC.lcl_serials = serials;
  3499. ToolsMC.lcl_digitals = digitals;
  3500. retryConTimer.stop();
  3501. loadingMC.setText("Waiting...");
  3502. conTimer.start();
  3503. _local2 = new DigitalEvent(CNXConnection.DIGITAL, 5, false);
  3504. onDigital(_local2);
  3505. }
  3506. public function scrollExt(_arg1:MouseEvent){
  3507. var _local2:uint;
  3508. _local2 = currentExtIndex;
  3509. if (_arg1.target.name == "Right_bttn"){
  3510. _local2 = (_local2 + 4);
  3511. } else {
  3512. _local2 = (_local2 - 4);
  3513. };
  3514. ScrollExtList(_local2);
  3515. }
  3516. public function showVolumeBar(_arg1:uint){
  3517. _arg1 = (_arg1 + 2);
  3518. volumeMC.gotoAndStop(_arg1);
  3519. volTimer.reset();
  3520. volTimer.start();
  3521. }
  3522. public function applyUiXml(){
  3523. var _local1:*;
  3524. var _local2:*;
  3525. var _local3:*;
  3526. var _local4:*;
  3527. var _local5:Color;
  3528. for each (_local2 in projconfig.hidden_objects) {
  3529. _local1 = null;
  3530. _local3 = _local2.name.split(".");
  3531. for each (_local4 in _local3) {
  3532. if (_local1 == null){
  3533. _local1 = this[_local4];
  3534. } else {
  3535. _local1 = _local1[_local4];
  3536. };
  3537. };
  3538. if (_local1 != null){
  3539. _local1.visible = _local2.visible;
  3540. if (_local2.text.toString().length > 0){
  3541. _local1.text = _local2.text;
  3542. };
  3543. if (_local2.icon.toString().length > 0){
  3544. _local1.setIconURL("sampleIcon.swf");
  3545. };
  3546. if (true == _local2.setcolor){
  3547. _local5 = new Color();
  3548. _local5.setTint(_local2.color, _local2.tint);
  3549. _local1.transform.colorTransform = _local5;
  3550. };
  3551. };
  3552. };
  3553. }
  3554. public function ScrollSourceList(_arg1:uint){
  3555. var _local2:DLPSource;
  3556. var _local3:Boolean;
  3557. var _local4:int;
  3558. var _local5:uint;
  3559. if (_arg1 < 0){
  3560. return;
  3561. };
  3562. _local3 = canEditSources();
  3563. if (_local3){
  3564. _local4 = projconfig.sources.length;
  3565. } else {
  3566. _local4 = projconfig.getVisibleSourceCount();
  3567. };
  3568. if ((((_arg1 >= projconfig.sources.length)) && (!((_arg1 == 0))))){
  3569. return;
  3570. };
  3571. if (_local4 < 6){
  3572. SourceList.upsource.visible = false;
  3573. SourceList.downsource.visible = false;
  3574. } else {
  3575. SourceList.upsource.visible = true;
  3576. SourceList.downsource.visible = true;
  3577. };
  3578. currentIndex = _arg1;
  3579. _local5 = 0;
  3580. while (_local5 < 5) {
  3581. if (_local3){
  3582. _local2 = projconfig.getSourceAt((currentIndex + _local5));
  3583. } else {
  3584. _local2 = projconfig.getVisibleSourceAt((currentIndex + _local5));
  3585. };
  3586. if (_local2 != undefined){
  3587. SourceList[("edit" + (_local5 + 1))].visible = _local3;
  3588. SourceList[("reset" + (_local5 + 1))].visible = _local3;
  3589. SourceList[("hide" + (_local5 + 1))].visible = _local3;
  3590. SourceList[(_SRC + (_local5 + 1))].enabled = true;
  3591. if (_local2.isHidden() == true){
  3592. SourceList[("hide" + (_local5 + 1))].text = "Show";
  3593. } else {
  3594. SourceList[("hide" + (_local5 + 1))].text = "Hide";
  3595. };
  3596. if ((((digitals[_local2.join] == 1)) && (getPowerState()))){
  3597. SetSourceText((("<B>" + _local2.getSourceName()) + "</B>"), (_local5 + 1));
  3598. InfoMC.updateSource(_local2.sourceName);
  3599. SetObjectHighlight(SourceList[(_SRC + (_local5 + 1))], projconfig.ui_color);
  3600. SourceList[((_SRC + (_local5 + 1)) + "text")].textColor = 0xFFFFFF;
  3601. } else {
  3602. SetSourceText(_local2.getSourceName(), (_local5 + 1));
  3603. ClearObjectHighlight(SourceList[(_SRC + (_local5 + 1))]);
  3604. SourceList[((_SRC + (_local5 + 1)) + "text")].textColor = 0xA0A0A0;
  3605. };
  3606. } else {
  3607. SourceList[("edit" + (_local5 + 1))].visible = false;
  3608. SourceList[("reset" + (_local5 + 1))].visible = false;
  3609. SourceList[("hide" + (_local5 + 1))].visible = false;
  3610. SourceList[(_SRC + (_local5 + 1))].enabled = false;
  3611. SetSourceText("", (_local5 + 1));
  3612. ClearObjectHighlight(SourceList[("source" + (_local5 + 1))]);
  3613. };
  3614. _local5++;
  3615. };
  3616. if (_arg1 > 0){
  3617. SourceList.ScrollUP.mouseEnabled = true;
  3618. SetObjectHighlight(SourceList.ScrollUP, projconfig.ui_color);
  3619. } else {
  3620. SourceList.ScrollUP.mouseEnabled = false;
  3621. ClearObjectHighlight(SourceList.ScrollUP);
  3622. };
  3623. if (_local4 >= (_arg1 + 6)){
  3624. SourceList.ScrollDOWN.mouseEnabled = true;
  3625. SetObjectHighlight(SourceList.ScrollDOWN, projconfig.ui_color);
  3626. } else {
  3627. SourceList.ScrollDOWN.mouseEnabled = false;
  3628. ClearObjectHighlight(SourceList.ScrollDOWN);
  3629. };
  3630. }
  3631. public function failed_to_load(_arg1:Event){
  3632. }
  3633. public function scrollSources(_arg1:MouseEvent){
  3634. var _local2:uint;
  3635. _local2 = currentIndex;
  3636. if (_arg1.target.name == "ScrollDOWN"){
  3637. _local2 = (_local2 + 5);
  3638. } else {
  3639. _local2 = (_local2 - 5);
  3640. };
  3641. ScrollSourceList(_local2);
  3642. }
  3643. public function powerOff(){
  3644. PowerPrompt.gotoAndPlay("open");
  3645. }
  3646. public function ClearObjectHighlight(_arg1:Object){
  3647. var _local2:GlowFilter;
  3648. if (_arg1.downState == undefined){
  3649. if (_arg1.btn != undefined){
  3650. ClearObjectHighlight(_arg1.btn);
  3651. };
  3652. return;
  3653. };
  3654. _local2 = new GlowFilter(projconfig.ui_color, 1, 2, 50, 2, 1, true);
  3655. _arg1.overState.filters = [_local2];
  3656. _arg1.upState.filters = null;
  3657. _arg1.downState.filters = null;
  3658. }
  3659. public function SetExtText(_arg1:String, _arg2:uint){
  3660. Extensions[(("extended" + _arg2) + "text")].text = _arg1;
  3661. }
  3662. public function resetsource(_arg1:Event){
  3663. var _local2:*;
  3664. var _local3:DLPSource;
  3665. _local2 = parseInt(_arg1.target.name.replace("reset", ""));
  3666. _local3 = projconfig.getSourceAt(((currentIndex + _local2) - 1));
  3667. if (_local3 == undefined){
  3668. return;
  3669. };
  3670. cnx.SendSerial(_local3.join, "");
  3671. }
  3672. public function ThemeButtonObjects(_arg1:Array, _arg2:uint){
  3673. var _local3:*;
  3674. for each (_local3 in _arg1) {
  3675. ThemeButtonObject(_local3, _arg2);
  3676. };
  3677. }
  3678. public function blogOut(_arg1:Event){
  3679. if (true == inEmergency()){
  3680. return;
  3681. };
  3682. logOut(_arg1);
  3683. }
  3684. public function canEditSources():Boolean{
  3685. var _local1:int;
  3686. if (projconfig.canedit == false){
  3687. return (false);
  3688. };
  3689. _local1 = LOGIN_ADMIN;
  3690. if (digitals[5217] == true){
  3691. _local1 = LOGIN_USER;
  3692. };
  3693. if ((((digitals[5213] == true)) && ((digitals[5217] == true)))){
  3694. _local1 = LOGIN_NONE;
  3695. };
  3696. return ((loginLevel >= _local1));
  3697. }
  3698. public function showUserPasswordPrompt(){
  3699. btnLogout.visible = true;
  3700. AdminrMC.pwordType = 1;
  3701. AdminrMC.gotoAndStop(2);
  3702. }
  3703. public function powerOffConfirmed(_arg1:Event){
  3704. var _local2:StandardCommand;
  3705. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_POWER_OFF);
  3706. if (_local2 != undefined){
  3707. pulseCmd(_local2);
  3708. };
  3709. }
  3710. public function setStandardCommandText(_arg1, _arg2){
  3711. if (_arg2 == undefined){
  3712. return;
  3713. };
  3714. _arg1.autoSize = "center";
  3715. _arg1.mouseEnabled = false;
  3716. if (_arg2.lbl.length > 0){
  3717. _arg1.text = _arg2.lbl;
  3718. };
  3719. }
  3720. public function link2Over(_arg1:Event){
  3721. var _local2:Color;
  3722. _local2 = new Color();
  3723. _local2.setTint(projconfig.ui_color, 0.6);
  3724. expansion.transform.colorTransform = _local2;
  3725. }
  3726. public function source4Clicked(_arg1:Event){
  3727. sourceClicked(4);
  3728. }
  3729. function frame1(){
  3730. hightlight_x_size = 7;
  3731. hightlight_y_size = 7;
  3732. loggedIn = false;
  3733. ToolsBttn.mouseEnabled = false;
  3734. InfoBttn.mouseEnabled = false;
  3735. HelpBttn.mouseEnabled = false;
  3736. expansion.buttonMode = true;
  3737. expansion.useHandCursor = true;
  3738. Extensions.leftarrow.mouseEnabled = false;
  3739. Extensions.rightarrow.mouseEnabled = false;
  3740. coverup.alpha = 0.5;
  3741. coverup2.alpha = 0.5;
  3742. SourceList.upsource.mouseEnabled = false;
  3743. SourceList.downsource.mouseEnabled = false;
  3744. versiontext.text = ("Interface " + verstr);
  3745. stop();
  3746. my_cm = new ContextMenu();
  3747. my_cm.hideBuiltInItems();
  3748. this.menu = my_cm;
  3749. this.contextMenu = my_cm;
  3750. this.tabEnabled = false;
  3751. this.tabChildren = false;
  3752. tools_txt.mouseEnabled = false;
  3753. info_txt.mouseEnabled = false;
  3754. transportControls.menutext.mouseEnabled = false;
  3755. transportControls.exittext.mouseEnabled = false;
  3756. InfoBttn.addEventListener(MouseEvent.CLICK, info);
  3757. ToolsBttn.addEventListener(MouseEvent.CLICK, tools);
  3758. powertext.mouseEnabled = false;
  3759. powertext.autoSize = "center";
  3760. compline1text.text = "";
  3761. compline2text.text = "";
  3762. txts = new Array();
  3763. if (((!((HelpBttn.visible == false))) || (!((help_txt.visible == false))))){
  3764. msgTimer = new Timer(750);
  3765. msgTimer.addEventListener(TimerEvent.TIMER, flashMsg);
  3766. };
  3767. volTimer = new Timer(3000);
  3768. volTimer.addEventListener(TimerEvent.TIMER, hideVolumeBar);
  3769. extCmd = undefined;
  3770. currentIndex = 0;
  3771. currentExtIndex = 0;
  3772. transportControls.leftgf.mouseEnabled = false;
  3773. transportControls.lefttext.mouseEnabled = false;
  3774. transportControls.upgf.mouseEnabled = false;
  3775. transportControls.uptext.mouseEnabled = false;
  3776. transportControls.rightgf.mouseEnabled = false;
  3777. transportControls.righttext.mouseEnabled = false;
  3778. transportControls.downgfx.mouseEnabled = false;
  3779. transportControls.downtext.mouseEnabled = false;
  3780. projconfig = new DLPConfig();
  3781. projconfig.addEventListener(Event.COMPLETE, configLoaded);
  3782. loadingMC.gotoAndStop(12);
  3783. projconfig.Load();
  3784. txti = 1;
  3785. while (txti < 6) {
  3786. SetSourceText("", txti);
  3787. SourceList[(("source" + txti) + "text")].mouseEnabled = false;
  3788. txti++;
  3789. };
  3790. exti = 1;
  3791. while (exti < 5) {
  3792. SetExtText("", exti);
  3793. Extensions[(("extended" + exti) + "text")].mouseEnabled = false;
  3794. Extensions[(("extended" + exti) + "text")].autoSize = "center";
  3795. exti++;
  3796. };
  3797. cnx = new CNXConnection();
  3798. digitals = new Array();
  3799. analogs = new Array();
  3800. serials = new Array();
  3801. InfoMC.lcl_serials = serials;
  3802. InfoMC.lcl_digitals = digitals;
  3803. ToolsMC.lcl_serials = serials;
  3804. ToolsMC.lcl_digitals = digitals;
  3805. ipaddr = this.loaderInfo.url.substr(0, this.loaderInfo.url.lastIndexOf("/"));
  3806. ipaddr = ipaddr.substr((ipaddr.indexOf("//") + 2), ipaddr.length);
  3807. ipid = "03";
  3808. cnx.addEventListener(CNXConnection.DIGITAL, onDigital);
  3809. cnx.addEventListener(CNXConnection.ANALOG, onAnalog);
  3810. cnx.addEventListener(CNXConnection.SERIAL, onSerial);
  3811. cnx.addEventListener(CNXConnection.CONNECT, onConnect);
  3812. cnx.addEventListener(IOErrorEvent.IO_ERROR, onDisconnect);
  3813. cnx.addEventListener(Event.CLOSE, onDisconnect);
  3814. cnx.addEventListener(CNXConnection.DISCONNECT, onDisconnect);
  3815. conTimer = new Timer(15000);
  3816. conTimer.addEventListener(TimerEvent.TIMER, conxError);
  3817. bDisableRetry = false;
  3818. RestartDeviceTimer = new Timer(30000, 1);
  3819. RestartDeviceTimer.addEventListener(TimerEvent.TIMER, RestartDevice);
  3820. retryConTimer = new Timer(5000, 1);
  3821. retryConTimer.addEventListener(TimerEvent.TIMER, retryCon);
  3822. loginLevel = LOGIN_NONE;
  3823. logOut(null);
  3824. emergencyType = "";
  3825. disabledAnalog = 0;
  3826. }
  3827. public function ipInfoChanged(_arg1:String){
  3828. logOut(null);
  3829. if (_arg1.length == 0){
  3830. ipaddr = "";
  3831. bDisableRetry = true;
  3832. loadingMC.setText(projconfig.dhcp_msg);
  3833. } else {
  3834. ipaddr = _arg1;
  3835. loadingMC.setText(projconfig.staticmsg);
  3836. bDisableRetry = true;
  3837. RestartDeviceTimer.delay = (projconfig.restart_time * 1000);
  3838. RestartDeviceTimer.start();
  3839. };
  3840. }
  3841. public function showToolsPage(_arg1:Boolean){
  3842. if (_arg1){
  3843. coverup.visible = false;
  3844. coverup2.visible = false;
  3845. if (ToolsMC.currentFrame == 1){
  3846. ToolsMC.gotoAndPlay(2);
  3847. };
  3848. } else {
  3849. coverup.visible = !(getPowerState());
  3850. coverup2.visible = !(getPowerState());
  3851. if (ToolsMC.currentFrame == 2){
  3852. ToolsMC.gotoAndPlay(1);
  3853. };
  3854. };
  3855. }
  3856. public function conxError(_arg1:Event){
  3857. loadingMC.setText("Connection error");
  3858. conTimer.stop();
  3859. }
  3860. public function editsource(_arg1:Event){
  3861. var _local2:*;
  3862. var _local3:int;
  3863. _local2 = parseInt(_arg1.target.name.replace("edit", ""));
  3864. _local3 = 1;
  3865. while (_local3 < 6) {
  3866. SourceList[(("source" + _local3) + "text")].mouseEnabled = ((_local2 == _local3)) ? true : false;
  3867. if (SourceList[(("source" + _local3) + "text")].mouseEnabled == true){
  3868. stage.focus = SourceList[(("source" + _local3) + "text")];
  3869. SourceList[(("source" + _local3) + "text")].setSelection(0, SourceList[(("source" + _local3) + "text")].text.length);
  3870. };
  3871. _local3++;
  3872. };
  3873. }
  3874. public function info(_arg1:MouseEvent):void{
  3875. if (false == loggedIn){
  3876. return;
  3877. };
  3878. if (true == inEmergency()){
  3879. return;
  3880. };
  3881. showToolsPage(false);
  3882. showInfoPage(true);
  3883. }
  3884. public function getPowerState():Boolean{
  3885. var _local1:StandardCommand;
  3886. _local1 = projconfig.GetStandardCommand(StandardCommand.CMD_POWER_ON);
  3887. if (_local1 != undefined){
  3888. return (digitals[_local1.join]);
  3889. };
  3890. return (false);
  3891. }
  3892. public function showInfoPage(_arg1:Boolean){
  3893. if (_arg1){
  3894. coverup.visible = false;
  3895. coverup2.visible = false;
  3896. if (InfoMC.currentFrame == 1){
  3897. InfoMC.gotoAndPlay(2);
  3898. };
  3899. } else {
  3900. coverup.visible = !(getPowerState());
  3901. coverup2.visible = !(getPowerState());
  3902. if (InfoMC.currentFrame == 2){
  3903. InfoMC.gotoAndPlay(1);
  3904. };
  3905. };
  3906. }
  3907. public function extendedClicked(_arg1:uint){
  3908. var _local2:uint;
  3909. var _local3:uint;
  3910. if (projconfig.extendedcommands[(currentExtIndex + _arg1)] != undefined){
  3911. this.gaugePopUp.gotoAndStop(0);
  3912. this.ZoomPopUp.gotoAndStop(0);
  3913. extCmd = projconfig.extendedcommands[(currentExtIndex + _arg1)];
  3914. switch (extCmd.cmdtype){
  3915. case ExtendedCommand.CMD_EXT_MOMENTARY:
  3916. cnx.SendDigital(extCmd.cmdjoin[ExtendedCommand.JOIN_MOMENTARY], 1);
  3917. cnx.SendDigital(extCmd.cmdjoin[ExtendedCommand.JOIN_MOMENTARY], 0);
  3918. break;
  3919. case ExtendedCommand.CMD_EXT_TOGGLE:
  3920. _local2 = 0;
  3921. if (undefined != digitals[extCmd.getFeedbackJoin(ExtendedCommand.JOIN_FBACK_DIGITAL)]){
  3922. _local2 = digitals[extCmd.getFeedbackJoin(ExtendedCommand.JOIN_FBACK_DIGITAL)];
  3923. };
  3924. _local3 = extCmd.cmdjoin[ExtendedCommand.JOIN_STATE_0];
  3925. if (_local2 == 1){
  3926. _local3 = extCmd.cmdjoin[ExtendedCommand.JOIN_STATE_1];
  3927. };
  3928. cnx.SendDigital(_local3, 1);
  3929. cnx.SendDigital(_local3, 0);
  3930. break;
  3931. case ExtendedCommand.CMD_EXT_RAMP:
  3932. this.gaugePopUp.gotoAndPlay("open");
  3933. break;
  3934. case ExtendedCommand.CMD_EXT_ZOOM:
  3935. this.ZoomPopUp.gotoAndPlay("open");
  3936. break;
  3937. };
  3938. };
  3939. }
  3940. public function onSerial(_arg1:SerialEvent){
  3941. var _local2:StandardCommand;
  3942. serials[_arg1.Join] = _arg1.Value;
  3943. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_HELP_MSG);
  3944. if (((!((_local2 == undefined))) && ((_local2.join == _arg1.Join)))){
  3945. if (_arg1.Value.length < 1){
  3946. return;
  3947. };
  3948. HelpDesk.setMsg(_arg1.Value);
  3949. if (HelpDesk.currentFrame == 1){
  3950. if (false == loggedIn){
  3951. return;
  3952. };
  3953. msgTimer.start();
  3954. };
  3955. };
  3956. if (_arg1.Join == 22){
  3957. EmergencyMC.setMsg(_arg1.Value);
  3958. };
  3959. if ((((_arg1.Join > 5069)) && ((_arg1.Join < 5085)))){
  3960. if (_arg1.Value.length > 0){
  3961. projconfig.AddSource(_arg1.Value, (_arg1.Join - 5070), _arg1.Join);
  3962. ScrollSourceList(currentIndex);
  3963. };
  3964. };
  3965. InfoMC.onSerial(_arg1);
  3966. }
  3967. public function link2Out(_arg1:Event){
  3968. expansion.transform.colorTransform = new Color();
  3969. }
  3970. public function linkControls(){
  3971. var _local1:StandardCommand;
  3972. powerbtn.btn.addEventListener(MouseEvent.CLICK, powerClick);
  3973. setStandardCommandText(powertext, projconfig.GetStandardCommand(StandardCommand.CMD_POWER_ON));
  3974. SourceList.ScrollUP.addEventListener(MouseEvent.CLICK, scrollSources);
  3975. SourceList.ScrollDOWN.addEventListener(MouseEvent.CLICK, scrollSources);
  3976. Extensions.Left_bttn.addEventListener(MouseEvent.CLICK, scrollExt);
  3977. Extensions.Right_bttn.addEventListener(MouseEvent.CLICK, scrollExt);
  3978. volupbtn.addEventListener(MouseEvent.MOUSE_DOWN, volup_start);
  3979. volupbtn.addEventListener(MouseEvent.MOUSE_UP, volup_end);
  3980. setStandardCommandText(voluptext, projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_UP));
  3981. mutebtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3982. setStandardCommandText(mutetext, projconfig.GetStandardCommand(StandardCommand.CMD_MUTE));
  3983. voldownbtn.addEventListener(MouseEvent.MOUSE_DOWN, voldown_start);
  3984. voldownbtn.addEventListener(MouseEvent.MOUSE_UP, voldown_end);
  3985. setStandardCommandText(voldowntext, projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_DOWN));
  3986. transportControls.menubtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3987. setStandardCommandText(transportControls.menutext, projconfig.GetStandardCommand(StandardCommand.CMD_MENU));
  3988. transportControls.leftbtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3989. transportControls.rightbtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3990. transportControls.upbtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3991. transportControls.downbtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3992. transportControls.okbtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3993. setStandardCommandText(transportControls.oktext, projconfig.GetStandardCommand(StandardCommand.CMD_MENU_ENTER));
  3994. transportControls.exitbtn.addEventListener(MouseEvent.CLICK, sendJoinClick);
  3995. setStandardCommandText(transportControls.exittext, projconfig.GetStandardCommand(StandardCommand.CMD_MENU_EXIT));
  3996. HelpBttn.addEventListener(MouseEvent.CLICK, showHelpDesk);
  3997. Extensions.extended1.addEventListener(MouseEvent.CLICK, extendedXClicked);
  3998. Extensions.extended2.addEventListener(MouseEvent.CLICK, extendedXClicked);
  3999. Extensions.extended3.addEventListener(MouseEvent.CLICK, extendedXClicked);
  4000. Extensions.extended4.addEventListener(MouseEvent.CLICK, extendedXClicked);
  4001. SourceList.edit1.addEventListener(MouseEvent.CLICK, editsource);
  4002. SourceList.edit2.addEventListener(MouseEvent.CLICK, editsource);
  4003. SourceList.edit3.addEventListener(MouseEvent.CLICK, editsource);
  4004. SourceList.edit4.addEventListener(MouseEvent.CLICK, editsource);
  4005. SourceList.edit5.addEventListener(MouseEvent.CLICK, editsource);
  4006. SourceList.reset1.addEventListener(MouseEvent.CLICK, resetsource);
  4007. SourceList.reset2.addEventListener(MouseEvent.CLICK, resetsource);
  4008. SourceList.reset3.addEventListener(MouseEvent.CLICK, resetsource);
  4009. SourceList.reset4.addEventListener(MouseEvent.CLICK, resetsource);
  4010. SourceList.reset5.addEventListener(MouseEvent.CLICK, resetsource);
  4011. SourceList.hide1.addEventListener(MouseEvent.CLICK, hidesource);
  4012. SourceList.hide2.addEventListener(MouseEvent.CLICK, hidesource);
  4013. SourceList.hide3.addEventListener(MouseEvent.CLICK, hidesource);
  4014. SourceList.hide4.addEventListener(MouseEvent.CLICK, hidesource);
  4015. SourceList.hide5.addEventListener(MouseEvent.CLICK, hidesource);
  4016. SourceList.source1text.addEventListener(KeyboardEvent.KEY_DOWN, finishsourceedit);
  4017. SourceList.source2text.addEventListener(KeyboardEvent.KEY_DOWN, finishsourceedit);
  4018. SourceList.source3text.addEventListener(KeyboardEvent.KEY_DOWN, finishsourceedit);
  4019. SourceList.source4text.addEventListener(KeyboardEvent.KEY_DOWN, finishsourceedit);
  4020. SourceList.source5text.addEventListener(KeyboardEvent.KEY_DOWN, finishsourceedit);
  4021. SourceList.source1text.addEventListener(FocusEvent.FOCUS_OUT, editlostfocus);
  4022. SourceList.source2text.addEventListener(FocusEvent.FOCUS_OUT, editlostfocus);
  4023. SourceList.source3text.addEventListener(FocusEvent.FOCUS_OUT, editlostfocus);
  4024. SourceList.source4text.addEventListener(FocusEvent.FOCUS_OUT, editlostfocus);
  4025. SourceList.source5text.addEventListener(FocusEvent.FOCUS_OUT, editlostfocus);
  4026. SourceList.source1.addEventListener(MouseEvent.CLICK, source1Clicked);
  4027. SourceList.source2.addEventListener(MouseEvent.CLICK, source2Clicked);
  4028. SourceList.source3.addEventListener(MouseEvent.CLICK, source3Clicked);
  4029. SourceList.source4.addEventListener(MouseEvent.CLICK, source4Clicked);
  4030. SourceList.source5.addEventListener(MouseEvent.CLICK, source5Clicked);
  4031. setStandardCommandText(help_txt, projconfig.GetStandardCommand(StandardCommand.CMD_JUMP_TO_HELP));
  4032. setStandardCommandText(info_txt, projconfig.GetStandardCommand(StandardCommand.CMD_JUMP_TO_INFO));
  4033. setStandardCommandText(tools_txt, projconfig.GetStandardCommand(StandardCommand.CMD_JUMP_TO_TOOLS));
  4034. btnLogout.addEventListener(MouseEvent.CLICK, blogOut);
  4035. }
  4036. public function showAdminPasswordPrompt(){
  4037. AdminrMC.pwordType = 2;
  4038. AdminrMC.gotoAndStop(2);
  4039. }
  4040. public function source2Clicked(_arg1:Event){
  4041. sourceClicked(2);
  4042. }
  4043. public function ScrollExtList(_arg1:uint, _arg2:Boolean=true){
  4044. var _local3:uint;
  4045. var _local4:uint;
  4046. var _local5:*;
  4047. var _local6:*;
  4048. if (_arg1 < 0){
  4049. return;
  4050. };
  4051. if (_arg1 >= (projconfig.extendedcommands.length - 1)){
  4052. return;
  4053. };
  4054. if (_arg2 == true){
  4055. this.gaugePopUp.gotoAndStop(0);
  4056. this.ZoomPopUp.gotoAndStop(0);
  4057. };
  4058. _local3 = getActiveSource();
  4059. currentExtIndex = _arg1;
  4060. _local4 = 1;
  4061. while (_local4 < 5) {
  4062. if (projconfig.extendedcommands[(currentExtIndex + _local4)] != undefined){
  4063. SetExtText(projconfig.extendedcommands[(currentExtIndex + _local4)].cmdname, _local4);
  4064. if (disabledByJoin((currentExtIndex + _local4))){
  4065. SetExtObjectDisabled(_local4, true);
  4066. } else {
  4067. SetExtObjectDisabled(_local4, false);
  4068. Extensions[("extended" + _local4)].enabled = true;
  4069. _local5 = projconfig.extendedcommands[(currentExtIndex + _local4)].cmdfback[ExtendedCommand.JOIN_FBACK_DIGITAL];
  4070. _local6 = digitals[_local5];
  4071. if (digitals[projconfig.extendedcommands[(currentExtIndex + _local4)].cmdfback[ExtendedCommand.JOIN_FBACK_DIGITAL]] == 1){
  4072. SetObjectHighlight(Extensions[("extended" + _local4)], projconfig.ui_color);
  4073. } else {
  4074. ClearObjectHighlight(Extensions[("extended" + _local4)]);
  4075. };
  4076. };
  4077. } else {
  4078. SetExtObjectDisabled(_local4, false);
  4079. Extensions[("extended" + _local4)].enabled = false;
  4080. SetExtText("", _local4);
  4081. ClearObjectHighlight(Extensions[("extended" + _local4)]);
  4082. };
  4083. _local4++;
  4084. };
  4085. if (_arg1 > 0){
  4086. Extensions.Left_bttn.enabled = true;
  4087. SetObjectHighlight(Extensions.Left_bttn, projconfig.ui_color);
  4088. } else {
  4089. Extensions.Left_bttn.enabled = false;
  4090. ClearObjectHighlight(Extensions.Left_bttn);
  4091. };
  4092. if (projconfig.extendedcommands.length > (_arg1 + 5)){
  4093. Extensions.Right_bttn.enabled = true;
  4094. SetObjectHighlight(Extensions.Right_bttn, projconfig.ui_color);
  4095. } else {
  4096. Extensions.Right_bttn.enabled = false;
  4097. ClearObjectHighlight(Extensions.Right_bttn);
  4098. };
  4099. }
  4100. public function link1Clicked(_arg1:Event){
  4101. var url:* = null;
  4102. var request:* = null;
  4103. var e:* = _arg1;
  4104. url = projconfig.link1;
  4105. request = new URLRequest(url);
  4106. try {
  4107. navigateToURL(request, "_blank");
  4108. } catch(e:Error) {
  4109. };
  4110. }
  4111. public function pulseCmd(_arg1:StandardCommand){
  4112. cnx.SendDigital(_arg1.join, 1);
  4113. cnx.SendDigital(_arg1.join, 0);
  4114. }
  4115. public function extendedXClicked(_arg1:Event){
  4116. var _local2:uint;
  4117. _local2 = parseInt(_arg1.target.name.substr((_arg1.target.name.length - 1), 1));
  4118. extendedClicked(_local2);
  4119. }
  4120. public function setupMenuExt(_arg1:Object, _arg2:Object, _arg3:uint){
  4121. var _local4:StandardCommand;
  4122. _local4 = projconfig.GetStandardCommand(_arg3);
  4123. if (((!((_local4 == undefined))) && ((_local4.lbl.length > 0)))){
  4124. ThemeButtonObject(_arg1, projconfig.ui_color);
  4125. _arg2.text = _local4.lbl;
  4126. _arg2.autoSize = "center";
  4127. _arg2.mouseEnabled = false;
  4128. };
  4129. }
  4130. public function menuExtXclicked(_arg1:Event){
  4131. var _local2:uint;
  4132. var _local3:StandardCommand;
  4133. var _local4:StandardCommand;
  4134. _local2 = (parseInt(_arg1.currentTarget.name.substr((_arg1.currentTarget.name.length - 1), 1)) - 1);
  4135. _local3 = projconfig.GetStandardCommand((StandardCommand.CMD_KEYPAD_EXT1 + _local2));
  4136. _local4 = projconfig.GetStandardCommand((StandardCommand.CMD_KEYPAD_EXT1_T + _local2));
  4137. if (((!((_local3 == undefined))) && (!((_local4 == undefined))))){
  4138. if (digitals[_local3.join] == 1){
  4139. pulseCmd(_local4);
  4140. } else {
  4141. pulseCmd(_local3);
  4142. };
  4143. } else {
  4144. if (_local3 != undefined){
  4145. pulseCmd(_local3);
  4146. };
  4147. };
  4148. }
  4149. public function RestartDevice(_arg1:Event){
  4150. bDisableRetry = false;
  4151. if (((!((cnx == undefined))) && (!((cnx == null))))){
  4152. cnx.cnxDisconnect();
  4153. };
  4154. cnx = new CNXConnection();
  4155. cnx.addEventListener(CNXConnection.DIGITAL, onDigital);
  4156. cnx.addEventListener(CNXConnection.ANALOG, onAnalog);
  4157. cnx.addEventListener(CNXConnection.SERIAL, onSerial);
  4158. cnx.addEventListener(CNXConnection.CONNECT, onConnect);
  4159. cnx.addEventListener(IOErrorEvent.IO_ERROR, onDisconnect);
  4160. cnx.addEventListener(Event.CLOSE, onDisconnect);
  4161. cnx.addEventListener(CNXConnection.DISCONNECT, onDisconnect);
  4162. cnx.cnxConnect(ipaddr, ipid, 41794, 9);
  4163. }
  4164. public function setEmergencyType(){
  4165. EmergencyMC.setEmergencyType(emergencyType);
  4166. }
  4167. public function SetExtObjectDisabled(_arg1:uint, _arg2:Boolean){
  4168. var _local3:Object;
  4169. var _local4:Object;
  4170. var _local5:Color;
  4171. _local3 = Extensions[("extended" + _arg1)];
  4172. _local4 = Extensions[(("extended" + _arg1) + "text")];
  4173. if (true == _arg2){
  4174. _local3.enabled = false;
  4175. _local3.mouseEnabled = false;
  4176. ClearObjectHighlight(_local3);
  4177. _local5 = new Color();
  4178. _local5.setTint(0xC0C0C0, 0.3);
  4179. _local3.downState.transform.colorTransform = _local5;
  4180. _local3.upState.transform.colorTransform = _local5;
  4181. _local3.overState.transform.colorTransform = _local5;
  4182. _local4.textColor = 0xA0A0A0;
  4183. } else {
  4184. _local3.mouseEnabled = true;
  4185. ThemeButtonObject(_local3, projconfig.ui_color);
  4186. _local4.textColor = 0xE5E5E5;
  4187. };
  4188. }
  4189. public function onDigital(_arg1:DigitalEvent){
  4190. var _local2:uint;
  4191. var _local3:Boolean;
  4192. var _local4:StandardCommand;
  4193. _local2 = getActiveSource();
  4194. digitals[_arg1.Join] = _arg1.Value;
  4195. _local3 = false;
  4196. if (getActiveSource() != _local2){
  4197. _local3 = true;
  4198. };
  4199. if (2 == AdminrMC.currentFrame){
  4200. AdminrMC.onDigital(_arg1);
  4201. };
  4202. if ((((_arg1.Join == DIG_PROMPT_PASSWORD)) && (_arg1.Value))){
  4203. loadingMC.gotoAndStop(1);
  4204. conTimer.stop();
  4205. logOut(null);
  4206. return;
  4207. };
  4208. if (_arg1.Join == 5213){
  4209. loadingMC.gotoAndStop(1);
  4210. conTimer.stop();
  4211. logOut(null);
  4212. };
  4213. if ((((((((_arg1.Join == 5217)) || ((_arg1.Join == 5216)))) || ((_arg1.Join == 5213)))) || ((_arg1.Join == 5212)))){
  4214. logOut(null);
  4215. };
  4216. if ((((_arg1.Join == DIG_USR_PWD_CORRECT)) && (_arg1.Value))){
  4217. if (AdminrMC.WaitingForUserPassword()){
  4218. logIn(null, LOGIN_USER);
  4219. };
  4220. return;
  4221. };
  4222. if ((((_arg1.Join == DIG_ADM_PWD_CORRECT)) && (_arg1.Value))){
  4223. if (AdminrMC.WaitingForAdminPassword()){
  4224. logIn(null, LOGIN_ADMIN);
  4225. showInfoPage(false);
  4226. showToolsPage(true);
  4227. } else {
  4228. if (AdminrMC.WaitingForUserPassword()){
  4229. logIn(null, LOGIN_ADMIN);
  4230. };
  4231. };
  4232. };
  4233. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_WARMING_UP);
  4234. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4235. if (_arg1.Value == true){
  4236. warmingPopup.showwarming(true);
  4237. } else {
  4238. warmingPopup.closewarming();
  4239. };
  4240. };
  4241. if (_arg1.Join == 5161){
  4242. if (_arg1.Value == true){
  4243. warmingPopup.showwarming(false);
  4244. } else {
  4245. warmingPopup.closewarming();
  4246. };
  4247. };
  4248. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_POWER_ON);
  4249. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4250. showPower(_arg1.Value);
  4251. };
  4252. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_MUTE);
  4253. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4254. if (_arg1.Value){
  4255. SetObjectHighlight(mutebtn, projconfig.ui_color);
  4256. } else {
  4257. ClearObjectHighlight(mutebtn);
  4258. };
  4259. };
  4260. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_KEYPAD_EXT1);
  4261. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4262. if (_arg1.Value){
  4263. SetObjectHighlight(transportControls.btnExt1, projconfig.ui_color);
  4264. } else {
  4265. ClearObjectHighlight(transportControls.btnExt1);
  4266. };
  4267. };
  4268. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_KEYPAD_EXT2);
  4269. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4270. if (_arg1.Value){
  4271. SetObjectHighlight(transportControls.btnExt2, projconfig.ui_color);
  4272. } else {
  4273. ClearObjectHighlight(transportControls.btnExt2);
  4274. };
  4275. };
  4276. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_KEYPAD_EXT3);
  4277. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4278. if (_arg1.Value){
  4279. SetObjectHighlight(transportControls.btnExt3, projconfig.ui_color);
  4280. } else {
  4281. ClearObjectHighlight(transportControls.btnExt3);
  4282. };
  4283. };
  4284. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_KEYPAD_EXT4);
  4285. if (((!((_local4 == undefined))) && ((_local4.join == _arg1.Join)))){
  4286. if (_arg1.Value){
  4287. SetObjectHighlight(transportControls.btnExt4, projconfig.ui_color);
  4288. } else {
  4289. ClearObjectHighlight(transportControls.btnExt4);
  4290. };
  4291. };
  4292. ScrollSourceList(currentIndex);
  4293. ScrollExtList(currentExtIndex, _local3);
  4294. }
  4295. public function getActiveSource():uint{
  4296. var _local1:*;
  4297. for (_local1 in projconfig.sources) {
  4298. if (digitals[projconfig.sources[_local1].join] == 1){
  4299. return (projconfig.sources[_local1].index);
  4300. };
  4301. };
  4302. return (0);
  4303. }
  4304. public function loadedLogo(_arg1:Event){
  4305. hdrLoader.addChild(ldr);
  4306. compline1text.text = "";
  4307. compline2text.text = "";
  4308. }
  4309. public function ThemeObjects(_arg1:Array, _arg2:uint){
  4310. var _local3:Color;
  4311. var _local4:*;
  4312. _local3 = new Color();
  4313. _local3.setTint(_arg2, 0.5);
  4314. for each (_local4 in _arg1) {
  4315. _local4.transform.colorTransform = _local3;
  4316. };
  4317. }
  4318. public function ThemeButtonObject(_arg1:Object, _arg2:uint){
  4319. var _local3:Color;
  4320. var _local4:GlowFilter;
  4321. if (_arg1.downState == undefined){
  4322. ThemeButtonObject(_arg1.btn, _arg2);
  4323. return;
  4324. };
  4325. _local3 = new Color();
  4326. _local3.setTint(_arg2, 0.5);
  4327. _arg1.downState.transform.colorTransform = _local3;
  4328. _arg1.upState.transform.colorTransform = new Color();
  4329. _arg1.overState.transform.colorTransform = new Color();
  4330. _local4 = new GlowFilter(_arg2, 1, 2, 50, 2, 1, true);
  4331. _arg1.overState.filters = [_local4];
  4332. }
  4333. public function source5Clicked(_arg1:Event){
  4334. sourceClicked(5);
  4335. }
  4336. public function SetButtonText(_arg1:String, _arg2:uint){
  4337. if (txts[_arg2] == undefined){
  4338. txts[_arg2] = new Array();
  4339. txts[_arg2][1] = new TextField();
  4340. txts[_arg2][1].autoSize = "center";
  4341. txts[_arg2][1].width = 440;
  4342. txts[_arg2][1].height = 41;
  4343. txts[_arg2][1].y = 0;
  4344. txts[_arg2][1].x = 0;
  4345. txts[_arg2][1].y = this.SourceList.source1.y;
  4346. txts[_arg2][1].x = this.SourceList.source1.x;
  4347. txts[_arg2][1].mouseEnabled = false;
  4348. this.SourceList[(_SRC + _arg2)].overState.addChild(txts[_arg2][1]);
  4349. };
  4350. txts[_arg2][1].text = _arg1;
  4351. }
  4352. public function IsObjectHighlighted(_arg1:Object):Boolean{
  4353. if (_arg1.overState.filters.length > 1){
  4354. return (true);
  4355. };
  4356. return (false);
  4357. }
  4358. public function SetupTheme(_arg1:uint){
  4359. var _local2:Array;
  4360. _local2 = new Array();
  4361. _local2.push(SourceList.source1);
  4362. _local2.push(SourceList.source2);
  4363. _local2.push(SourceList.source3);
  4364. _local2.push(SourceList.source4);
  4365. _local2.push(SourceList.source5);
  4366. _local2.push(transportControls.menubtn);
  4367. _local2.push(transportControls.upbtn);
  4368. _local2.push(transportControls.leftbtn);
  4369. _local2.push(transportControls.okbtn);
  4370. _local2.push(transportControls.rightbtn);
  4371. _local2.push(transportControls.downbtn);
  4372. _local2.push(transportControls.exitbtn);
  4373. _local2.push(Extensions.Left_bttn);
  4374. _local2.push(Extensions.Right_bttn);
  4375. _local2.push(Extensions.extended1);
  4376. _local2.push(Extensions.extended2);
  4377. _local2.push(Extensions.extended3);
  4378. _local2.push(Extensions.extended4);
  4379. _local2.push(powerbtn);
  4380. _local2.push(voldownbtn);
  4381. _local2.push(mutebtn);
  4382. _local2.push(volupbtn);
  4383. _local2.push(HelpBttn);
  4384. _local2.push(InfoBttn);
  4385. _local2.push(ToolsBttn);
  4386. _local2.push(btnLogout);
  4387. help_txt.mouseEnabled = false;
  4388. help_txt.autoSize = "center";
  4389. ThemeButtonObjects(_local2, _arg1);
  4390. _local2.length = 0;
  4391. _local2.push(headerBar);
  4392. _local2.push(volumeMC);
  4393. ThemeObjects(_local2, _arg1);
  4394. }
  4395. public function hideVolumeBar(_arg1:Event){
  4396. volTimer.stop();
  4397. volumeMC.gotoAndStop(0);
  4398. }
  4399. public function finishsourceedit(_arg1:KeyboardEvent){
  4400. var _local2:*;
  4401. var _local3:*;
  4402. var _local4:DLPSource;
  4403. var _local5:*;
  4404. _local2 = _arg1.target.name.replace("source", "");
  4405. _local3 = parseInt(_local2.replace("text", ""));
  4406. _local4 = projconfig.getSourceAt(((currentIndex + _local3) - 1));
  4407. if (_local4 == undefined){
  4408. return;
  4409. };
  4410. if (_arg1.keyCode == 13){
  4411. SourceList[(("source" + _local3) + "text")].mouseEnabled = false;
  4412. _local5 = _local4.join;
  4413. cnx.SendSerial(_local5, SourceList[(("source" + _local3) + "text")].text);
  4414. stage.focus = null;
  4415. ScrollSourceList(currentIndex);
  4416. };
  4417. if (_arg1.keyCode == 27){
  4418. SourceList[(("source" + _local3) + "text")].mouseEnabled = false;
  4419. stage.focus = null;
  4420. ScrollSourceList(currentIndex);
  4421. };
  4422. }
  4423. public function powerClick(_arg1:MouseEvent){
  4424. var _local2:StandardCommand;
  4425. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_POWER_ON);
  4426. if (_local2 != undefined){
  4427. if (digitals[_local2.join] != 1){
  4428. powerOn();
  4429. } else {
  4430. powerOff();
  4431. };
  4432. };
  4433. }
  4434. public function flashMsg(_arg1:Event){
  4435. help_txt.visible = !(help_txt.visible);
  4436. }
  4437. public function source3Clicked(_arg1:Event){
  4438. sourceClicked(3);
  4439. }
  4440. public function logIn(_arg1:Event, _arg2:int){
  4441. var _local3:int;
  4442. loggedIn = true;
  4443. if (_arg2 > loginLevel){
  4444. loginLevel = _arg2;
  4445. };
  4446. _local3 = LOGIN_ADMIN;
  4447. if (digitals[5217] == true){
  4448. _local3 = LOGIN_USER;
  4449. };
  4450. if ((((digitals[5213] == true)) && ((digitals[5217] == true)))){
  4451. _local3 = LOGIN_NONE;
  4452. };
  4453. ScrollSourceList(currentIndex);
  4454. if ((((digitals[5213] == true)) && ((digitals[5217] == true)))){
  4455. btnLogout.visible = false;
  4456. } else {
  4457. if ((((digitals[5212] == true)) && ((loginLevel >= LOGIN_USER)))){
  4458. btnLogout.visible = true;
  4459. } else {
  4460. if ((((digitals[5216] == true)) && ((loginLevel >= LOGIN_ADMIN)))){
  4461. btnLogout.visible = true;
  4462. } else {
  4463. btnLogout.visible = false;
  4464. };
  4465. };
  4466. };
  4467. btnLogout.mouseEnabled = true;
  4468. HelpBttn.mouseEnabled = true;
  4469. InfoBttn.mouseEnabled = true;
  4470. ToolsBttn.mouseEnabled = true;
  4471. showToolsPage(false);
  4472. showInfoPage(false);
  4473. hidePasswordPrompt();
  4474. }
  4475. public function volup_start(_arg1:Event){
  4476. var _local2:StandardCommand;
  4477. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_UP);
  4478. cnx.SendDigital(_local2.join, 1);
  4479. }
  4480. public function showHelpDesk(_arg1:Event){
  4481. var _local2:Boolean;
  4482. if (false == loggedIn){
  4483. return;
  4484. };
  4485. _local2 = msgTimer.running;
  4486. msgTimer.stop();
  4487. HelpBttn.visible = true;
  4488. help_txt.visible = true;
  4489. if (HelpDesk.currentFrame == 1){
  4490. this.HelpDesk.gotoAndPlay("open");
  4491. };
  4492. if (true == _local2){
  4493. this.HelpDesk.curmode = 1;
  4494. };
  4495. }
  4496. public function voldown_start(_arg1:Event){
  4497. var _local2:StandardCommand;
  4498. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_DOWN);
  4499. cnx.SendDigital(_local2.join, 1);
  4500. }
  4501. public function link2Clicked(_arg1:Event){
  4502. var url:* = null;
  4503. var request:* = null;
  4504. var e:* = _arg1;
  4505. url = projconfig.link2;
  4506. request = new URLRequest(url);
  4507. try {
  4508. trace(("navigate to " + url));
  4509. navigateToURL(request, "_blank");
  4510. } catch(e:Error) {
  4511. trace("Error occurred!");
  4512. };
  4513. }
  4514. public function voldown_end(_arg1:Event){
  4515. var _local2:StandardCommand;
  4516. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_DOWN);
  4517. cnx.SendDigital(_local2.join, 0);
  4518. }
  4519. public function SetObjectHighlight(_arg1:Object, _arg2:uint){
  4520. var _local3:GlowFilter;
  4521. var _local4:GlowFilter;
  4522. if (_arg1.downState == undefined){
  4523. if (_arg1.btn != undefined){
  4524. SetObjectHighlight(_arg1.btn, _arg2);
  4525. };
  4526. return;
  4527. };
  4528. _local3 = new GlowFilter(_arg2, 1, hightlight_x_size, hightlight_y_size, 3, 2, false);
  4529. _arg1.downState.filters = [_local3];
  4530. _local3 = new GlowFilter(_arg2, 1, (hightlight_x_size * 4), (hightlight_y_size * 4), 1, 50, true);
  4531. _local4 = new GlowFilter(_arg2, 1, 15, 5, 2, 1, true);
  4532. _arg1.overState.filters = [_local3, _local4];
  4533. _local3 = new GlowFilter(_arg2, 1, (hightlight_x_size * 3), (hightlight_y_size * 3), 1, 50, true);
  4534. _arg1.upState.filters = [_local3];
  4535. }
  4536. public function ClearEmergencyMode(){
  4537. if (EmergencyMC.currentFrame != 2){
  4538. return;
  4539. };
  4540. EmergencyMC.gotoAndPlay(1);
  4541. logOut(null);
  4542. }
  4543. public function onAnalog(_arg1:AnalogEvent){
  4544. var _local2:StandardCommand;
  4545. var _local3:uint;
  4546. analogs[_arg1.Join] = _arg1.Value;
  4547. if (_arg1.Join == 5013){
  4548. disabledAnalog = _arg1.Value;
  4549. ScrollExtList(currentExtIndex, true);
  4550. };
  4551. if (_arg1.Join == 22){
  4552. switch (_arg1.Value){
  4553. case 0:
  4554. emergencyType = "";
  4555. break;
  4556. case 1:
  4557. emergencyType = "General";
  4558. break;
  4559. case 2:
  4560. emergencyType = "Building";
  4561. break;
  4562. case 3:
  4563. emergencyType = "Environmental";
  4564. break;
  4565. case 4:
  4566. emergencyType = "Fire";
  4567. break;
  4568. case 5:
  4569. emergencyType = "Medical";
  4570. break;
  4571. case 6:
  4572. emergencyType = "Police";
  4573. break;
  4574. case 7:
  4575. emergencyType = "Safety";
  4576. break;
  4577. case 8:
  4578. emergencyType = "Weather";
  4579. break;
  4580. };
  4581. setEmergencyType();
  4582. if (_arg1.Value != 0){
  4583. SetEmergencyMode();
  4584. } else {
  4585. EmergencyMC.setMsg("");
  4586. ClearEmergencyMode();
  4587. };
  4588. return;
  4589. };
  4590. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME);
  4591. if (_local2 != undefined){
  4592. if (_local2.join == _arg1.Join){
  4593. _local3 = ((_arg1.Value / 0xFFFF) * 0xFF);
  4594. showVolumeBar(_local3);
  4595. };
  4596. };
  4597. }
  4598. public function editlostfocus(_arg1:Event){
  4599. var _local2:*;
  4600. var _local3:*;
  4601. _local2 = _arg1.target.name.replace("source", "");
  4602. _local3 = parseInt(_local2.replace("text", ""));
  4603. SourceList[(("source" + _local3) + "text")].mouseEnabled = false;
  4604. ScrollSourceList(currentIndex);
  4605. }
  4606. public function loadLogo(_arg1:String){
  4607. var _local2:URLRequest;
  4608. _local2 = new URLRequest(_arg1);
  4609. ldr = new Loader();
  4610. ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedLogo);
  4611. ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, failed_to_load);
  4612. ldr.load(_local2);
  4613. }
  4614. public function sourceClicked(_arg1:uint){
  4615. var _local2:Boolean;
  4616. var _local3:DLPSource;
  4617. _arg1--;
  4618. _local2 = canEditSources();
  4619. if (_local2){
  4620. _local3 = projconfig.getSourceAt((currentIndex + _arg1));
  4621. } else {
  4622. _local3 = projconfig.getVisibleSourceAt((currentIndex + _arg1));
  4623. };
  4624. if (_local3 != undefined){
  4625. cnx.SendDigital(_local3.join, 1);
  4626. cnx.SendDigital(_local3.join, 0);
  4627. };
  4628. }
  4629. public function disabledByJoin(_arg1:uint):Boolean{
  4630. _arg1--;
  4631. return ((disabledAnalog & Math.pow(2, _arg1)));
  4632. }
  4633. public function retryCon(_arg1:Event){
  4634. cnx = new CNXConnection();
  4635. cnx.addEventListener(CNXConnection.DIGITAL, onDigital);
  4636. cnx.addEventListener(CNXConnection.ANALOG, onAnalog);
  4637. cnx.addEventListener(CNXConnection.SERIAL, onSerial);
  4638. cnx.addEventListener(CNXConnection.CONNECT, onConnect);
  4639. cnx.addEventListener(IOErrorEvent.IO_ERROR, onDisconnect);
  4640. cnx.addEventListener(Event.CLOSE, onDisconnect);
  4641. cnx.addEventListener(CNXConnection.DISCONNECT, onDisconnect);
  4642. cnx.cnxConnect(ipaddr, ipid, 41794, 9);
  4643. }
  4644. public function SetSourceText(_arg1:String, _arg2:uint){
  4645. SourceList[((_SRC + _arg2) + "text")].htmlText = _arg1;
  4646. }
  4647. public function hidePasswordPrompt(){
  4648. AdminrMC.pwordType = 0;
  4649. AdminrMC.gotoAndStop(1);
  4650. }
  4651. public function source1Clicked(_arg1:Event){
  4652. sourceClicked(1);
  4653. }
  4654. public function powerOn(){
  4655. var _local1:StandardCommand;
  4656. _local1 = projconfig.GetStandardCommand(StandardCommand.CMD_POWER_ON);
  4657. if (_local1 != undefined){
  4658. pulseCmd(_local1);
  4659. };
  4660. }
  4661. public function SetEmergencyMode(){
  4662. if (EmergencyMC.currentFrame == 2){
  4663. return;
  4664. };
  4665. logIn(null, LOGIN_USER);
  4666. EmergencyMC.gotoAndPlay(2);
  4667. }
  4668. public function tools(_arg1:MouseEvent):void{
  4669. if (false == loggedIn){
  4670. return;
  4671. };
  4672. if (true == inEmergency()){
  4673. return;
  4674. };
  4675. if ((((digitals[5216] == true)) && (!((loginLevel == LOGIN_ADMIN))))){
  4676. showAdminPasswordPrompt();
  4677. } else {
  4678. showInfoPage(false);
  4679. showToolsPage(true);
  4680. };
  4681. }
  4682. public function ThemeSourceList(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint){
  4683. var _local5:Color;
  4684. var _local6:uint;
  4685. var _local7:GlowFilter;
  4686. _local5 = new Color();
  4687. _local5.setTint(_arg4, 0.5);
  4688. _local6 = 1;
  4689. while (_local6 <= _arg3) {
  4690. _arg1[(_arg2 + _local6)].downState.transform.colorTransform = _local5;
  4691. _local7 = new GlowFilter(_arg4, 1, 15, 5, 2, 1, true);
  4692. _arg1[(_arg2 + _local6)].overState.filters = [_local7];
  4693. _local6++;
  4694. };
  4695. }
  4696. public function hidesource(_arg1:Event){
  4697. var _local2:*;
  4698. var _local3:DLPSource;
  4699. _local2 = parseInt(_arg1.target.name.replace("hide", ""));
  4700. _local3 = projconfig.getSourceAt(((currentIndex + _local2) - 1));
  4701. if (_local3 == undefined){
  4702. return;
  4703. };
  4704. if (_local3.sourceName.substr(0, 1) == " "){
  4705. cnx.SendSerial(_local3.join, _local3.sourceName.substr(1));
  4706. } else {
  4707. cnx.SendSerial(_local3.join, (" " + _local3.sourceName));
  4708. };
  4709. }
  4710. public function sendJoinClick(_arg1:MouseEvent){
  4711. var _local2:*;
  4712. var _local3:StandardCommand;
  4713. var _local4:StandardCommand;
  4714. _local2 = _arg1.target.name;
  4715. if (_local2 == "btn"){
  4716. _local2 = _arg1.target.parent.name;
  4717. };
  4718. switch (_local2){
  4719. case "volupbtn":
  4720. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_UP);
  4721. break;
  4722. case "mutebtn":
  4723. _local4 = projconfig.GetStandardCommand(StandardCommand.CMD_MUTE);
  4724. if (_local4 != undefined){
  4725. if (digitals[_local4.join] != 1){
  4726. _local3 = _local4;
  4727. } else {
  4728. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MUTE_OFF);
  4729. };
  4730. };
  4731. break;
  4732. case "voldownbtn":
  4733. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_DOWN);
  4734. break;
  4735. case "menubtn":
  4736. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU);
  4737. break;
  4738. case "upbtn":
  4739. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU_UP);
  4740. break;
  4741. case "downbtn":
  4742. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU_DOWN);
  4743. break;
  4744. case "leftbtn":
  4745. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU_LEFT);
  4746. break;
  4747. case "rightbtn":
  4748. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU_RIGHT);
  4749. break;
  4750. case "okbtn":
  4751. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU_ENTER);
  4752. break;
  4753. case "exitbtn":
  4754. _local3 = projconfig.GetStandardCommand(StandardCommand.CMD_MENU_EXIT);
  4755. break;
  4756. };
  4757. if (!(((_local3 == undefined)) || ((_local3 == null)))){
  4758. pulseCmd(_local3);
  4759. };
  4760. }
  4761. public function configLoaded(_arg1:Event){
  4762. loadingMC.setText("Configuring...");
  4763. SetupTheme(projconfig.ui_color);
  4764. modeltext.text = projconfig.modelnum;
  4765. modeltext.autoSize = "left";
  4766. modeltext.mouseEnabled = false;
  4767. compline1text.text = projconfig.company_name;
  4768. compline2text.text = projconfig.company_logo;
  4769. transportControls.visible = !(projconfig.ui_hidetransport);
  4770. ScrollSourceList(0);
  4771. ScrollExtList(0);
  4772. linkControls();
  4773. if (projconfig.company_banner.length > 0){
  4774. loadLogo(projconfig.company_banner);
  4775. };
  4776. setupMenuExt(transportControls.btnExt1, transportControls.lblExt1, StandardCommand.CMD_KEYPAD_EXT1);
  4777. transportControls.btnExt1.addEventListener(MouseEvent.CLICK, menuExtXclicked);
  4778. setupMenuExt(transportControls.btnExt2, transportControls.lblExt2, StandardCommand.CMD_KEYPAD_EXT2);
  4779. transportControls.btnExt2.addEventListener(MouseEvent.CLICK, menuExtXclicked);
  4780. setupMenuExt(transportControls.btnExt3, transportControls.lblExt3, StandardCommand.CMD_KEYPAD_EXT3);
  4781. transportControls.btnExt3.addEventListener(MouseEvent.CLICK, menuExtXclicked);
  4782. setupMenuExt(transportControls.btnExt4, transportControls.lblExt4, StandardCommand.CMD_KEYPAD_EXT4);
  4783. transportControls.btnExt4.addEventListener(MouseEvent.CLICK, menuExtXclicked);
  4784. applyUiXml();
  4785. btnRoomView.addEventListener(MouseEvent.CLICK, link1Clicked);
  4786. expansion.addEventListener(MouseEvent.CLICK, link2Clicked);
  4787. expansion.addEventListener(MouseEvent.MOUSE_OVER, link2Over);
  4788. expansion.addEventListener(MouseEvent.MOUSE_OUT, link2Out);
  4789. loadingMC.setText("Connecting...");
  4790. cnx.cnxConnect(ipaddr, ipid, 41794, 9);
  4791. }
  4792. public function logOut(_arg1:Event){
  4793. loginLevel = LOGIN_NONE;
  4794. loggedIn = false;
  4795. currentIndex = 0;
  4796. if ((((digitals[5217] == true)) && ((digitals[5213] == true)))){
  4797. logIn(null, LOGIN_ADMIN);
  4798. return;
  4799. };
  4800. if (digitals[5213] == true){
  4801. logIn(null, LOGIN_USER);
  4802. return;
  4803. };
  4804. btnLogout.mouseEnabled = false;
  4805. HelpBttn.mouseEnabled = false;
  4806. InfoBttn.mouseEnabled = false;
  4807. ToolsBttn.mouseEnabled = false;
  4808. if (HelpDesk.currentFrame > 1){
  4809. HelpDesk.gotoAndPlay("close");
  4810. };
  4811. showToolsPage(false);
  4812. showInfoPage(false);
  4813. showUserPasswordPrompt();
  4814. }
  4815. public function onDisconnect(_arg1:Event){
  4816. if (true == bDisableRetry){
  4817. return;
  4818. };
  4819. loadingMC.setText("Retrying...");
  4820. retryConTimer.reset();
  4821. retryConTimer.start();
  4822. }
  4823. public function volup_end(_arg1:Event){
  4824. var _local2:StandardCommand;
  4825. _local2 = projconfig.GetStandardCommand(StandardCommand.CMD_VOLUME_UP);
  4826. cnx.SendDigital(_local2.join, 0);
  4827. }
  4828.  
  4829. }
  4830. }//package Crestron_fla
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement