FlashHelper.as 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. package com.imt.intimamedia.helpers
  2. {
  3. import com.imt.intimamedia.model.ApplicationModelLocator;
  4. import com.imt.intimamedia.views.physician.acquire.AcquireView;
  5. import com.imt.intimamedia.vo.DragAndDropVo;
  6. import flash.display.Bitmap;
  7. import flash.display.BitmapData;
  8. import flash.events.StatusEvent;
  9. import flash.geom.Matrix;
  10. import flash.geom.Rectangle;
  11. import flash.net.FileReference;
  12. import flash.net.LocalConnection;
  13. import mx.controls.Alert;
  14. import mx.controls.SWFLoader;
  15. import org.rockholla.controls.panzoom.PanZoomComponent;
  16. public class FlashHelper
  17. {
  18. public function FlashHelper() { }
  19. public static const localConnection : LocalConnection = new LocalConnection();
  20. public static function refreshCarotidRight( type : String, view : AcquireView ) : void
  21. {
  22. var present : Boolean = false;
  23. for each( var item : DragAndDropVo in view.collectionImagesCarotidRight )
  24. {
  25. if( item.type == type )
  26. present = true;
  27. }
  28. if( !present )
  29. {
  30. switch( type )
  31. {
  32. case "BIFD" :
  33. view.carotidRightSWF.BIFD.gotoAndStop( 1 );
  34. break;
  35. case "EXTD" :
  36. view.carotidRightSWF.EXTD.gotoAndStop( 1 );
  37. break;
  38. case "INTD" :
  39. view.carotidRightSWF.INTD.gotoAndStop( 1 );
  40. break;
  41. case "FACD" :
  42. view.carotidRightSWF.FACD.gotoAndStop( 1 );
  43. break;
  44. case "TEMD" :
  45. view.carotidRightSWF.TEMD.gotoAndStop( 1 );
  46. break;
  47. case "SOCD" :
  48. view.carotidRightSWF.SOCD.gotoAndStop( 1 );
  49. break;
  50. case "TABD" :
  51. view.carotidRightSWF.TABD.gotoAndStop( 1 );
  52. break;
  53. case "V0D" :
  54. view.carotidRightSWF.V0D.gotoAndStop( 1 );
  55. break;
  56. case "V1D" :
  57. view.carotidRightSWF.V1D.gotoAndStop( 1 );
  58. break;
  59. case "V2D" :
  60. view.carotidRightSWF.V2D.gotoAndStop( 1 );
  61. break;
  62. case "COMD" :
  63. view.carotidRightSWF.COMD.gotoAndStop( 1 );
  64. break;
  65. }
  66. }
  67. }
  68. public static function refreshCarotidLeft( type : String, view : AcquireView ) : void
  69. {
  70. var present : Boolean = false;
  71. for each( var item : DragAndDropVo in view.collectionImagesCarotidLeft )
  72. {
  73. if( item.type == type )
  74. present = true;
  75. }
  76. if( !present )
  77. {
  78. switch( type )
  79. {
  80. case "BIFG" :
  81. view.carotidLeftSWF.BIFG.gotoAndStop( 1 );
  82. break;
  83. case "EXTG" :
  84. view.carotidLeftSWF.EXTG.gotoAndStop( 1 );
  85. break;
  86. case "INTG" :
  87. view.carotidLeftSWF.INTG.gotoAndStop( 1 );
  88. break;
  89. case "FACG" :
  90. view.carotidLeftSWF.FACG.gotoAndStop( 1 );
  91. break;
  92. case "TEMG" :
  93. view.carotidLeftSWF.TEMG.gotoAndStop( 1 );
  94. break;
  95. case "SOCG" :
  96. view.carotidLeftSWF.SOCG.gotoAndStop( 1 );
  97. break;
  98. case "V0G" :
  99. view.carotidLeftSWF.V0G.gotoAndStop( 1 );
  100. break;
  101. case "V1G" :
  102. view.carotidLeftSWF.V1G.gotoAndStop( 1 );
  103. break;
  104. case "V2G" :
  105. view.carotidLeftSWF.V2G.gotoAndStop( 1 );
  106. break;
  107. case "COMG" :
  108. view.carotidLeftSWF.COMG.gotoAndStop( 1 );
  109. break;
  110. }
  111. }
  112. }
  113. public static function refreshBody( type : String, view : AcquireView ) : void
  114. {
  115. var present : Boolean = false;
  116. for each( var item : DragAndDropVo in view.collectionImagesBody )
  117. {
  118. if( item.type == type )
  119. present = true;
  120. }
  121. if( !present )
  122. {
  123. switch( type )
  124. {
  125. case "AOR" :
  126. view.bodySWF.AOR.gotoAndStop( 1 );
  127. break;
  128. case "OTH" :
  129. view.bodySWF.OTH.gotoAndStop( 1 );
  130. break;
  131. case "HEP" :
  132. view.bodySWF.HEP.gotoAndStop( 1 );
  133. break;
  134. case "HEC" :
  135. view.bodySWF.HEC.gotoAndStop( 1 );
  136. break;
  137. case "HEO" :
  138. view.bodySWF.HEO.gotoAndStop( 1 );
  139. break;
  140. case "MEI" :
  141. view.bodySWF.MEI.gotoAndStop( 1 );
  142. break;
  143. case "MES" :
  144. view.bodySWF.MES.gotoAndStop( 1 );
  145. break;
  146. case "RED" :
  147. view.bodySWF.RED.gotoAndStop( 1 );
  148. break;
  149. case "REG" :
  150. view.bodySWF.REG.gotoAndStop( 1 );
  151. break;
  152. case "SPL" :
  153. view.bodySWF.SPL.gotoAndStop( 1 );
  154. break;
  155. }
  156. }
  157. }
  158. public static function refreshLegRight( type : String, view : AcquireView ) : void
  159. {
  160. var present : Boolean = false;
  161. for each( var item : DragAndDropVo in view.collectionImagesLegRight )
  162. {
  163. if( item.type == type )
  164. present = true;
  165. }
  166. if( !present )
  167. {
  168. switch( type )
  169. {
  170. case "AOR" :
  171. view.legRightSWF.AOR.gotoAndStop( 1 );
  172. break;
  173. case "CAV" :
  174. view.legRightSWF.CAV.gotoAndStop( 1 );
  175. break;
  176. case "FED" :
  177. view.legRightSWF.FED.gotoAndStop( 1 );
  178. break;
  179. case "FPD" :
  180. view.legRightSWF.FPD.gotoAndStop( 1 );
  181. break;
  182. case "GSD" :
  183. view.legRightSWF.GSD.gotoAndStop( 1 );
  184. break;
  185. case "ICD" :
  186. view.legRightSWF.ICD.gotoAndStop( 1 );
  187. break;
  188. case "IED" :
  189. view.legRightSWF.IED.gotoAndStop( 1 );
  190. break;
  191. case "ILD" :
  192. view.legRightSWF.ILD.gotoAndStop( 1 );
  193. break;
  194. case "PRD" :
  195. view.legRightSWF.PRD.gotoAndStop( 1 );
  196. break;
  197. case "POD" :
  198. view.legRightSWF.POD.gotoAndStop( 1 );
  199. break;
  200. case "PSD" :
  201. view.legRightSWF.PSD.gotoAndStop( 1 );
  202. break;
  203. case "TAD" :
  204. view.legRightSWF.TAD.gotoAndStop( 1 );
  205. break;
  206. case "TPD" :
  207. view.legRightSWF.TPD.gotoAndStop( 1 );
  208. break;
  209. case "VFD" :
  210. view.legRightSWF.VFD.gotoAndStop( 1 );
  211. break;
  212. case "VFPD" :
  213. view.legRightSWF.VFPD.gotoAndStop( 1 );
  214. break;
  215. case "VICD" :
  216. view.legRightSWF.VICD.gotoAndStop( 1 );
  217. break;
  218. case "VILD" :
  219. view.legRightSWF.VILD.gotoAndStop( 1 );
  220. break;
  221. case "VIED" :
  222. view.legRightSWF.VIED.gotoAndStop( 1 );
  223. break;
  224. case "VTAD" :
  225. view.legRightSWF.VTAD.gotoAndStop( 1 );
  226. break;
  227. case "VTPD" :
  228. view.legRightSWF.VTPD.gotoAndStop( 1 );
  229. break;
  230. case "VPD" :
  231. view.legRightSWF.VPD.gotoAndStop( 1 );
  232. break;
  233. }
  234. }
  235. }
  236. public static function refreshLegLeft( type : String, view : AcquireView ) : void
  237. {
  238. var present : Boolean = false;
  239. for each( var item : DragAndDropVo in view.collectionImagesLegLeft )
  240. {
  241. if( item.type == type )
  242. present = true;
  243. }
  244. if( !present )
  245. {
  246. switch( type )
  247. {
  248. case "AOR" :
  249. view.legLeftSWF.AOR.gotoAndStop( 1 );
  250. break;
  251. case "CAV" :
  252. view.legLeftSWF.CAV.gotoAndStop( 1 );
  253. break;
  254. case "FEG" :
  255. view.legLeftSWF.FEG.gotoAndStop( 1 );
  256. break;
  257. case "FPG" :
  258. view.legLeftSWF.FPG.gotoAndStop( 1 );
  259. break;
  260. case "GSG" :
  261. view.legLeftSWF.GSG.gotoAndStop( 1 );
  262. break;
  263. case "ICG" :
  264. view.legLeftSWF.ICG.gotoAndStop( 1 );
  265. break;
  266. case "IEG" :
  267. view.legLeftSWF.IEG.gotoAndStop( 1 );
  268. break;
  269. case "ILG" :
  270. view.legLeftSWF.ILG.gotoAndStop( 1 );
  271. break;
  272. case "PRG" :
  273. view.legLeftSWF.PRG.gotoAndStop( 1 );
  274. break;
  275. case "POG" :
  276. view.legLeftSWF.POG.gotoAndStop( 1 );
  277. break;
  278. case "PSG" :
  279. view.legLeftSWF.PSG.gotoAndStop( 1 );
  280. break;
  281. case "TAG" :
  282. view.legLeftSWF.TAG.gotoAndStop( 1 );
  283. break;
  284. case "TPG" :
  285. view.legLeftSWF.TPG.gotoAndStop( 1 );
  286. break;
  287. case "VFG" :
  288. view.legLeftSWF.VFG.gotoAndStop( 1 );
  289. break;
  290. case "VFPG" :
  291. view.legLeftSWF.VFPG.gotoAndStop( 1 );
  292. break;
  293. case "VICG" :
  294. view.legLeftSWF.VICG.gotoAndStop( 1 );
  295. break;
  296. case "VILG" :
  297. view.legLeftSWF.VILG.gotoAndStop( 1 );
  298. break;
  299. case "VIEG" :
  300. view.legLeftSWF.VIEG.gotoAndStop( 1 );
  301. break;
  302. case "VTAG" :
  303. view.legLeftSWF.VTAG.gotoAndStop( 1 );
  304. break;
  305. case "VTPG" :
  306. view.legLeftSWF.VTPG.gotoAndStop( 1 );
  307. break;
  308. case "VPG" :
  309. view.legLeftSWF.VPG.gotoAndStop( 1 );
  310. break;
  311. }
  312. }
  313. }
  314. public static function refreshArmRight( type : String, view : AcquireView ) : void
  315. {
  316. var present : Boolean = false;
  317. for each( var item : DragAndDropVo in view.collectionImagesArmRight )
  318. {
  319. if( item.type == type )
  320. present = true;
  321. }
  322. if( !present )
  323. {
  324. switch( type )
  325. {
  326. case "AAD" :
  327. view.armRightSWF.AAD.gotoAndStop( 1 );
  328. break;
  329. case "ABD" :
  330. view.armRightSWF.ABD.gotoAndStop( 1 );
  331. break;
  332. case "ACD" :
  333. view.armRightSWF.ACD.gotoAndStop( 1 );
  334. break;
  335. case "ARD" :
  336. view.armRightSWF.ARD.gotoAndStop( 1 );
  337. break;
  338. case "ASCD" :
  339. view.armRightSWF.ASCD.gotoAndStop( 1 );
  340. break;
  341. case "VAD" :
  342. view.armRightSWF.VAD.gotoAndStop( 1 );
  343. break;
  344. case "VBD" :
  345. view.armRightSWF.VBD.gotoAndStop( 1 );
  346. break;
  347. case "VBRD" :
  348. view.armRightSWF.VBRD.gotoAndStop( 1 );
  349. break;
  350. case "VCD" :
  351. view.armRightSWF.VCD.gotoAndStop( 1 );
  352. break;
  353. case "VCUD" :
  354. view.armRightSWF.VCUD.gotoAndStop( 1 );
  355. break;
  356. case "VRD" :
  357. view.armRightSWF.VRD.gotoAndStop( 1 );
  358. break;
  359. case "VSCD" :
  360. view.armRightSWF.VSCD.gotoAndStop( 1 );
  361. break;
  362. }
  363. }
  364. }
  365. public static function refreshArmLeft( type : String, view : AcquireView ) : void
  366. {
  367. var present : Boolean = false;
  368. for each( var item : DragAndDropVo in view.collectionImagesArmLeft )
  369. {
  370. if( item.type == type )
  371. present = true;
  372. }
  373. if( !present )
  374. {
  375. switch( type )
  376. {
  377. case "AAG" :
  378. view.armLeftSWF.AAG.gotoAndStop( 1 );
  379. break;
  380. case "ABG" :
  381. view.armLeftSWF.ABG.gotoAndStop( 1 );
  382. break;
  383. case "ACG" :
  384. view.armLeftSWF.ACG.gotoAndStop( 1 );
  385. break;
  386. case "ARG" :
  387. view.armLeftSWF.ARG.gotoAndStop( 1 );
  388. break;
  389. case "ASCG" :
  390. view.armLeftSWF.ASCG.gotoAndStop( 1 );
  391. break;
  392. case "VAG" :
  393. view.armLeftSWF.VAG.gotoAndStop( 1 );
  394. break;
  395. case "VBG" :
  396. view.armLeftSWF.VBG.gotoAndStop( 1 );
  397. break;
  398. case "VBRG" :
  399. view.armLeftSWF.VBRG.gotoAndStop( 1 );
  400. break;
  401. case "VCG" :
  402. view.armLeftSWF.VCG.gotoAndStop( 1 );
  403. break;
  404. case "VCUG" :
  405. view.armLeftSWF.VCUG.gotoAndStop( 1 );
  406. break;
  407. case "VRG" :
  408. view.armLeftSWF.VRG.gotoAndStop( 1 );
  409. break;
  410. case "VSCG" :
  411. view.armLeftSWF.VSCG.gotoAndStop( 1 );
  412. break;
  413. }
  414. }
  415. }
  416. public static function restoreSelectionForRightCarotid( type : String ) : void
  417. {
  418. localConnection.send( "rightCarotid", type + "Active" );
  419. }
  420. public static function removeSelectionForRightCarotid( type : String ) : void
  421. {
  422. localConnection.send( "rightCarotid", type + "Inactive" );
  423. }
  424. public static function restoreSelectionForLeftCarotid( type : String ) : void
  425. {
  426. localConnection.send( "leftCarotid", type + "Active" );
  427. }
  428. public static function removeSelectionForLeftCarotid( type : String ) : void
  429. {
  430. localConnection.send( "leftCarotid", type + "Inactive" );
  431. }
  432. public static function restoreSelectionForRightArm( type : String ) : void
  433. {
  434. localConnection.send( "rightArm", type + "Active" );
  435. }
  436. public static function removeSelectionForRightArm( type : String ) : void
  437. {
  438. localConnection.send( "rightArm", type + "Inactive" );
  439. }
  440. public static function restoreSelectionForLeftArm( type : String ) : void
  441. {
  442. localConnection.send( "leftArm", type + "Active" );
  443. }
  444. public static function removeSelectionForLeftArm( type : String ) : void
  445. {
  446. localConnection.send( "leftArm", type + "Inactive" );
  447. }
  448. public static function restoreSelectionForRightLeg( type : String ) : void
  449. {
  450. localConnection.send( "rightLeg", type + "Active" );
  451. }
  452. public static function removeSelectionForRightLeg( type : String ) : void
  453. {
  454. localConnection.send( "rightLeg", type + "Inactive" );
  455. }
  456. public static function restoreSelectionForLeftLeg( type : String ) : void
  457. {
  458. localConnection.send( "leftLeg", type + "Active" );
  459. }
  460. public static function removeSelectionForLeftLeg( type : String ) : void
  461. {
  462. localConnection.send( "leftLeg", type + "Inactive" );
  463. }
  464. public static function restoreSelectionForBody( type : String ) : void
  465. {
  466. localConnection.send( "body", type + "Active" );
  467. }
  468. public static function removeSelectionForBody( type : String ) : void
  469. {
  470. localConnection.send( "body", type + "Inactive" );
  471. }
  472. public static function resetAll() : void
  473. {
  474. localConnection.send( "rightCarotid", "INTDInactive" );
  475. localConnection.send( "rightCarotid", "EXTDInactive" );
  476. localConnection.send( "rightCarotid", "TEMDInactive" );
  477. localConnection.send( "rightCarotid", "FACDInactive" );
  478. localConnection.send( "rightCarotid", "BIFDInactive" );
  479. localConnection.send( "rightCarotid", "COMDInactive" );
  480. localConnection.send( "rightCarotid", "SOCDInactive" );
  481. localConnection.send( "rightCarotid", "TABDInactive" );
  482. localConnection.send( "rightCarotid", "V0DInactive" );
  483. localConnection.send( "rightCarotid", "V1DInactive" );
  484. localConnection.send( "rightCarotid", "V2DInactive" );
  485. localConnection.send( "leftCarotid", "INTGInactive" );
  486. localConnection.send( "leftCarotid", "EXTGInactive" );
  487. localConnection.send( "leftCarotid", "TEMGInactive" );
  488. localConnection.send( "leftCarotid", "FACGInactive" );
  489. localConnection.send( "leftCarotid", "BIFGInactive" );
  490. localConnection.send( "leftCarotid", "COMGInactive" );
  491. localConnection.send( "leftCarotid", "SOCGInactive" );
  492. localConnection.send( "leftCarotid", "V0GInactive" );
  493. localConnection.send( "leftCarotid", "V1GInactive" );
  494. localConnection.send( "leftCarotid", "V2GInactive" );
  495. localConnection.send( "body", "AORInactive" );
  496. localConnection.send( "body", "HEPInactive" );
  497. localConnection.send( "body", "HECInactive" );
  498. localConnection.send( "body", "HEOInactive" );
  499. localConnection.send( "body", "MEIInactive" );
  500. localConnection.send( "body", "MESInactive" );
  501. localConnection.send( "body", "REDInactive" );
  502. localConnection.send( "body", "REGInactive" );
  503. localConnection.send( "body", "SPLInactive" );
  504. localConnection.send( "body", "OTHInactive" );
  505. localConnection.send( "leftLeg", "AORInactive" );
  506. localConnection.send( "leftLeg", "ICGInactive" );
  507. localConnection.send( "leftLeg", "ILGInactive" );
  508. localConnection.send( "leftLeg", "IEGInactive" );
  509. localConnection.send( "leftLeg", "FPGInactive" );
  510. localConnection.send( "leftLeg", "FEGInactive" );
  511. localConnection.send( "leftLeg", "POGInactive" );
  512. localConnection.send( "leftLeg", "TPGInactive" );
  513. localConnection.send( "leftLeg", "TAGInactive" );
  514. localConnection.send( "leftLeg", "CAVInactive" );
  515. localConnection.send( "leftLeg", "VICGInactive" );
  516. localConnection.send( "leftLeg", "VILGInactive" );
  517. localConnection.send( "leftLeg", "VIEGInactive" );
  518. localConnection.send( "leftLeg", "GSGInactive" );
  519. localConnection.send( "leftLeg", "VFGInactive" );
  520. localConnection.send( "leftLeg", "VPGInactive" );
  521. localConnection.send( "leftLeg", "VFPGInactive" );
  522. localConnection.send( "leftLeg", "VTPGInactive" );
  523. localConnection.send( "leftLeg", "VTAGInactive" );
  524. localConnection.send( "leftLeg", "PSGInactive" );
  525. localConnection.send( "RightLeg", "AORInactive" );
  526. localConnection.send( "RightLeg", "ICDInactive" );
  527. localConnection.send( "RightLeg", "ILDInactive" );
  528. localConnection.send( "RightLeg", "IEDInactive" );
  529. localConnection.send( "RightLeg", "FPDInactive" );
  530. localConnection.send( "RightLeg", "FEDInactive" );
  531. localConnection.send( "RightLeg", "PODInactive" );
  532. localConnection.send( "RightLeg", "TPDInactive" );
  533. localConnection.send( "RightLeg", "TADInactive" );
  534. localConnection.send( "RightLeg", "CAVInactive" );
  535. localConnection.send( "RightLeg", "VICDInactive" );
  536. localConnection.send( "RightLeg", "VILDInactive" );
  537. localConnection.send( "RightLeg", "VIEDInactive" );
  538. localConnection.send( "RightLeg", "GSDInactive" );
  539. localConnection.send( "RightLeg", "VFDInactive" );
  540. localConnection.send( "RightLeg", "VPDInactive" );
  541. localConnection.send( "RightLeg", "VFPDInactive" );
  542. localConnection.send( "RightLeg", "VTPDInactive" );
  543. localConnection.send( "RightLeg", "VTADInactive" );
  544. localConnection.send( "RightLeg", "PSDInactive" );
  545. localConnection.send( "leftArm", "ASCGInactive" );
  546. localConnection.send( "leftArm", "AAGInactive" );
  547. localConnection.send( "leftArm", "ABGInactive" );
  548. localConnection.send( "leftArm", "ACGInactive" );
  549. localConnection.send( "leftArm", "ARGInactive" );
  550. localConnection.send( "leftArm", "VSCGInactive" );
  551. localConnection.send( "leftArm", "VAGInactive" );
  552. localConnection.send( "leftArm", "VBGInactive" );
  553. localConnection.send( "leftArm", "VCGInactive" );
  554. localConnection.send( "leftArm", "VRGInactive" );
  555. localConnection.send( "leftArm", "VCUGInactive" );
  556. localConnection.send( "leftArm", "VBRGInactive" );
  557. localConnection.send( "rightArm", "ASCDInactive" );
  558. localConnection.send( "rightArm", "AADInactive" );
  559. localConnection.send( "rightArm", "ABDInactive" );
  560. localConnection.send( "rightArm", "ACDInactive" );
  561. localConnection.send( "rightArm", "ARDInactive" );
  562. localConnection.send( "rightArm", "VSCDInactive" );
  563. localConnection.send( "rightArm", "VADInactive" );
  564. localConnection.send( "rightArm", "VBDInactive" );
  565. localConnection.send( "rightArm", "VCDInactive" );
  566. localConnection.send( "rightArm", "VRDInactive" );
  567. localConnection.send( "rightArm", "VCUDInactive" );
  568. localConnection.send( "rightArm", "VBRDInactive" );
  569. }
  570. public static function resetCarotids() : void
  571. {
  572. localConnection.send( "rightCarotid", "INTDInactive" );
  573. localConnection.send( "rightCarotid", "EXTDInactive" );
  574. localConnection.send( "rightCarotid", "TEMDInactive" );
  575. localConnection.send( "rightCarotid", "FACDInactive" );
  576. localConnection.send( "rightCarotid", "BIFDInactive" );
  577. localConnection.send( "rightCarotid", "COMDInactive" );
  578. localConnection.send( "rightCarotid", "SOCDInactive" );
  579. localConnection.send( "rightCarotid", "TABDInactive" );
  580. localConnection.send( "rightCarotid", "V0DInactive" );
  581. localConnection.send( "rightCarotid", "V1DInactive" );
  582. localConnection.send( "rightCarotid", "V2DInactive" );
  583. localConnection.send( "leftCarotid", "INTGInactive" );
  584. localConnection.send( "leftCarotid", "EXTGInactive" );
  585. localConnection.send( "leftCarotid", "TEMGInactive" );
  586. localConnection.send( "leftCarotid", "FACGInactive" );
  587. localConnection.send( "leftCarotid", "BIFGInactive" );
  588. localConnection.send( "leftCarotid", "COMGInactive" );
  589. localConnection.send( "leftCarotid", "SOCGInactive" );
  590. localConnection.send( "leftCarotid", "V0GInactive" );
  591. localConnection.send( "leftCarotid", "V1GInactive" );
  592. localConnection.send( "leftCarotid", "V2GInactive" );
  593. }
  594. public static function resetArms() : void
  595. {
  596. localConnection.send( "leftArm", "ASCGInactive" );
  597. localConnection.send( "leftArm", "AAGInactive" );
  598. localConnection.send( "leftArm", "ABGInactive" );
  599. localConnection.send( "leftArm", "ACGInactive" );
  600. localConnection.send( "leftArm", "ARGInactive" );
  601. localConnection.send( "leftArm", "VSCGInactive" );
  602. localConnection.send( "leftArm", "VAGInactive" );
  603. localConnection.send( "leftArm", "VBGInactive" );
  604. localConnection.send( "leftArm", "VCGInactive" );
  605. localConnection.send( "leftArm", "VRGInactive" );
  606. localConnection.send( "leftArm", "VCUGInactive" );
  607. localConnection.send( "leftArm", "VBRGInactive" );
  608. localConnection.send( "rightArm", "ASCDInactive" );
  609. localConnection.send( "rightArm", "AADInactive" );
  610. localConnection.send( "rightArm", "ABDInactive" );
  611. localConnection.send( "rightArm", "ACDInactive" );
  612. localConnection.send( "rightArm", "ARDInactive" );
  613. localConnection.send( "rightArm", "VSCDInactive" );
  614. localConnection.send( "rightArm", "VADInactive" );
  615. localConnection.send( "rightArm", "VBDInactive" );
  616. localConnection.send( "rightArm", "VCDInactive" );
  617. localConnection.send( "rightArm", "VRDInactive" );
  618. localConnection.send( "rightArm", "VCUDInactive" );
  619. localConnection.send( "rightArm", "VBRDInactive" );
  620. }
  621. public static function resetLegs() : void
  622. {
  623. localConnection.send( "leftLeg", "AORInactive" );
  624. localConnection.send( "leftLeg", "ICGInactive" );
  625. localConnection.send( "leftLeg", "ILGInactive" );
  626. localConnection.send( "leftLeg", "IEGInactive" );
  627. localConnection.send( "leftLeg", "FPGInactive" );
  628. localConnection.send( "leftLeg", "FEGInactive" );
  629. localConnection.send( "leftLeg", "POGInactive" );
  630. localConnection.send( "leftLeg", "TPGInactive" );
  631. localConnection.send( "leftLeg", "TAGInactive" );
  632. localConnection.send( "leftLeg", "CAVInactive" );
  633. localConnection.send( "leftLeg", "VICGInactive" );
  634. localConnection.send( "leftLeg", "VILGInactive" );
  635. localConnection.send( "leftLeg", "VIEGInactive" );
  636. localConnection.send( "leftLeg", "GSGInactive" );
  637. localConnection.send( "leftLeg", "VFGInactive" );
  638. localConnection.send( "leftLeg", "VPGInactive" );
  639. localConnection.send( "leftLeg", "VFPGInactive" );
  640. localConnection.send( "leftLeg", "VTPGInactive" );
  641. localConnection.send( "leftLeg", "VTAGInactive" );
  642. localConnection.send( "leftLeg", "PSGInactive" );
  643. localConnection.send( "rightLeg", "AORInactive" );
  644. localConnection.send( "rightLeg", "ICDInactive" );
  645. localConnection.send( "rightLeg", "ILDInactive" );
  646. localConnection.send( "rightLeg", "IEDInactive" );
  647. localConnection.send( "rightLeg", "FPDInactive" );
  648. localConnection.send( "rightLeg", "FEDInactive" );
  649. localConnection.send( "rightLeg", "PODInactive" );
  650. localConnection.send( "rightLeg", "TPDInactive" );
  651. localConnection.send( "rightLeg", "TADInactive" );
  652. localConnection.send( "rightLeg", "CAVInactive" );
  653. localConnection.send( "rightLeg", "VICDInactive" );
  654. localConnection.send( "rightLeg", "VILDInactive" );
  655. localConnection.send( "rightLeg", "VIEDInactive" );
  656. localConnection.send( "rightLeg", "GSDInactive" );
  657. localConnection.send( "rightLeg", "VFDInactive" );
  658. localConnection.send( "rightLeg", "VPDInactive" );
  659. localConnection.send( "rightLeg", "VFPDInactive" );
  660. localConnection.send( "rightLeg", "VTPDInactive" );
  661. localConnection.send( "rightLeg", "VTADInactive" );
  662. localConnection.send( "rightLeg", "PSDInactive" );
  663. }
  664. public static function resetBody() : void
  665. {
  666. localConnection.send( "body", "AORInactive" );
  667. localConnection.send( "body", "HEPInactive" );
  668. localConnection.send( "body", "HECInactive" );
  669. localConnection.send( "body", "HEOInactive" );
  670. localConnection.send( "body", "MEIInactive" );
  671. localConnection.send( "body", "MESInactive" );
  672. localConnection.send( "body", "REDInactive" );
  673. localConnection.send( "body", "REGInactive" );
  674. localConnection.send( "body", "SPLInactive" );
  675. localConnection.send( "body", "OTHInactive" );
  676. }
  677. public static function buildSegmentSelected(swf : PanZoomComponent, bitmap : String) : void
  678. {
  679. var bitmapData : BitmapData = new BitmapData( swf.width - 15, swf.height - 14 );
  680. var matrix : Matrix = new Matrix(1,0,0,1,2,2);
  681. var rectangle : Rectangle = new Rectangle( 5, 5, swf.width - 15, swf.height - 14 );
  682. bitmapData.draw( swf, matrix, null, null, rectangle );
  683. switch( bitmap )
  684. {
  685. case "CR":
  686. ApplicationModelLocator.getInstance().carotidRight = new Bitmap( bitmapData );
  687. ApplicationModelLocator.getInstance().carotidRight.smoothing = true;
  688. break;
  689. case "CL":
  690. ApplicationModelLocator.getInstance().carotidLeft = new Bitmap( bitmapData );
  691. ApplicationModelLocator.getInstance().carotidLeft.smoothing = true;
  692. break;
  693. case "AR":
  694. ApplicationModelLocator.getInstance().armRight = new Bitmap( bitmapData );
  695. ApplicationModelLocator.getInstance().armRight.smoothing = true;
  696. break;
  697. case "AL":
  698. ApplicationModelLocator.getInstance().armLeft = new Bitmap( bitmapData );
  699. ApplicationModelLocator.getInstance().armLeft.smoothing = true;
  700. break;
  701. case "LR":
  702. ApplicationModelLocator.getInstance().legRight = new Bitmap( bitmapData );
  703. ApplicationModelLocator.getInstance().legRight.smoothing = true;
  704. break;
  705. case "LL":
  706. ApplicationModelLocator.getInstance().legLeft = new Bitmap( bitmapData );
  707. ApplicationModelLocator.getInstance().legLeft.smoothing = true;
  708. break;
  709. case "BO":
  710. ApplicationModelLocator.getInstance().body = new Bitmap( bitmapData );
  711. ApplicationModelLocator.getInstance().body.smoothing = true;
  712. break;
  713. }
  714. }
  715. }
  716. }