Section 1
//invisiblebox_7 (InstantCSI3_fla.invisiblebox_7)
package InstantCSI3_fla {
import flash.display.*;
public dynamic class invisiblebox_7 extends MovieClip {
public function invisiblebox_7(){
addFrameScript(0, frame1);
}
function frame1(){
this.visible = false;
}
}
}//package InstantCSI3_fla
Section 2
//MainTimeline (InstantCSI3_fla.MainTimeline)
package InstantCSI3_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var BTN_WIDTH:Number;
public var BTN_MARGIN:Number;
public var bgClip:MovieClip;
public var btn:SimpleButton;
public var pic:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 3, frame4);
}
public function resizeBtn(){
var _local1:Number;
if (this.btn != null){
btn.x = (stage.scaleX * 50);
btn.y = (stage.scaleY * 50);
_local1 = ((btn.width / btn.scaleX) / (btn.height / btn.scaleY));
if ((stage.stageWidth * BTN_MARGIN) <= BTN_WIDTH){
btn.width = (stage.stageWidth * BTN_MARGIN);
btn.scaleY = btn.scaleX;
} else {
if ((stage.stageHeight * BTN_MARGIN) <= (BTN_WIDTH / _local1)){
btn.height = (stage.stageHeight * BTN_MARGIN);
btn.scaleX = btn.scaleY;
} else {
btn.width = BTN_WIDTH;
btn.scaleY = btn.scaleX;
};
};
btn.x = (stage.stageWidth / 2);
btn.y = (stage.stageHeight / 2);
};
}
public function resizeBackground(){
bgClip.x = 0;
bgClip.y = 0;
bgClip.width = stage.stageWidth;
bgClip.height = stage.stageHeight;
}
public function setPicHeight(_arg1:Number){
var _local2:Number;
_local2 = (pic.maxBox.height / (pic.height / pic.scaleY));
pic.height = (_arg1 / _local2);
pic.scaleX = pic.scaleY;
}
public function btnClicked(_arg1:Event){
var _local2:Yeah;
var _local3:SoundChannel;
_local2 = new Yeah();
_local3 = _local2.play();
_local3.addEventListener(Event.SOUND_COMPLETE, soundFinished, false, 0, true);
setBGBlack();
playAnim();
}
public function setBGBlack(){
var _local1:ColorTransform;
_local1 = new ColorTransform(0, 0, 0, 1, -255, -255, -255);
bgClip.transform.colorTransform = _local1;
}
public function resizePic(){
var _local1:Rectangle;
var _local2:Number;
var _local3:Number;
var _local4:*;
var _local5:Point;
var _local6:*;
var _local7:*;
if (this.pic == null){
return;
};
_local1 = pic.maxBox.getBounds(stage);
_local2 = (pic.minBox.width / pic.minBox.height);
_local3 = (stage.stageWidth / stage.stageHeight);
if (_local2 > _local3){
_local4 = (pic.minBox.width / pic.maxBox.width);
_local6 = (stage.stageWidth / _local4);
setPicWidth(_local6);
} else {
_local4 = (pic.minBox.height / pic.maxBox.height);
_local7 = (stage.stageHeight / _local4);
setPicHeight(_local7);
};
_local5 = new Point(0, 0);
_local5 = pic.minBox.localToGlobal(_local5);
pic.x = (pic.x - (_local5.x - (stage.stageWidth / 2)));
pic.y = (pic.y - (_local5.y - (stage.stageHeight / 2)));
_local1 = pic.maxBox.getBounds(stage);
if (_local1.width < stage.stageWidth){
setPicWidth(stage.stageWidth);
_local1 = pic.maxBox.getBounds(stage);
};
if (_local1.height < stage.stageHeight){
setPicHeight(stage.stageHeight);
_local1 = pic.maxBox.getBounds(stage);
};
if (_local1.left > 0){
pic.x = (pic.x - _local1.left);
_local1 = pic.maxBox.getBounds(stage);
};
if (_local1.right < stage.stageWidth){
pic.x = (pic.x - (_local1.right - stage.stageWidth));
_local1 = pic.maxBox.getBounds(stage);
};
if (_local1.top > 0){
pic.y = (pic.y - _local1.top);
_local1 = pic.maxBox.getBounds(stage);
};
if (_local1.bottom < stage.stageHeight){
pic.y = (pic.y - (_local1.bottom - stage.stageHeight));
_local1 = pic.maxBox.getBounds(stage);
};
}
function frame1(){
stage.align = StageAlign.TOP_LEFT;
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
BTN_WIDTH = 200;
BTN_MARGIN = 1.2;
trace(("||||| " + stage.stageWidth));
setBGWhite();
stage.addEventListener(Event.RESIZE, stageResized);
stageResized();
play();
}
function frame4(){
resizePic();
}
public function setBGWhite(){
var _local1:ColorTransform;
_local1 = new ColorTransform(0, 0, 0, 1, 200, 200, 200);
bgClip.transform.colorTransform = _local1;
}
public function stageResized(_arg1:Event=null){
resizeBtn();
resizePic();
resizeBackground();
}
public function playAnim(){
gotoAndStop("anim1");
}
public function soundFinished(_arg1:Event){
gotoAndStop("sunglasses");
setBGWhite();
}
function frame2(){
stop();
btn.addEventListener(MouseEvent.CLICK, btnClicked);
resizeBtn();
trace(btn.x);
trace(btn.width);
trace(btn.y);
trace(btn.height);
}
public function setPicWidth(_arg1:Number){
var _local2:Number;
_local2 = (pic.maxBox.width / (pic.width / pic.scaleX));
pic.width = (_arg1 / _local2);
pic.scaleY = pic.scaleX;
}
}
}//package InstantCSI3_fla
Section 3
//Sunset2_5 (InstantCSI3_fla.Sunset2_5)
package InstantCSI3_fla {
import flash.display.*;
public dynamic class Sunset2_5 extends MovieClip {
public var minBox:MovieClip;
public var maxBox:MovieClip;
}
}//package InstantCSI3_fla
Section 4
//Yeah (Yeah)
package {
import flash.media.*;
public dynamic class Yeah extends Sound {
}
}//package