Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.airhunter
- {
- import flash.events.*;
- import flash.display.*;
- import caurina.transitions.*;
- import caurina.transitions.properties.ColorShortcuts;
- ColorShortcuts.init();
- import fl.video.*;
- import fl.video.VideoEvent;
- public class EnvironmentFlips extends MovieClip
- {
- var __width:Number = 1024;
- var __flip_total:Number = 6;
- var __flip_count:Number = 0;
- var flip_array:Array = new Array();
- public function EnvironmentFlips()
- {
- //
- trace("EnvironmentFlips called")
- bounds_mc.mouseEnabled = false;
- bounds_mc.mouseChildren = false;
- init();
- }
- public function init():void
- {
- flip_array[0] = "flv/Int1toARCTICtoInt2.flv";
- flip_array[1] = "flv/Int2toRAINFORESTtoInt1.flv";
- flip_array[2] = "flv/Int1toTROPICStoInt2.flv";
- flip_array[3] = "flv/Int2toARCTICtoInt1.flv";
- flip_array[4] = "flv/Int1toRAINFORESTtoInt2.flv";
- flip_array[5] = "flv/Int2toTROPICStoInt1.flv";
- flip_video0_mc.flip_video.visible = false;
- flip_video0_mc.flip_video.source = flip_array[0];
- flip_video1_mc.flip_video.visible = false;
- flip_video1_mc.flip_video.source = flip_array[1];
- flip_video2_mc.flip_video.visible = false;
- flip_video2_mc.flip_video.source = flip_array[2];
- flip_video3_mc.flip_video.visible = false;
- flip_video3_mc.flip_video.source = flip_array[3];
- flip_video4_mc.flip_video.visible = false;
- flip_video4_mc.flip_video.source = flip_array[4];
- flip_video5_mc.flip_video.visible = false;
- flip_video5_mc.flip_video.source = flip_array[5];
- }
- public function flipIt():void
- {
- trace("flipIt called");
- if (__flip_count == __flip_total)
- {
- __flip_count = 0;
- }
- // show active
- this["flip_video"+(__flip_count)+"_mc"].flip_video.visible = true;
- // play active
- this["flip_video"+(__flip_count)+"_mc"].flip_video.play();
- // stop/hide other
- if (__flip_count != 0)
- {
- this["flip_video"+(__flip_count-1)+"_mc"].visible = false;
- }
- __flip_count++;
- }
- public function readyPlay(e:VideoEvent):void
- {
- trace("video is ready")
- //
- }
- public function videoFinished(event:VideoEvent)
- {
- //
- };
- public function setResize( $w:Number, $h:Number ):void
- {
- this.x = Math.round(($w/2) - (this.__width/2));
- }
- }
- }
Add Comment
Please, Sign In to add comment