Section 1
//MainTimeline (SleepinginMyCar_fla.MainTimeline)
package SleepinginMyCar_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
public dynamic class MainTimeline extends MovieClip {
public var speedRecomendation:TextField;
public var wakaba:wakabaMark;
public var SetSpInf:TextField;
public var SubSpeed:TextField;
public var PercentageOfLoaded:TextField;
public var SubtitleBox2:TextField;
public var debagInfo:TextField;
public var SubtitleBox1:TextField;
public var crc:Shape;
public var tmr:Timer;
public var WaitAnimation:MovieClip;
public var i:Number;
public var SubStep:Number;
public var StepCount:uint;
public var AutoRepeatID1:uint;
public var AutoRepeatID2:uint;
public var playbackPercent:uint;
public var SubScrolPercent:uint;
public var SubStepManual:Number;
public var SubStepMod:String;
public var Timer1:Timer;
public var Timer2:Timer;
public var snd:Sound;
public var channel:SoundChannel;
public var SubtitleOnB:Bitmap;
public var SubtitleOffB:Bitmap;
public var SubSButton:Sprite;
public var SubSetButton:Sprite;
public var Lirics:String;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
public function Preloader(_arg1:Event){
PercentageOfLoaded.text = (Math.round(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100)) + "%");
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
removeEventListener(Event.ENTER_FRAME, Preloader);
tmr.removeEventListener(TimerEvent.TIMER, timerListener);
tmr.stop();
removeChild(WaitAnimation);
gotoAndPlay(3);
};
}
public function timerListener(_arg1:TimerEvent):void{
WaitAnimation.rotation = (WaitAnimation.rotation + 22.5);
}
public function AutoStep(_arg1:TimerEvent):void{
if (SubSpeed.text === "auto"){
SubStepMod = "auto/variable";
SubSynchro();
} else {
if (Number(SubSpeed.text)){
SubStepManual = Number(SubSpeed.text);
if ((((SubStepManual > 1)) && ((SubStepManual < 10)))){
SubStep = SubStepManual;
SubStepMod = "manual/constant";
};
} else {
SubStepMod = "auto/variable";
SubSynchro();
switch (SubSpeed.text){
case "lolice":
SubSpeed.text = "auto";
gotoAndStop(5);
//unresolved jump
case "iichan":
navigateToURL(new URLRequest("http://403.iichan.hk/gf/"), "_blank");
SubSpeed.text = "auto";
break;
case "wakaba":
wakaba.visible = true;
break;
default:
break;
};
};
};
debagInfo.text = ((((((("mode: " + SubStepMod) + " debag: ") + playbackPercent) + "/") + SubScrolPercent) + " > ") + SubStep);
}
public function SubSynchro():void{
playbackPercent = (100 * (channel.position / snd.length));
SubScrolPercent = (StepCount / 35);
if (SubScrolPercent > playbackPercent){
if (SubStep > 1){
SubStep = (int(((SubStep - 0.1) * 10)) / 10);
};
} else {
if (SubScrolPercent < playbackPercent){
if (SubStep < 4){
SubStep = (int(((SubStep + 0.1) * 10)) / 10);
};
};
};
}
public function runingText(_arg1:TimerEvent):void{
SubtitleBox1.x = (SubtitleBox1.x - SubStep);
StepCount = (StepCount + SubStep);
if (SubtitleBox2.x > -4000){
if (SubtitleBox2.x < SubtitleBox1.x){
SubtitleBox2.x = (SubtitleBox2.x - SubStep);
};
} else {
SubtitleBox2.x = 650;
SubtitleBox2.visible = false;
};
}
public function SubtitlesSwitch(_arg1:MouseEvent):void{
if (SubSButton.contains(SubtitleOffB)){
SubSButton.removeChild(SubtitleOffB);
SubSButton.addChild(SubtitleOnB);
SubtitleBox1.visible = true;
SubtitleBox2.visible = true;
} else {
SubSButton.removeChild(SubtitleOnB);
SubSButton.addChild(SubtitleOffB);
SubtitleBox1.visible = false;
SubtitleBox2.visible = false;
};
}
public function SwitchSetBar(_arg1:MouseEvent):void{
if (debagInfo.visible == true){
debagInfo.visible = false;
SetSpInf.visible = false;
SubSpeed.visible = false;
speedRecomendation.visible = false;
} else {
debagInfo.visible = true;
SetSpInf.visible = true;
SubSpeed.visible = true;
speedRecomendation.visible = true;
};
}
public function onPlaybackComplete(_arg1:Event):void{
channel = snd.play();
if (SubtitleBox1.visible == true){
SubtitleBox2.visible = true;
};
SubtitleBox2.x = SubtitleBox1.x;
SubtitleBox1.x = 750;
StepCount = 0;
channel.removeEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
channel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
}
function frame1(){
stop();
tmr = new Timer(80);
WaitAnimation = new MovieClip();
stage.scaleMode = StageScaleMode.NO_SCALE;
addChild(WaitAnimation);
WaitAnimation.x = (PercentageOfLoaded.x + (PercentageOfLoaded.width / 2));
WaitAnimation.y = ((PercentageOfLoaded.y + (PercentageOfLoaded.height / 2)) - 70);
addEventListener(Event.ENTER_FRAME, Preloader);
tmr.addEventListener(TimerEvent.TIMER, timerListener);
PercentageOfLoaded.text = "100%";
i = 0;
while (i <= (2 * Math.PI)) {
crc = new Shape();
if (i == 0){
crc.graphics.beginFill(0xFFFFFF, 0.6);
} else {
crc.graphics.beginFill(0, 0.1);
};
crc.graphics.drawCircle((160 * Math.cos(i)), (160 * Math.sin(i)), 20);
WaitAnimation.addChild(crc);
i = (i + ((2 * Math.PI) / 16));
};
tmr.start();
}
function frame2(){
gotoAndStop(1);
}
function frame3(){
speedRecomendation.visible = false;
debagInfo.visible = false;
SetSpInf.visible = false;
SubSpeed.visible = false;
SubStep = 2.5;
StepCount = 1;
SubStepMod = "auto";
Timer1 = new Timer(1);
Timer2 = new Timer(600);
snd = new SleepinginMyCar();
channel = snd.play();
SubtitleOnB = new Bitmap(new subOn());
SubtitleOffB = new Bitmap(new subOff());
SubSButton = new Sprite();
SubSButton.buttonMode = true;
SubSetButton = new SubSet();
SubSetButton.buttonMode = true;
Lirics = "Sleeping in my car, I will undress you. Sleeping in my car, I will caress you. Staying in the backseat of my car, making out. Oh, ouu~ So come out tonight I'll take you for a ride. This steamy ol' wagon. The radio is getting wild. Baby babe, we're moving so fast. Try to hang on. Oooh, I try to hang on...";
SubSButton.addChild(SubtitleOnB);
addChild(SubSButton);
addChild(SubSetButton);
SubSButton.x = 615;
SubSButton.y = 315;
SubSetButton.x = 606;
SubSetButton.y = 323;
SubSetButton.width = 16;
SubSetButton.height = 15;
SubSButton.addEventListener(MouseEvent.CLICK, SubtitlesSwitch);
SubSetButton.addEventListener(MouseEvent.CLICK, SwitchSetBar);
SubtitleBox1.text = Lirics;
SubtitleBox2.text = Lirics;
channel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
SubtitleBox1.cacheAsBitmap = true;
SubtitleBox2.cacheAsBitmap = true;
SubSetButton.cacheAsBitmap = true;
wakaba.visible = false;
Timer1.addEventListener(TimerEvent.TIMER, runingText);
Timer2.addEventListener(TimerEvent.TIMER, AutoStep);
}
function frame4(){
stop();
Timer1.start();
Timer2.start();
}
function frame5(){
stop();
Timer1.stop();
Timer2.stop();
SoundMixer.stopAll();
removeChild(SubSButton);
removeChild(SubSetButton);
SubSButton.removeEventListener(MouseEvent.CLICK, SubtitlesSwitch);
SubSetButton.removeEventListener(MouseEvent.CLICK, SwitchSetBar);
Timer1.removeEventListener(TimerEvent.TIMER, runingText);
Timer2.removeEventListener(TimerEvent.TIMER, AutoStep);
gotoAndStop(7);
}
function frame6(){
gotoAndStop(7);
}
function frame7(){
stop();
}
function frame8(){
gotoAndStop(7);
}
}
}//package SleepinginMyCar_fla
Section 2
//SleepinginMyCar (SleepinginMyCar)
package {
import flash.media.*;
public dynamic class SleepinginMyCar extends Sound {
}
}//package
Section 3
//subOff (subOff)
package {
import flash.display.*;
public dynamic class subOff extends BitmapData {
public function subOff(_arg1:int=21, _arg2:int=15){
super(_arg1, _arg2);
}
}
}//package
Section 4
//subOn (subOn)
package {
import flash.display.*;
public dynamic class subOn extends BitmapData {
public function subOn(_arg1:int=21, _arg2:int=15){
super(_arg1, _arg2);
}
}
}//package
Section 5
//SubSet (SubSet)
package {
import flash.display.*;
public dynamic class SubSet extends MovieClip {
}
}//package
Section 6
//wakabaMark (wakabaMark)
package {
import flash.display.*;
public dynamic class wakabaMark extends MovieClip {
}
}//package