Guest User

Untitled

a guest
Jun 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1.  
  2. package com.airhunter
  3. {
  4. import flash.events.*;
  5. import flash.display.*;
  6. import caurina.transitions.*;
  7. import caurina.transitions.properties.ColorShortcuts;
  8. ColorShortcuts.init();
  9.  
  10. import fl.video.*;
  11. import fl.video.VideoEvent;
  12.  
  13. public class EnvironmentFlips extends MovieClip
  14. {
  15. var __width:Number = 1024;
  16.  
  17. var __flip_total:Number = 6;
  18. var __flip_count:Number = 0;
  19.  
  20. var flip_array:Array = new Array();
  21.  
  22.  
  23. public function EnvironmentFlips()
  24. {
  25. //
  26. trace("EnvironmentFlips called")
  27.  
  28. bounds_mc.mouseEnabled = false;
  29. bounds_mc.mouseChildren = false;
  30.  
  31. init();
  32. }
  33.  
  34. public function init():void
  35. {
  36. flip_array[0] = "flv/Int1toARCTICtoInt2.flv";
  37. flip_array[1] = "flv/Int2toRAINFORESTtoInt1.flv";
  38. flip_array[2] = "flv/Int1toTROPICStoInt2.flv";
  39. flip_array[3] = "flv/Int2toARCTICtoInt1.flv";
  40. flip_array[4] = "flv/Int1toRAINFORESTtoInt2.flv";
  41. flip_array[5] = "flv/Int2toTROPICStoInt1.flv";
  42.  
  43. flip_video0_mc.flip_video.visible = false;
  44. flip_video0_mc.flip_video.source = flip_array[0];
  45.  
  46. flip_video1_mc.flip_video.visible = false;
  47. flip_video1_mc.flip_video.source = flip_array[1];
  48.  
  49. flip_video2_mc.flip_video.visible = false;
  50. flip_video2_mc.flip_video.source = flip_array[2];
  51.  
  52. flip_video3_mc.flip_video.visible = false;
  53. flip_video3_mc.flip_video.source = flip_array[3];
  54.  
  55. flip_video4_mc.flip_video.visible = false;
  56. flip_video4_mc.flip_video.source = flip_array[4];
  57.  
  58. flip_video5_mc.flip_video.visible = false;
  59. flip_video5_mc.flip_video.source = flip_array[5];
  60. }
  61.  
  62. public function flipIt():void
  63. {
  64. trace("flipIt called");
  65.  
  66. if (__flip_count == __flip_total)
  67. {
  68. __flip_count = 0;
  69. }
  70.  
  71. // show active
  72. this["flip_video"+(__flip_count)+"_mc"].flip_video.visible = true;
  73.  
  74. // play active
  75. this["flip_video"+(__flip_count)+"_mc"].flip_video.play();
  76.  
  77. // stop/hide other
  78. if (__flip_count != 0)
  79. {
  80. this["flip_video"+(__flip_count-1)+"_mc"].visible = false;
  81. }
  82.  
  83. __flip_count++;
  84. }
  85.  
  86. public function readyPlay(e:VideoEvent):void
  87. {
  88. trace("video is ready")
  89. //
  90. }
  91.  
  92. public function videoFinished(event:VideoEvent)
  93. {
  94. //
  95. };
  96.  
  97. public function setResize( $w:Number, $h:Number ):void
  98. {
  99. this.x = Math.round(($w/2) - (this.__width/2));
  100. }
  101.  
  102. }
  103. }
Add Comment
Please, Sign In to add comment