Section 1
//Elastic (fl.transitions.easing.Elastic)
package fl.transitions.easing {
public class Elastic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 3
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 4
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 5
//BuzzLogo_3 (MovieQuizClient_fla.BuzzLogo_3)
package MovieQuizClient_fla {
import flash.net.*;
import flash.display.*;
import flash.events.*;
public dynamic class BuzzLogo_3 extends MovieClip {
public var buzzLink:SimpleButton;
public function BuzzLogo_3(){
addFrameScript(0, frame1);
}
function frame1(){
buzzLink.addEventListener(MouseEvent.CLICK, gotoAuthorPage);
}
public function gotoAuthorPage(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://us.playstation.com/Buzz");
navigateToURL(_local2);
}
}
}//package MovieQuizClient_fla
Section 6
//PlayerChoises_81 (MovieQuizClient_fla.PlayerChoises_81)
package MovieQuizClient_fla {
import flash.display.*;
public dynamic class PlayerChoises_81 extends MovieClip {
public var trailer2:MovieClip;
public var trailer1:MovieClip;
public var playButton:MovieClip;
}
}//package MovieQuizClient_fla
Section 7
//quizFrame_2 (MovieQuizClient_fla.quizFrame_2)
package MovieQuizClient_fla {
import flash.display.*;
public dynamic class quizFrame_2 extends MovieClip {
public var buzzLink:MovieClip;
}
}//package MovieQuizClient_fla
Section 8
//Tween (mx.effects.Tween)
package mx.effects {
import flash.events.*;
import mx.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
public var duration:Number;// = 3000
private var id:int;
private var arrayMode:Boolean;
private var _isPlaying:Boolean;// = true
private var startValue:Object;
public var listener:Object;
private var userEquation:Function;
private var previousUpdateTime:Number;
var needToLayout:Boolean;// = false
private var updateFunction:Function;
private var _doSeek:Boolean;// = false
var startTime:Number;
private var endFunction:Function;
private var endValue:Object;
private var _doReverse:Boolean;// = false
private var _playheadTime:Number;// = 0
private var _invertValues:Boolean;// = false
private var maxDelay:Number;// = 87.5
private static var timer:Timer = null;
private static var interval:Number = 10;
private static var activeTweens:Array = [];
static var intervalTime:Number = NAN;
public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){
needToLayout = false;
maxDelay = 87.5;
_doSeek = false;
_isPlaying = true;
_doReverse = false;
userEquation = defaultEasingFunction;
duration = 3000;
_playheadTime = 0;
_invertValues = false;
super();
if (!_arg1){
return;
};
if ((_arg2 is Array)){
arrayMode = true;
};
this.listener = _arg1;
this.startValue = _arg2;
this.endValue = _arg3;
if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){
this.duration = _arg4;
};
if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){
maxDelay = (1000 / _arg5);
};
if (_arg4 == 0){
endTween();
} else {
Tween.addTween(this);
};
}
public function pause():void{
_isPlaying = false;
}
function get playheadTime():Number{
return (_playheadTime);
}
function get playReversed():Boolean{
return (_invertValues);
}
public function resume():void{
_isPlaying = true;
startTime = (intervalTime - _playheadTime);
if (_doReverse){
reverse();
_doReverse = false;
};
}
public function setTweenHandlers(_arg1:Function, _arg2:Function):void{
this.updateFunction = _arg1;
this.endFunction = _arg2;
}
function set playReversed(_arg1:Boolean):void{
_invertValues = _arg1;
}
public function set easingFunction(_arg1:Function):void{
userEquation = _arg1;
}
private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2));
}
public function endTween():void{
var _local1:TweenEvent;
var _local2:Object;
_local1 = new TweenEvent(TweenEvent.TWEEN_END);
_local2 = getCurrentValue(duration);
_local1.value = _local2;
dispatchEvent(_local1);
if (endFunction != null){
endFunction(_local2);
} else {
listener.onTweenEnd(_local2);
};
Tween.removeTweenAt(id);
}
public function reverse():void{
if (_isPlaying){
_doReverse = false;
seek((duration - _playheadTime));
_invertValues = !(_invertValues);
} else {
_doReverse = !(_doReverse);
};
}
function doInterval():Boolean{
var _local1:Boolean;
var _local2:Number;
var _local3:Object;
var _local4:TweenEvent;
_local1 = false;
previousUpdateTime = intervalTime;
if (((_isPlaying) || (_doSeek))){
_local2 = (intervalTime - startTime);
_playheadTime = _local2;
_local3 = getCurrentValue(_local2);
if ((((_local2 >= duration)) && (!(_doSeek)))){
endTween();
_local1 = true;
} else {
_local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE);
_local4.value = _local3;
dispatchEvent(_local4);
if (updateFunction != null){
updateFunction(_local3);
} else {
listener.onTweenUpdate(_local3);
};
};
_doSeek = false;
};
return (_local1);
}
public function seek(_arg1:Number):void{
var _local2:Number;
_local2 = intervalTime;
previousUpdateTime = _local2;
startTime = (_local2 - _arg1);
_doSeek = true;
}
function getCurrentValue(_arg1:Number):Object{
var _local2:Array;
var _local3:int;
var _local4:int;
if (_invertValues){
_arg1 = (duration - _arg1);
};
if (arrayMode){
_local2 = [];
_local3 = startValue.length;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration);
_local4++;
};
return (_local2);
//unresolved jump
};
return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration));
}
static function removeTween(_arg1:Tween):void{
removeTweenAt(_arg1.id);
}
private static function addTween(_arg1:Tween):void{
_arg1.id = activeTweens.length;
activeTweens.push(_arg1);
if (!timer){
timer = new Timer(interval);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
} else {
timer.start();
};
if (isNaN(intervalTime)){
intervalTime = getTimer();
};
_arg1.startTime = (_arg1.previousUpdateTime = intervalTime);
}
private static function timerHandler(_arg1:TimerEvent):void{
var _local2:Boolean;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:Tween;
_local2 = false;
_local3 = intervalTime;
intervalTime = getTimer();
_local4 = activeTweens.length;
_local5 = _local4;
while (_local5 >= 0) {
_local6 = Tween(activeTweens[_local5]);
if (_local6){
_local6.needToLayout = false;
_local6.doInterval();
if (_local6.needToLayout){
_local2 = true;
};
};
_local5--;
};
if (_local2){
_arg1.updateAfterEvent();
};
}
private static function removeTweenAt(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:Tween;
if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){
return;
};
activeTweens.splice(_arg1, 1);
_local2 = activeTweens.length;
_local3 = _arg1;
while (_local3 < _local2) {
_local4 = Tween(activeTweens[_local3]);
_local4.id--;
_local3++;
};
if (_local2 == 0){
intervalTime = NaN;
timer.reset();
};
}
}
}//package mx.effects
Section 9
//TweenEvent (mx.events.TweenEvent)
package mx.events {
import flash.events.*;
public class TweenEvent extends Event {
public var value:Object;
public static const TWEEN_UPDATE:String = "tweenUpdate";
public static const TWEEN_END:String = "tweenEnd";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){
super(_arg1, _arg2, _arg3);
this.value = _arg4;
}
override public function clone():Event{
return (new TweenEvent(type, bubbles, cancelable, value));
}
}
}//package mx.events
Section 10
//MediaControlsEvent (se.rocketxl.mediaplayer.events.MediaControlsEvent)
package se.rocketxl.mediaplayer.events {
import flash.events.*;
public class MediaControlsEvent extends Event {
public static var HIDE_SHARE_PANEL:String = "hideSharePanel";
public static var SEND_TO_A_FRIEND:String = "sendToaFriend";
public static var START_360_ROTATION:String = "start360Rotation";
public static var SKIP_MOVIE:String = "skipMovie";
public static var SHOW_SHARE_PANEL:String = "shoeSharePanel";
public static var DOWNLOAD_MEDIA:String = "downloadMedia";
public static var GET_CODE:String = "getCode";
public static var VIEW_TOP_TEN:String = "viewTopTen";
public static var LIST_ACTIVATION_OVER:String = "listaCTIVATIONoVER";
public static var SIGNUP:String = "signup";
public function MediaControlsEvent(_arg1:String){
super(_arg1);
}
}
}//package se.rocketxl.mediaplayer.events
Section 11
//MediaItemEvent (se.rocketxl.mediaplayer.events.MediaItemEvent)
package se.rocketxl.mediaplayer.events {
import flash.events.*;
public class MediaItemEvent extends Event {
public static var ITEM_LOAD_COMPLETE:String = "itemLoadComplete";
public static var ITEM_SELECTED:String = "itemSelected";
public static var ITEM_LOAD_PROGRESS:String = "itemLoadProgress";
public function MediaItemEvent(_arg1:String){
super(_arg1);
}
}
}//package se.rocketxl.mediaplayer.events
Section 12
//VideoViewerEvent (se.rocketxl.mediaplayer.events.VideoViewerEvent)
package se.rocketxl.mediaplayer.events {
import flash.events.*;
public class VideoViewerEvent extends Event {
public static var VIDEO_FINISHED:String = "videoFinished";
public function VideoViewerEvent(_arg1:String){
super(_arg1);
}
}
}//package se.rocketxl.mediaplayer.events
Section 13
//VideoItem (se.rocketxl.mediaplayer.videoviewer.VideoItem)
package se.rocketxl.mediaplayer.videoviewer {
import flash.events.*;
import se.rocketxl.mediaplayer.*;
public dynamic class VideoItem extends MediaItem {
public function VideoItem(_arg1:XML, _arg2:VideoList){
super(_arg1, _arg2);
}
override public function onSelectItem(_arg1:MouseEvent){
super.onSelectItem(_arg1);
}
public function getVideoUrl():String{
return (_mediaurl);
}
}
}//package se.rocketxl.mediaplayer.videoviewer
Section 14
//VideoList (se.rocketxl.mediaplayer.videoviewer.VideoList)
package se.rocketxl.mediaplayer.videoviewer {
import se.rocketxl.mediaplayer.*;
import se.rocketxl.mediaplayer.events.*;
public dynamic class VideoList extends MediaList {
public function VideoList(){
mediaListDisplay = this["videoListDisplay"];
activateListArea = this["activationArea"];
activeListArea = this["activeArea"];
initEventListener();
}
public function setVolume(_arg1:Number){
_mediaViewer.setVolume(_arg1);
}
override public function addListItems(_arg1:XMLList):void{
var _local2:XML;
var _local3:*;
mediaList = new Array();
for each (_local2 in _arg1..video) {
_local3 = new VideoItem(_local2, this);
_local3.addEventListener(MediaItemEvent.ITEM_SELECTED, onMediaItemSelected);
mediaList[mediaList.length] = _local3;
};
if (mediaList.length > 0){
mediaListDisplay.setMedia(mediaList);
};
}
public function startPlayingFirstVideo(){
mediaIndex = 0;
if (((!((mediaList == null))) && ((mediaList.length > 0)))){
mediaList[mediaIndex].onSelectItem(null);
};
}
override public function setMediaViewer(_arg1:MediaViewer):void{
super.setMediaViewer(_arg1);
if (_mediaControls != null){
_mediaViewer.setMediaControls(_mediaControls);
};
}
override public function setMediaControls(_arg1:MediaControls):void{
super.setMediaControls(_arg1);
if (_mediaViewer != null){
_mediaViewer.setMediaControls(_mediaControls);
};
}
}
}//package se.rocketxl.mediaplayer.videoviewer
Section 15
//VideoViewer (se.rocketxl.mediaplayer.videoviewer.VideoViewer)
package se.rocketxl.mediaplayer.videoviewer {
import flash.net.*;
import flash.display.*;
import flash.events.*;
import se.rocketxl.mediaplayer.*;
import se.rocketxl.mediaplayer.events.*;
import flash.utils.*;
import flash.media.*;
import se.rocketxl.util.*;
public dynamic class VideoViewer extends MediaViewer {
var filePlaying:Boolean;// = false
protected var _skipButton:MovieClip;// = null
public var background:MovieClip;
var _content:Sprite;
var _postMoveText:PostMovieText;
var videoWindow:Video;
var netConnection:NetConnection;
var netStream:NetStream;// = null
var scrubandLoadTimer:Timer;
var duration:Number;// = -1
var playFinished:Function;// = null
var _mediaContorls:MediaControls;
var playMode:String;
public static var VIDEO_FINISHED:String = "VideoFinished";
public static var VIDEO_PAUSED:String = "VideoPaused";
public static var VIDEO_PLAYING:String = "VideoPlaying";
public function VideoViewer(){
netStream = null;
filePlaying = false;
duration = -1;
playFinished = null;
_skipButton = null;
super();
if (this.hasOwnProperty("content")){
_content = this["content"];
} else {
_content = this;
};
if (this.hasOwnProperty("postMoveText")){
_postMoveText = this["postMoveText"];
} else {
_postMoveText = null;
};
videoWindow = new Video(backgrnd.width, backgrnd.height);
_content.addChild(videoWindow);
_loadIndicator = new LeafLoader();
_content.addChild(_loadIndicator);
_loadIndicator.visible = false;
if (backgrnd != null){
_loadIndicator.x = (backgrnd.width / 2);
_loadIndicator.y = (backgrnd.height / 2);
};
netConnection = new NetConnection();
netConnection.connect(null);
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netStream = new NetStream(netConnection);
netStream.client = this;
netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netStream.bufferTime = 1;
videoWindow.attachNetStream(netStream);
scrubandLoadTimer = new Timer(100);
scrubandLoadTimer.addEventListener(TimerEvent.TIMER, onScrubTimer);
if (this.hasOwnProperty("skipButton")){
_skipButton = this["skipButton"];
_skipButton.addEventListener(MouseEvent.MOUSE_UP, onSkipMedia);
};
}
public function setVolume(_arg1:Number){
var _local2:SoundTransform;
if (netStream != null){
_local2 = new SoundTransform();
_local2.volume = _arg1;
netStream.soundTransform = _local2;
};
}
public function onCuePoint(_arg1:Object):void{
trace("On cue point");
}
public function clearStream(){
if (netStream != null){
netStream.close();
};
scrubandLoadTimer.stop();
}
public function onReplaySelect(){
if (netStream != null){
netStream.seek(0);
netStream.resume();
filePlaying = true;
_mediaContorls.setPlaybuttonMode(VIDEO_PLAYING);
};
}
public function onMetaData(_arg1:Object):void{
duration = _arg1.duration;
}
public function netStatusHandler(_arg1:NetStatusEvent){
if ((((_arg1.info.code == "NetStream.Buffer.Empty")) && (filePlaying))){
trace(("Buffer size: " + netStream.bufferTime));
netStream.bufferTime = (netStream.bufferTime + netStream.bufferTime);
};
if (_arg1.info.code == "NetStream.Play.Start"){
filePlaying = true;
if (_mediaContorls != null){
_mediaContorls.setPlaybuttonMode(VIDEO_PLAYING);
};
playMode = VIDEO_PLAYING;
_loadIndicator.stopLoaderIcon();
_loadIndicator.visible = false;
};
if (_arg1.info.code == "NetStream.Play.Stop"){
if (((((!((_activeMediaItem == null))) && (!((_activeMediaItem.postVideoText == null))))) && (!((_postMoveText == null))))){
_postMoveText.setText(_activeMediaItem.postVideoText);
};
filePlaying = false;
if (_mediaContorls != null){
_mediaContorls.setPlaybuttonMode(VIDEO_FINISHED);
};
dispatchEvent(new VideoViewerEvent(VideoViewerEvent.VIDEO_FINISHED));
};
if (_arg1.info.code == "NetStream.Seek.Notify"){
filePlaying = true;
if (_mediaContorls != null){
_mediaContorls.setPlaybuttonMode(playMode);
};
};
if (_arg1.info.code == "NetStream.Seek.InvalidTime"){
filePlaying = false;
if (_mediaContorls != null){
_mediaContorls.setPlaybuttonMode(VIDEO_FINISHED);
};
};
}
override public function setMediaControls(_arg1:MediaControls):void{
_mediaContorls = _arg1;
_mediaContorls.setMediaViewer(this);
_mediaContorls.addEventListener(MediaControlsEvent.SKIP_MOVIE, onSkipMedia);
}
public function onPauseSelect(){
if (netStream != null){
netStream.pause();
_mediaContorls.setPlaybuttonMode(VIDEO_PAUSED);
playMode = VIDEO_PAUSED;
};
}
public function onSkipMedia(_arg1:MediaControlsEvent){
netStream.close();
dispatchEvent(new VideoViewerEvent(VideoViewerEvent.VIDEO_FINISHED));
}
override public function playVideo(_arg1:String){
netStream.play(_arg1);
scrubandLoadTimer.start();
}
public function onScrubTimer(_arg1:TimerEvent){
if (((!((_mediaContorls == null))) && (!((netStream == null))))){
if (duration != -1){
_mediaContorls.uppdateScrubber((netStream.time / duration));
};
_mediaContorls.uppdateLoader((netStream.bytesLoaded / netStream.bytesTotal));
};
if (netStream != null){
dispatchEvent(new ProgressEvent("onVideoLoadProgress", false, false, netStream.bytesLoaded, netStream.bytesTotal));
};
}
public function onPlaySelect(){
if (netStream != null){
netStream.resume();
_mediaContorls.setPlaybuttonMode(VIDEO_PLAYING);
playMode = VIDEO_PLAYING;
};
}
public function seekPosition(_arg1:Number){
var _local2:Number;
if (netStream != null){
_local2 = (_arg1 * duration);
if (_local2 >= duration){
_local2 = (duration - 1);
};
netStream.seek(_local2);
};
}
public function isPlaying():Boolean{
return ((playMode == VIDEO_PLAYING));
}
override public function setMediaItem(_arg1:MediaItem){
var _local2:VideoItem;
_activeMediaItem = _arg1;
if (_titleText != null){
_titleText.setText(_activeMediaItem.title);
};
_local2 = (_activeMediaItem as VideoItem);
playVideo(_local2.getVideoUrl());
_loadIndicator.startLoaderIcon();
_loadIndicator.visible = true;
}
}
}//package se.rocketxl.mediaplayer.videoviewer
Section 16
//MediaActivationButton (se.rocketxl.mediaplayer.MediaActivationButton)
package se.rocketxl.mediaplayer {
import flash.display.*;
import flash.events.*;
public dynamic class MediaActivationButton extends Sprite {
protected var _activationButton:MovieClip;// = null
public function MediaActivationButton(){
_activationButton = null;
super();
buttonMode = true;
addEventListener(MouseEvent.MOUSE_UP, onActivateList);
}
public function extractandSetupActivationButton(){
}
public function onActivateList(_arg1:MouseEvent){
dispatchEvent(new Event("activateList"));
}
}
}//package se.rocketxl.mediaplayer
Section 17
//MediaControls (se.rocketxl.mediaplayer.MediaControls)
package se.rocketxl.mediaplayer {
import flash.display.*;
import flash.events.*;
import se.rocketxl.mediaplayer.events.*;
import se.rocketxl.util.transitions.*;
public dynamic class MediaControls extends Sprite {
protected var _nextButtonTransition:AlphaTransition;
protected var _mediaList:MediaList;
protected var _downloadButtonTransition:AlphaTransition;
protected var _previousButton:MovieClip;// = null
protected var _previousButtonTransition:AlphaTransition;
protected var _nextButton:MovieClip;// = null
protected var _downloadButton:MovieClip;// = null
public function MediaControls(){
_previousButton = null;
_nextButton = null;
_downloadButton = null;
super();
if (this.hasOwnProperty("previousButton")){
_previousButton = this["previousButton"];
_previousButton.buttonMode = true;
_previousButton.alpha = 0;
_previousButtonTransition = new AlphaTransition(_previousButton, 0, 1);
_previousButtonTransition.gotoState(AlphaTransition.FIRST_ALPHA);
_previousButton.addEventListener(MouseEvent.MOUSE_UP, onPreviousItem);
_previousButton.addEventListener(MouseEvent.MOUSE_OVER, onPreviousOver);
_previousButton.addEventListener(MouseEvent.MOUSE_OUT, onPreviousOut);
};
if (this.hasOwnProperty("nextButton")){
_nextButton = this["nextButton"];
_nextButton.buttonMode = true;
_nextButton.alpha = 0;
_nextButtonTransition = new AlphaTransition(_nextButton, 0, 1);
_nextButtonTransition.gotoState(AlphaTransition.FIRST_ALPHA);
_nextButton.addEventListener(MouseEvent.MOUSE_UP, onNextItem);
_nextButton.addEventListener(MouseEvent.MOUSE_OVER, onNextOver);
_nextButton.addEventListener(MouseEvent.MOUSE_OUT, onNextOut);
};
if (this.hasOwnProperty("downloadButton")){
_downloadButton = this["downloadButton"];
_downloadButton.buttonMode = true;
_downloadButton.alpha = 0;
_downloadButtonTransition = new AlphaTransition(_downloadButton, 0, 1);
_downloadButtonTransition.changeVisibility(true);
_downloadButtonTransition.gotoState(AlphaTransition.FIRST_ALPHA);
_downloadButton.addEventListener(MouseEvent.MOUSE_UP, onDownloadMedia);
};
}
public function onPreviousItem(_arg1:MouseEvent){
}
public function showDownloadButton(){
if (_downloadButton != null){
_downloadButtonTransition.gotoState(AlphaTransition.SECOND_ALPHA);
};
}
public function setMediaViewer(_arg1:MediaViewer){
}
public function onNextOver(_arg1:MouseEvent){
if (_mediaList.hasNext()){
_nextButtonTransition.gotoState(AlphaTransition.SECOND_ALPHA);
_nextButton.buttonMode = true;
} else {
_nextButton.buttonMode = false;
};
}
public function setMediaList(_arg1:MediaList){
_mediaList = _arg1;
}
public function onNextOut(_arg1:MouseEvent){
_nextButtonTransition.gotoState(AlphaTransition.FIRST_ALPHA);
}
public function onPreviousOut(_arg1:MouseEvent){
_previousButtonTransition.gotoState(AlphaTransition.FIRST_ALPHA);
}
public function onNextItem(_arg1:MouseEvent){
}
public function onDownloadMedia(_arg1:MouseEvent){
dispatchEvent(new MediaControlsEvent(MediaControlsEvent.DOWNLOAD_MEDIA));
}
public function hideDownloadButton(){
if (_downloadButton != null){
_downloadButtonTransition.gotoState(AlphaTransition.FIRST_ALPHA);
};
}
public function onPreviousOver(_arg1:MouseEvent){
if (_mediaList.hasPrevious()){
_previousButtonTransition.gotoState(AlphaTransition.SECOND_ALPHA);
_previousButton.buttonMode = true;
} else {
_previousButton.buttonMode = false;
};
}
}
}//package se.rocketxl.mediaplayer
Section 18
//MediaItem (se.rocketxl.mediaplayer.MediaItem)
package se.rocketxl.mediaplayer {
import flash.net.*;
import flash.display.*;
import flash.events.*;
import se.rocketxl.mediaplayer.events.*;
import se.rocketxl.track.*;
import se.rocketxl.util.transitions.*;
public class MediaItem extends Sprite {
protected var _mediaList:MediaList;
protected var thumbImage:Bitmap;// = null
protected var _active:Boolean;// = false
var _highlight:MovieClip;// = null
protected var _downloadurl:String;
protected var _thumburl:String;
var MIN_DISTANCE:Number;// = 20
protected var _mediaurl:String;
protected var _title:String;
var _startX:Number;
var MAX_DISTANCE:Number;// = 90
public var postVideoText:String;// = ""
protected var thumbLoader:Loader;// = null
var _mouseOver:MovingFrame;// = null
protected var _highlightTransition:AlphaTransition;// = null
protected var _thumbLoaded:Boolean;// = false
protected var actionId:String;
public function MediaItem(_arg1:XML, _arg2:MediaList){
MAX_DISTANCE = 90;
MIN_DISTANCE = 20;
postVideoText = "";
thumbLoader = null;
thumbImage = null;
_thumbLoaded = false;
_active = false;
_highlight = null;
_mouseOver = null;
_highlightTransition = null;
super();
_thumburl = _arg1.@thumburl;
_mediaList = _arg2;
_mediaurl = _arg1.@mediaurl;
_downloadurl = _arg1.@downloadurl;
_title = _arg1.@title;
actionId = _arg1.@action;
postVideoText = _arg1.attribute("postvideo");
thumbImage = new Bitmap();
if (this.hasOwnProperty("content")){
this["content"].addChild(thumbImage);
};
if (this.hasOwnProperty("highlight")){
_highlight = this["highlight"];
_highlight.alpha = 0;
_highlightTransition = new AlphaTransition(_highlight, 0, 1);
_highlightTransition.firstDuration = 500;
_highlightTransition.secondDuration = 100;
_highlightTransition.gotoState(AlphaTransition.FIRST_ALPHA);
};
if (this.hasOwnProperty("mouseOver")){
_mouseOver = this["mouseOver"];
};
}
public function isThumbLoaded():Boolean{
return (_thumbLoaded);
}
public function onLoadFirstItem(_arg1:MouseEvent){
setActive(true);
dispatchEvent(new MediaItemEvent(MediaItemEvent.ITEM_SELECTED));
}
public function setActive(_arg1:Boolean){
_active = _arg1;
if (_highlightTransition != null){
if (_active){
_highlightTransition.gotoState(AlphaTransition.SECOND_ALPHA);
if (_mouseOver != null){
_mouseOver.hideFrame();
};
} else {
_highlightTransition.gotoState(AlphaTransition.FIRST_ALPHA);
};
};
}
public function onThumbLoaded(_arg1:Event){
thumbImage.bitmapData = Bitmap(thumbLoader.content).bitmapData;
addEventListener(MouseEvent.MOUSE_UP, onSelectItem);
if (_highlight != null){
addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
};
_mediaList.thumbLoaded(this);
}
public function get title(){
return (_title);
}
public function onThumbIOError(_arg1:IOErrorEvent){
trace(("Error LoadingThumb: " + _thumburl));
}
public function onSelectItem(_arg1:MouseEvent){
Track.trackAction(actionId);
setActive(true);
dispatchEvent(new MediaItemEvent(MediaItemEvent.ITEM_SELECTED));
}
public function onMouseOut(_arg1:MouseEvent){
if (((!(_active)) && (!((_mouseOver == null))))){
_mouseOver.hideFrame();
};
}
public function set startX(_arg1:Number){
_startX = _arg1;
}
public function setSize(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
this.x = _startX;
this.scaleX = (this.scaleY = 1);
_local1 = (this.mouseX - (this["background"].width / 2));
_local2 = (this.mouseY + (this["background"].height / 2));
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 < MIN_DISTANCE){
_local3 = MIN_DISTANCE;
};
if (_local3 > MAX_DISTANCE){
_local3 = MAX_DISTANCE;
};
_local3 = ((_local3 - MIN_DISTANCE) + (MAX_DISTANCE - MIN_DISTANCE));
_local3 = (_local3 / ((MAX_DISTANCE - MIN_DISTANCE) * 2));
this.scaleX = (this.scaleY = (1.5 - _local3));
}
public function getDownloadURL(){
return (_downloadurl);
}
public function loadThumb(){
if (thumbLoader == null){
thumbLoader = new Loader();
};
_thumbLoaded = true;
thumbLoader.load(new URLRequest(_thumburl));
thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onThumbLoaded);
thumbLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onThumbIOError);
}
public function hasDownloadMedia():Boolean{
return (!((_downloadurl == "")));
}
public function onMouseOver(_arg1:MouseEvent){
if (((!(_active)) && (!((_mouseOver == null))))){
_mouseOver.showFrame();
};
}
}
}//package se.rocketxl.mediaplayer
Section 19
//MediaList (se.rocketxl.mediaplayer.MediaList)
package se.rocketxl.mediaplayer {
import flash.net.*;
import flash.display.*;
import flash.events.*;
import se.rocketxl.mediaplayer.events.*;
public dynamic class MediaList extends Sprite {
protected var _mediaViewer:MediaViewer;
protected var mediaIndex:int;// = 0
protected var activeListArea:MovieClip;
protected var activateListArea:MovieClip;
protected var mediaList:Array;// = null
protected var _mediaControls:MediaControls;// = null
protected var mediaListDisplay:MediaListDisplay;
protected var activated:Boolean;// = false
protected var _mediaActivationButton:MediaActivationButton;// = null
public function MediaList(){
mediaList = null;
mediaIndex = 0;
_mediaControls = null;
_mediaActivationButton = null;
activated = false;
super();
}
public function mediaLoaded(_arg1:MediaItem):void{
}
public function isMouseInActiveArea():Boolean{
return ((((((((activeListArea.mouseX >= 0)) && ((activeListArea.mouseY >= 0)))) && ((activeListArea.mouseX <= activeListArea.width)))) && ((activeListArea.mouseY <= activeListArea.height))));
}
public function checkForDownloadMedia(){
if (_mediaControls != null){
if (mediaList[mediaIndex].hasDownloadMedia()){
_mediaControls.showDownloadButton();
} else {
_mediaControls.hideDownloadButton();
};
};
}
public function getIndex(_arg1:MediaItem):int{
var _local2:int;
_local2 = 0;
while (_local2 < mediaList.length) {
if (_arg1 == mediaList[_local2]){
return (_local2);
};
_local2++;
};
return (-1);
}
public function initEventListener(){
activateListArea.addEventListener(MouseEvent.MOUSE_MOVE, onActivateImageList);
}
public function addListItems(_arg1:XMLList):void{
}
public function setMediaViewer(_arg1:MediaViewer):void{
_mediaViewer = _arg1;
_mediaViewer.setMediaList(this);
}
public function startLoadingThumbs(){
if (((!((mediaList == null))) && ((mediaList.length > 0)))){
mediaList[mediaIndex].loadThumb();
};
}
public function thumbLoaded(_arg1:MediaItem){
var _local2:Boolean;
var _local3:int;
_local2 = false;
_local3 = 0;
while (!(_local2)) {
if (!mediaList[_local3].isThumbLoaded()){
mediaList[_local3].loadThumb();
_local2 = true;
};
_local3++;
if (_local3 >= mediaList.length){
_local2 = true;
};
};
}
public function setMediaControls(_arg1:MediaControls):void{
_mediaControls = _arg1;
_mediaControls.setMediaList(this);
_mediaControls.addEventListener(MediaControlsEvent.DOWNLOAD_MEDIA, onDownloadMedia);
}
public function onListActivationOver(_arg1:MediaControlsEvent){
activated = false;
}
public function onDownloadMedia(_arg1:MediaControlsEvent){
if (mediaList[mediaIndex].hasDownloadMedia()){
navigateToURL(new URLRequest(mediaList[mediaIndex].getDownloadURL()), "_blank");
};
}
public function hasNext():Boolean{
return ((mediaIndex < (mediaList.length - 1)));
}
public function onActivateList(_arg1:Event){
}
public function onMediaItemSelected(_arg1:MediaItemEvent){
var _local2:*;
_local2 = mediaIndex;
mediaIndex = getIndex((_arg1.target as MediaItem));
if (_local2 != mediaIndex){
mediaList[_local2].setActive(false);
};
checkForDownloadMedia();
if (_mediaViewer != null){
_mediaViewer.setMediaItem((_arg1.target as MediaItem));
} else {
trace("No mediaViewer");
};
dispatchEvent(new Event("mediaItemSelected"));
}
public function setMediaActivationButton(_arg1:MediaActivationButton):void{
_mediaActivationButton = _arg1;
_mediaActivationButton.addEventListener("activateList", onActivateList);
}
public function hasPrevious():Boolean{
return ((mediaIndex > 0));
}
public function onActivateImageList(_arg1:MouseEvent){
if (mediaList != null){
if (mediaList.length > 1){
activateListArea.removeEventListener(MouseEvent.MOUSE_MOVE, onActivateImageList);
this.addEventListener(Event.ENTER_FRAME, onActivImageList);
mediaListDisplay.showDisplayList();
};
};
}
public function onActivImageList(_arg1:Event){
if (((isMouseInActiveArea()) || (activated))){
mediaListDisplay.updateBarPosition();
} else {
mediaListDisplay.hideDisplayList();
this.removeEventListener(Event.ENTER_FRAME, onActivImageList);
activateListArea.addEventListener(MouseEvent.MOUSE_MOVE, onActivateImageList);
};
}
public function activate(){
if (((!((mediaListDisplay == null))) && ((mediaList.length > 1)))){
activated = true;
mediaListDisplay.activate();
mediaListDisplay.addEventListener(MediaControlsEvent.LIST_ACTIVATION_OVER, onListActivationOver);
activateListArea.removeEventListener(MouseEvent.MOUSE_MOVE, onActivateImageList);
this.addEventListener(Event.ENTER_FRAME, onActivImageList);
};
}
}
}//package se.rocketxl.mediaplayer
Section 20
//MediaListDisplay (se.rocketxl.mediaplayer.MediaListDisplay)
package se.rocketxl.mediaplayer {
import flash.display.*;
import flash.events.*;
import se.rocketxl.mediaplayer.events.*;
import se.rocketxl.util.transitions.*;
import flash.utils.*;
public class MediaListDisplay extends Sprite {
protected var activatedTimer:Timer;
protected var backgrnd:MovieClip;
protected var mediaBar:Sprite;
protected var thumbWidth:Number;
protected var thumbHeight:Number;
protected var startYPos:Number;
protected var mediaList:Array;
protected var yPosTransition:YPositionTransition;
protected var activated:Boolean;// = false
protected static var ITEM_SPACING:Number = 10;
protected static var SHOW_ANIMATION_TIME:int = 500;
protected static var ITEMBAR_PADING:Number = 10;
public function MediaListDisplay(){
activated = false;
super();
startYPos = this.y;
mediaList = new Array();
mediaBar = new Sprite();
addChild(mediaBar);
backgrnd = this["background"];
yPosTransition = new YPositionTransition(this, startYPos, (startYPos - backgrnd.height));
yPosTransition.duration = 400;
yPosTransition.gotoState(YPositionTransition.FIRST_YPOS);
activatedTimer = new Timer(5000, 1);
activatedTimer.addEventListener(TimerEvent.TIMER, onActivationTimer);
}
public function showDisplayList():void{
if (!activated){
yPosTransition.gotoState(YPositionTransition.SECOND_YPOS);
};
}
public function addMediaToDisplay(){
var _local1:Number;
var _local2:MediaItem;
thumbWidth = mediaList[0].width;
thumbHeight = mediaList[0].height;
mediaBar.y = ((backgrnd.height / 4) * 3);
_local1 = 0;
for each (_local2 in mediaList) {
mediaBar.addChild(_local2);
_local2.scaleX = (_local2.scaleY = 0.5);
_local2.x = _local1;
_local2.startX = _local1;
_local1 = (_local1 + (ITEM_SPACING + _local2.width));
};
setMediaBarPos();
}
public function getMouseDeltaX():Number{
var _local1:Number;
_local1 = (backgrnd.mouseX - ITEMBAR_PADING);
if (_local1 < 0){
_local1 = 0;
};
if (_local1 > (backgrnd.width - (ITEMBAR_PADING * 2))){
_local1 = (backgrnd.width - (ITEMBAR_PADING * 2));
};
_local1 = (_local1 / (backgrnd.width - (ITEMBAR_PADING * 2)));
return (_local1);
}
public function setMediaBarPos(){
mediaBar.x = ((backgrnd.width / 2) - (mediaBar.width / 2));
}
public function clearList(){
var _local1:MediaItem;
if (mediaList != null){
for each (_local1 in mediaList) {
mediaBar.removeChild(_local1);
};
};
}
public function setMedia(_arg1:Array):void{
clearList();
this.mediaList = _arg1;
addMediaToDisplay();
}
public function getSmalMediaBarWidth():Number{
return ((((mediaList.length - 1) * ((thumbWidth * 0.5) + ITEM_SPACING)) + (thumbWidth * 0.5)));
}
public function updateBarPosition():void{
var _local1:Number;
var _local2:Number;
_local1 = getSmalMediaBarWidth();
_local2 = ((_local1 - backgrnd.width) + (ITEMBAR_PADING * 2));
if (_local2 < 0){
_local2 = 0;
};
_local2 = ((_local2 * getMouseDeltaX()) - (_local2 / 2));
_local2 = (((backgrnd.width / 2) - (_local1 / 2)) - _local2);
mediaBar.x = _local2;
setItemSizes();
mediaBar.x = (_local2 - (getMouseDeltaX() * (mediaBar.width - _local1)));
}
public function hideDisplayList():void{
if (!activated){
yPosTransition.gotoState(YPositionTransition.FIRST_YPOS);
};
}
public function onActivationTimer(_arg1:TimerEvent){
activated = false;
dispatchEvent(new MediaControlsEvent(MediaControlsEvent.LIST_ACTIVATION_OVER));
}
public function activate(){
activated = true;
yPosTransition.gotoState(YPositionTransition.SECOND_YPOS);
activatedTimer.reset();
activatedTimer.start();
}
public function setItemSizes(){
var _local1:Number;
var _local2:MediaItem;
_local1 = 0;
for each (_local2 in mediaList) {
_local2.setSize();
_local2.x = _local1;
_local1 = (_local1 + (ITEM_SPACING + _local2.width));
};
}
}
}//package se.rocketxl.mediaplayer
Section 21
//MediaTitle (se.rocketxl.mediaplayer.MediaTitle)
package se.rocketxl.mediaplayer {
import flash.display.*;
import flash.events.*;
import mx.effects.*;
import flash.utils.*;
import flash.text.*;
public dynamic class MediaTitle extends Sprite {
protected var _titleText:TextField;
var alphaTween:Tween;// = null
protected var visibleTimer:Timer;
public function MediaTitle(){
alphaTween = null;
super();
this.visible = false;
_titleText = this["titleText"];
visibleTimer = new Timer(5000, 1);
visibleTimer.addEventListener(TimerEvent.TIMER, onHideTitle);
}
public function onHideTitle(_arg1:TimerEvent){
if (alphaTween != null){
alphaTween.pause();
alphaTween = null;
};
alphaTween = new Tween(this, this.alpha, 0, 500);
alphaTween.setTweenHandlers(onTween, onTweenEnd);
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
}
public function setText(_arg1:String){
if (alphaTween != null){
alphaTween.pause();
alphaTween = null;
};
alphaTween = new Tween(this, this.alpha, 1, 500);
alphaTween.setTweenHandlers(onTween, onTweenEnd);
_titleText.text = _arg1;
this.visible = true;
visibleTimer.reset();
visibleTimer.start();
}
public function onTween(_arg1:Number){
this.alpha = _arg1;
}
}
}//package se.rocketxl.mediaplayer
Section 22
//MediaViewer (se.rocketxl.mediaplayer.MediaViewer)
package se.rocketxl.mediaplayer {
import flash.display.*;
import se.rocketxl.util.*;
public dynamic class MediaViewer extends Sprite {
protected var _mediaList:MediaList;// = null
protected var _titleText:MediaTitle;// = null
protected var backgrnd:MovieClip;// = null
protected var _activeMediaItem:MediaItem;// = null
protected var _loadIndicator:LeafLoader;// = null
public function MediaViewer(){
_mediaList = null;
_activeMediaItem = null;
backgrnd = null;
_loadIndicator = null;
_titleText = null;
super();
if (hasOwnProperty("background")){
backgrnd = this["background"];
};
if (this.hasOwnProperty("titleText")){
_titleText = this["titleText"];
};
}
public function setMediaList(_arg1:MediaList):void{
_mediaList = _arg1;
}
public function setMediaControls(_arg1:MediaControls):void{
}
public function playVideo(_arg1:String){
}
public function setMediaItem(_arg1:MediaItem){
}
}
}//package se.rocketxl.mediaplayer
Section 23
//MovingFrame (se.rocketxl.mediaplayer.MovingFrame)
package se.rocketxl.mediaplayer {
import flash.display.*;
import mx.effects.*;
public dynamic class MovingFrame extends Sprite {
var topStartY:Number;
var leftStartX:Number;
var _bottomEdge:MovieClip;// = null
var bottomStartY:Number;
var slideTween:Tween;// = null
var currentValue:Number;// = 0
var _topEdge:MovieClip;// = null
var rightStartX:Number;
var _rightEdge:MovieClip;// = null
var _leftEdge:MovieClip;// = null
public function MovingFrame(){
_topEdge = null;
_bottomEdge = null;
_leftEdge = null;
_rightEdge = null;
slideTween = null;
currentValue = 0;
super();
_topEdge = this["topEdge"];
topStartY = _topEdge.y;
_bottomEdge = this["bottomEdge"];
bottomStartY = _bottomEdge.y;
_leftEdge = this["leftEdge"];
leftStartX = _leftEdge.x;
_rightEdge = this["rightEdge"];
rightStartX = _rightEdge.x;
}
public function hideFrame(){
if (slideTween != null){
slideTween.pause();
slideTween = null;
};
slideTween = new Tween(this, currentValue, 0, 500);
slideTween.setTweenHandlers(onTween, onTweenEnd);
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
slideTween = null;
}
public function showFrame(){
if (slideTween != null){
slideTween.pause();
slideTween = null;
};
slideTween = new Tween(this, currentValue, 3, 200);
slideTween.setTweenHandlers(onTween, onTweenEnd);
}
public function onTween(_arg1:Number){
currentValue = _arg1;
_topEdge.y = (topStartY + _arg1);
_bottomEdge.y = (bottomStartY - _arg1);
_leftEdge.x = (leftStartX + _arg1);
_rightEdge.x = (rightStartX - _arg1);
}
}
}//package se.rocketxl.mediaplayer
Section 24
//PostMovieText (se.rocketxl.mediaplayer.PostMovieText)
package se.rocketxl.mediaplayer {
import flash.display.*;
import flash.events.*;
import mx.effects.*;
import flash.utils.*;
import flash.text.*;
public dynamic class PostMovieText extends Sprite {
protected var _titleText:TextField;
var alphaTween:Tween;// = null
protected var visibleTimer:Timer;
public function PostMovieText(){
alphaTween = null;
super();
this.visible = false;
_titleText = this["titleText"];
visibleTimer = new Timer(5000, 1);
visibleTimer.addEventListener(TimerEvent.TIMER, onHideTitle);
}
public function onHideTitle(_arg1:TimerEvent){
if (alphaTween != null){
alphaTween.pause();
alphaTween = null;
};
alphaTween = new Tween(this, this.alpha, 0, 500);
alphaTween.setTweenHandlers(onTween, onTweenEnd);
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
}
public function setText(_arg1:String){
if (alphaTween != null){
alphaTween.pause();
alphaTween = null;
};
alphaTween = new Tween(this, 1, 1, 500);
alphaTween.setTweenHandlers(onTween, onTweenEnd);
_titleText.text = _arg1;
this.visible = true;
visibleTimer.reset();
visibleTimer.start();
}
public function onTween(_arg1:Number){
this.alpha = _arg1;
}
}
}//package se.rocketxl.mediaplayer
Section 25
//DBAnswer (se.rocketxl.quiz.server.DBAnswer)
package se.rocketxl.quiz.server {
public class DBAnswer {
var _categoryIndex:int;
var _answer:String;
public function DBAnswer(_arg1:String, _arg2:int){
this._answer = _arg1;
this._categoryIndex = _arg2;
}
public function get categoryIndex():int{
return (_categoryIndex);
}
public function get answer():String{
return (_answer);
}
}
}//package se.rocketxl.quiz.server
Section 26
//DBQuestion (se.rocketxl.quiz.server.DBQuestion)
package se.rocketxl.quiz.server {
public class DBQuestion {
var _answ1:String;
var _answ3:String;
var _question:String;
var _answ2:String;
var _answ4:String;
var _correct:int;
var _answerIndex:int;
var _categoryIndex:int;
public function DBQuestion(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:int){
this._question = _arg1;
this._answ1 = _arg2;
this._answ2 = _arg3;
this._answ3 = _arg4;
this._answ4 = _arg5;
this._correct = _arg6;
}
public function get question():String{
return (_question);
}
public function get answerIndex():int{
return (_answerIndex);
}
}
}//package se.rocketxl.quiz.server
Section 27
//QuestionWell (se.rocketxl.quiz.server.QuestionWell)
package se.rocketxl.quiz.server {
public class QuestionWell {
var questions:Array;
var answers:Array;
var categorys:Array;
static var NUM_OF_ANSWERS:int = 4;
public function QuestionWell(){
createArrays();
setupQuestions();
trace(((((("Questions; " + questions.length) + " Answers: ") + answers.length) + " Categories: ") + categorys.length));
}
public function getAnswerIndex(_arg1:String, _arg2:int){
var _local3:int;
var _local4:DBAnswer;
_local3 = 0;
for each (_local4 in answers) {
if ((((_local4.answer == _arg1)) && ((_local4.categoryIndex == _arg2)))){
return (_local3);
};
_local3++;
};
answers[_local3] = new DBAnswer(_arg1, _arg2);
return (_local3);
}
public function addQuestion(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:int){
questions[questions.length] = new DBQuestion(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
private function setupQuestions(){
addQuestion("Who is a professional female golfer?", "Michelle Wie", "Paula Radcliffe", "Olga Korbut", "Venus Williams", 0);
addQuestion("In which mountain range would you find Mount McKinley?", "Alaska Range", "Saint Elias Mountains", "Sierra Nevada", "Rocky Mountains", 0);
addQuestion("In 2006, which was the tallest building in the world?", "Taipei 101", "Eiffel Tower", "Sears Tower", "Empire State Building", 0);
addQuestion("Which American city is known as 'Motor City'?", "Detroit", "Philadelphia", "Chicago", "Seattle", 0);
addQuestion("Which of these countries is an island?", "Ireland", "France", "Italy", "Spain", 0);
addQuestion("Who was the first President of the USA?", "George Washington", "George Bush", "Ronald Reagan", "Abraham Lincoln", 0);
addQuestion("According to Greek mythology, who was killed by an arrow in the heel?", "Achilles", "Jason", "Icarus", "Helen of Troy", 0);
addQuestion("What is the square root of 64?", "8", "6", "9", "4", 0);
addQuestion("What does the Kelvin scale measure?", "Temperature", "IQ", "Depth", "Waistlines", 0);
addQuestion("Which gemstone is green?", "Emerald", "Lapis lazuli", "Amethyst", "Ruby", 0);
addQuestion("In which sport would you score a touchdown?", "Football", "Basketball", "Gymnastics", "Hockey", 0);
addQuestion("Which team did legendary coach Vince Lombardi lead to victory in Super Bowl I and II?", "Green Bay Packers", "Buffalo Bills", "New York Giants", "Denver Broncos", 0);
addQuestion("What was Christina Aguilera's debut single?", "Genie in a Bottle", "Oops!...I Did It Again", "Crazy in Love", "Cry Me a River", 0);
addQuestion("Which rapper's real name is Marshall Mathers?", "Eminem", "Dr Dre", "Jay-Z", "50 Cent", 0);
addQuestion("Which band released albums called 'Achtung Baby', 'Zoo TV' and 'Zooropa'?", "U2", "Orson", "Bon Jovi", "Thin Lizzy", 0);
addQuestion("Which band featured the iconic frontman Kurt Cobain?", "Nirvana", "The Monkees", "Talking Heads", "Smashing Pumpkins", 0);
addQuestion("Which rapper's real name is Curtis Jackson?", "50 Cent", "Jay-Z", "Dr Dre", "Sean Paul", 0);
addQuestion("Who is on the panel of judges for American Idol?", "Simon Cowell", "Elton John", "Lulu", "David Beckham", 0);
addQuestion("Which funky group gets its glamour from Stacy 'Fergie' Ferguson?", "The Black Eyed Peas", "Red Hot Chili Peppers", "Destiny's Child", "The All-American Rejects", 0);
addQuestion("Which Atlanta-born rapper was 'The College Dropout' in 2004?", "Kanye West", "Dr Dre", "Fat Joe", "Nelly", 0);
addQuestion("Which TV family are at home in Springfield?", "The Simpsons", "The Munsters", "The Jetsons", "The Waltons", 0);
addQuestion("Which '40-Year-Old Virgin' stars in 'The Office'?", "Steve Carell", "Paul Rudd", "Vince Vaughn", "Will Ferrell", 0);
addQuestion("Which 1990s show features Will Smith in the title role?", "Fresh Prince of Bel-Air", "Beverly Hills 90210", "Chicago Hope", "Frasier", 0);
addQuestion("In the hit cartoon comedy 'Family Guy' where does the Griffin family live?", "Quahog", "Springfield", "South Park", "Langley Falls", 0);
addQuestion("Which LA socialite is an heiress to a world-renowned hotel chain?", "Paris Hilton", "Kimberly Stewart", "Nicole Richie", "Lindsay Lohan", 0);
addQuestion("Who plays Jason Bourne in the action-packed thriller 'The Bourne Identity'?", "Matt Damon", "John Cusack", "Chris Cooper", "Clive Owen", 0);
addQuestion("Which author penned 'The Da Vinci Code' and 'Angels & Demons'?", "Dan Brown", "Tom Clancy", "Patricia Cornwell", "Nicholas Sparks", 0);
addQuestion("What was Picasso's first name?", "Pablo", "Gilberto", "Junior", "Sandor", 0);
addQuestion("Sean Connery and Roger Moore have both played which movie character?", "James Bond", "Austin Powers", "Dirty Harry", "Don Corleone", 0);
addQuestion("In which European city would you find the Eiffel Tower?", "Paris", "Athens", "London", "Lisbon", 0);
addQuestion("Who opened his first theme park in California in 1955?", "Walt Disney", "P.T. Barnum", "Henry Ford", "Elvis Presley", 0);
addQuestion("Mardi Gras is another name for which annual occasion?", "Fat Tuesday", "New Year's Eve", "Halloween", "Christmas Day", 0);
addQuestion("In which classic book does Gandalf weave his magic?", "Lord of the Rings", "Wizard of Oz", "The Sword in the Stone", "Harry Potter", 0);
addQuestion("Where does the sun set?", "West", "East", "North", "South", 0);
addQuestion("In which year did Man first walk on the Moon?", "1969", "1971", "1966", "1964", 0);
addQuestion("Who, in everyday life, is a mild-mannered reporter for The Daily Planet?", "Clark Kent", "Bruce Wayne", "Peter Parker", "Alan Scott", 0);
addQuestion("What kind of natural phenomenon is Vesuvius?", "Volcano", "River", "Comet", "Hurricane", 0);
addQuestion("Which 'Friend' is played by David Schwimmer?", "Ross", "Joey", "Chandler", "Gunther", 0);
addQuestion("Which Lara is the rather glamorous star of 'Tomb Raider'?", "Croft", "Cruft", "Craft", "O'Hara", 0);
addQuestion("How is basketball player Earvin Johnson Junior better known?", "Magic Johnson", "Manic Johnson", "Metallic Johnson", "Mystic Johnson", 0);
addQuestion("Which beverage is the main produce of California's Napa Valley?", "Wine", "Bourbon", "Beer", "Orange Juice", 0);
addQuestion("Which literary character has an assistant called Dr. Watson?", "Sherlock Holmes", "Phileas Fogg", "Gulliver", "David Copperfield", 0);
addQuestion("Which is the third planet from the sun?", "Earth", "Mars", "Mercury", "Jupiter", 0);
addQuestion("Who painted the Mona Lisa?", "Leonardo da Vinci", "Vincent van Gogh", "Claude Monet", "Andy Warhol", 0);
addQuestion("Which country attacked Pearl Harbor naval base in 1941?", "Japan", "Germany", "Italy", "Greece", 0);
addQuestion("Who directed 'Star Wars'?", "George Lucas", "Oliver Stone", "Guy Ritchie", "Quentin Tarantino", 0);
addQuestion("In tennis, what does the umpire call at 40 all?", "Deuce", "Game", "Let", "Advantage", 0);
addQuestion("Which American city is also known as the City of Brotherly Love?", "Philadelphia", "Phoenix", "Houston", "Pittsburgh", 0);
addQuestion("Which Dutch painter cut off his own ear?", "Van Gogh", "Rembrandt", "Vermeer", "Mondrian", 0);
addQuestion("Pakistan is home to the world's second highest mountain. What is it called?", "K2", "K1", "K3", "K4", 0);
addQuestion("Romania's Nadia Comaneci was an Olympic champion in which sport?", "Gymnastics", "Swimming", "Fencing", "Hockey", 0);
addQuestion("Where are the Spanish islands of Ibiza and Majorca?", "Mediterranean Sea", "Atlantic Ocean", "Gulf of Mexico", "Bering Sea", 0);
addQuestion("Which is a common ingredient of Thai food?", "Coconut milk", "Oregano", "Ketchup", "Feta", 0);
addQuestion("Which hard-man of Hollywood became the 38th Governor of California?", "Arnold Schwarzenegger", "Harvey Keitel", "Rutger Hauer", "Antonio Banderas", 0);
addQuestion("What is the capital city of New York?", "Albany", "Buffalo", "New York City", "Rochester", 0);
addQuestion("Which is the world's largest continent?", "Asia", "Antarctica", "Africa", "Europe", 0);
addQuestion("Which American President appears on the twenty dollar bill?", "Andrew Jackson", "JFK", "Abraham Lincoln", "Jimmy Carter", 0);
addQuestion("Which is not a tennis shot?", "Corner", "Lob", "Smash", "Drop", 0);
addQuestion("Which of these is a golfing term?", "Tee off", "Throw in", "Seconds out", "Foot fault", 0);
addQuestion("Arachnophobia is a fear of... what?", "Spiders", "Anoraks", "Open spaces", "People", 0);
addQuestion("What is a red herring?", "Misleading clue", "Tropical bird", "Meteorite", "Secret agent", 0);
addQuestion("A human has seven neck bones. How many has a giraffe?", "7", "40", "25", "18", 0);
addQuestion("Where would you be if you were waiting for a train at Grand Central station?", "New York City", "London", "Sydney", "Toronto", 0);
addQuestion("If you were at the Inca settlement of Machu Picchu, in which country would you be?", "Peru", "Chile", "Brazil", "Argentina", 0);
addQuestion("Which material does a tanner work with?", "Leather", "Silk", "Wood", "Bronze", 0);
addQuestion("As of 2006, which team had won the most World Series Championships?", "NY Yankees", "Padres", "Astros", "Braves", 0);
addQuestion("What is 10 in Roman numerals?", "X", "C", "L", "V", 0);
addQuestion("What is the name of Harry Potter's owl?", "Hedwig", "Bigwig", "Hagrid", "Pigwidgeon", 0);
addQuestion("What is the largest organ of the human body?", "Skin", "Heart", "Lungs", "Liver", 0);
addQuestion("Which was the first ghost to visit Ebenezer Scrooge?", "Christmas past", "Christmas future", "Christmas present", "Christmas dinner", 0);
addQuestion("In computing, what does the 'S' in ISP stand for?", "Service", "Sequence", "Software", "Standard", 0);
addQuestion("What is Austin Powers' middle name?", "Danger", "Mini", "Nigel", "Allegro", 0);
addQuestion("What is the capital of Italy?", "Rome", "Florence", "Venice", "Naples", 0);
addQuestion("What was the population of the United States in 2000?", "281 million", "80 million", "37 million", "101 million", 0);
addQuestion("In 2006, which country had the largest population?", "China", "Brazil", "Japan", "Iceland", 0);
addQuestion("How many states are there in the USA?", "50", "51", "38", "49", 0);
addQuestion("Which is the largest US state?", "Alaska", "Washington", "Rhode Island", "California", 0);
addQuestion("Where in New York City could you shop in Macy's flagship store?", "Herald Square", "Times Square", "Madison Square", "42nd Street", 0);
addQuestion("Which tunnel has the nickname 'Chunnel'?", "The Channel Tunnel", "The Lincoln Tunnel", "Fenghuoshan Railway Tunnel", "Chicago Deep Tunnel", 0);
addQuestion("In which state would you find Santa Fe, Albuquerque and Roswell?", "New Mexico", "Arizona", "Texas", "Nevada", 0);
addQuestion("Which composer's middle name is Amadeus?", "Mozart", "Bach", "Beethoven", "Handel", 0);
addQuestion("Who was first Englishman to circumnavigate the globe?", "Sir Francis Drake", "Lewis and Clark", "Pliny the Elder", "Julius Caesar", 0);
addQuestion("What was the name of the first satellite launched into space?", "Sputnik 1", "Mercury 3", "Apollo 1", "Skylab 1", 0);
addQuestion("What color is chlorophyll?", "Green", "Brown", "Transparent", "Black", 0);
addQuestion("What is the calm center of a hurricane commonly called?", "The eye", "The nose", "The teeth", "The ear", 0);
addQuestion("What are rivers of ice called?", "Glaciers", "Avalanches", "Cyclones", "Tsunamis", 0);
addQuestion("Michael Jordan is a legend in which sport?", "Basketball", "Boxing", "Football", "Cricket", 0);
addQuestion("At which weight did 'Iron' Mike Tyson become World Champion?", "Heavyweight", "Middleweight", "Welterweight", "Bantamweight", 0);
addQuestion("Which Australian animal only eats eucalyptus leaves?", "Koala", "Kangaroo", "Wombat", "Echidna", 0);
addQuestion("To which family does the ocelot belong?", "Cat", "Ape", "Monkey", "Dog", 0);
addQuestion("Which band took its name from a French Fashion magazine?", "Depeche Mode", "Procul Harum", "Duran Duran", "Kajagoogoo", 0);
addQuestion("Beyoncé Knowles was the lead singer of which all-girl group?", "Destiny's Child", "Spice Girls", "TLC", "Dixie Chicks", 0);
addQuestion("Which of these was a No.1 hit for Justin Timberlake?", "SexyBack", "I Don't Feel Like Dancing", "Miss Independent", "My Humps", 0);
addQuestion("Which is a 1969 Beatles album?", "Abbey Road", "Baker Street", "Electric Avenue", "Penny Lane", 0);
addQuestion("Which of these singers is Colombian?", "Shakira", "Diana Ross", "Kylie Minogue", "Celine Dion", 0);
addQuestion("Which concert was held simultaneously at Wembley, London and JFK Stadium, Philadelphia?", "Live Aid", "Farm Aid", "Sport Aid", "Lemon Aid", 0);
addQuestion("Who compared his sweetheart to a 'Kiss from a Rose' in 1995?", "Seal", "Terence Trent D'Arby", "Adamski", "George Michael", 0);
addQuestion("How were Dave Stewart and Annie Lennox better known?", "Eurythmics", "Aztec Camera", "China Crisis", "The Thompson Twins", 0);
addQuestion("With which band does Gene Simmons wear his war paint?", "Kiss", "AC/DC", "Heart", "Guns N' Roses", 0);
addQuestion("Jon Stewart hosts which Comedy Central satirical news show?", "The Daily Show", "South Park", "Distraction", "The Ellen DeGeneres Show", 0);
addQuestion("Who plays Sabrina Spellman in the popular sitcom 'Sabrina The Teenage Witch'?", "Melissa Joan Hart", "Hillary Duff", "Mary-Kate Olsen", "Lindsay Lohan", 0);
addQuestion("What is the profession of Ally McBeal?", "Lawyer", "Doctor", "Journalist", "Teacher", 0);
addQuestion("Frasier and Niles Crane are... what?", "Psychiatrists", "Lawyers", "Bartenders", "Salesmen", 0);
addQuestion("What are contestants asked to do on 'The Price is Right'?", "Come on down", "Come on in", "Come on over", "Come on, move", 0);
addQuestion("Which TV show features a fashion magazine called MODE?", "Ugly Betty", "Desperate Housewives", "My Name Is Earl", "Dharma & Greg", 0);
addQuestion("Desperate Housewives is set in which road?", "Wisteria Lane", "Evergreen Terrace", "Madison Avenue", "Sunset Boulevard", 0);
addQuestion("Which 'Friend' is a paleontologist?", "Ross", "Chandler", "Monica", "Phoebe", 0);
addQuestion("Which is the deepest of the Great Lakes?", "Superior", "Michigan", "Erie", "Huron", 0);
addQuestion("Which of these landmarks is not found in Seattle?", "Sears Tower", "Space Needle", "Washington Mutual Tower", "Smith Tower", 0);
addQuestion("Which country has a French-speaking province called Quebec?", "Canada", "India", "Belgium", "Switzerland", 0);
addQuestion("K2 is the world's second-highest... what?", "Mountain", "Bridge", "Tower", "Volcano", 0);
addQuestion("For which movie did Kevin Spacey win Best Actor in 2000?", "American Beauty", "American Pie", "American Idiot", "American Dream", 0);
addQuestion("For which 1994 movie did Morgan Freeman receive an Academy Award nomination?", "The Shawshank Redemption", "Bruce Almighty", "Amistad", "Robin Hood", 0);
addQuestion("Which 1988 movie was an Oscar winner for Barry Levinson?", "Rain Man", "Beetlejuice", "The Silence of the Lambs", "Forrest Gump", 0);
addQuestion("By which other name is Samuel Langhorne Clemens better known?", "Mark Twain", "John Wayne", "Sting", "Cary Grant", 0);
addQuestion("In which city would you be able to watch the Braves play their home games?", "Atlanta", "Miami", "Houston", "New York", 0);
addQuestion("Which two cities are represented at an Indians versus Mariners game?", "Cleveland & Seattle", "Cleveland & Toronto", "New York & Toronto", "Chicago & Philadelphia", 0);
addQuestion("If I'm cheering at Fenway Park, who am I supporting?", "Boston Red Sox", "Boston Bruins", "Boston Celtics", "Boston Blue Sox", 0);
addQuestion("What color is a New York cab?", "Yellow", "Blue", "Gold", "Black", 0);
addQuestion("In which room would you normally find the colander?", "Kitchen", "Bathroom", "Dining Room", "Study", 0);
addQuestion("Dolcelatte and Cambozola are types of... what?", "Cheese", "Bread", "Sherry", "Preserve", 0);
addQuestion("The day of the 1987 Stock Market crash is remembered as... what?", "Black Monday", "Palm Sunday", "Ash Wednesday", "Ruby Tuesday", 0);
addQuestion("Once home to Genghis Khan, which Asian country is land-locked?", "Mongolia", "Pakistan", "India", "Sri Lanka", 0);
addQuestion("Where could you enjoy some sports at the Orange Bowl?", "Miami", "Dallas", "Seattle", "Jacksonville", 0);
addQuestion("Which musical features the songs 'America' and 'Gee, Officer Krupke'?", "West Side Story", "Carousel", "Grease", "Chicago", 0);
addQuestion("What is the square root of 144?", "12", "7", "10", "8", 0);
addQuestion("Which US state is known as the Golden State?", "California", "Georgia", "Hawaii", "Alaska", 0);
addQuestion("Which is not a Caribbean island?", "Fiji", "Antigua", "Jamaica", "Barbados", 0);
addQuestion("Which artist was famous for painting soup cans?", "Andy Warhol", "Leonardo Da Vinci", "Michelangelo", "John Constable", 0);
addQuestion("Where in the human body is the 'funny bone'?", "Arm", "Leg", "Neck", "Foot", 0);
}
public function notinList(_arg1:int, _arg2:Array):Boolean{
var _local3:int;
for each (_local3 in _arg2) {
if (_local3 == _arg1){
return (false);
};
};
return (true);
}
public function getRandomAnswer(_arg1:int):String{
var _local2:int;
_local2 = _arg1;
while (_local2 == _arg1) {
_local2 = Math.floor((Math.random() * answers.length));
};
return (answers[_local2].answer);
}
public function generateQuestions(_arg1:int):Array{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local9:Array;
_local2 = new Array();
_local5 = 0;
while (_local5 < _arg1) {
_local3 = true;
while (_local3) {
_local4 = Math.floor((Math.random() * questions.length));
if (notinList(_local4, _local2)){
_local2[_local2.length] = _local4;
_local3 = false;
};
};
_local5++;
};
if (_arg1 != _local2.length){
trace("ERROR: new QuestionsList not correct size QuestionWell.as - generateQuestions()");
};
_local6 = new Array();
for each (_local7 in _local2) {
_local8 = questions[_local7]._correct;
_local9 = new Array();
_local9[0] = questions[_local7]._answ1;
_local9[1] = questions[_local7]._answ2;
_local9[2] = questions[_local7]._answ3;
_local9[3] = questions[_local7]._answ4;
_local6[_local6.length] = new ServerQuestion(questions[_local7].question, _local9, _local8);
};
return (_local6);
}
private function createArrays(){
questions = new Array();
answers = new Array();
categorys = new Array();
}
private function getCategoryIndex(_arg1:String){
var _local2:int;
var _local3:String;
_local2 = 0;
for each (_local3 in categorys) {
if (_local3 == _arg1){
return (_local2);
};
_local2++;
};
categorys[_local2] = _arg1;
return (_local2);
}
}
}//package se.rocketxl.quiz.server
Section 28
//ServerController (se.rocketxl.quiz.server.ServerController)
package se.rocketxl.quiz.server {
import se.rocketxl.quiz.*;
public class ServerController {
var questionIndex:int;
var numofQuestions:uint;
var sessionId:uint;
var quizController:QuizController;
public function ServerController(_arg1:QuizController){
this.quizController = _arg1;
sessionId = 0;
numofQuestions = 0;
questionIndex = -1;
}
public function startQuizSession(){
trace("Start Quiz");
}
public function getWinningsText():String{
return ("Error");
}
public function getNextQuestion():Question{
return (null);
}
public function giveAnswer(_arg1:int):Boolean{
return (false);
}
}
}//package se.rocketxl.quiz.server
Section 29
//ServerEmulator (se.rocketxl.quiz.server.ServerEmulator)
package se.rocketxl.quiz.server {
import se.rocketxl.quiz.*;
public class ServerEmulator extends ServerController {
var questionsArray:Array;
var questionWell:QuestionWell;
var numofCorrectAnswers:int;
var objTime:Object;
var rightAnwser:int;
public function ServerEmulator(_arg1:QuizController){
objTime = {x:1, y:2};
super(_arg1);
questionWell = new QuestionWell();
numofQuestions = 130;
numofCorrectAnswers = 0;
questionIndex = -1;
}
public function setStartTime(_arg1:Date, _arg2:Object, _arg3:Boolean):void{
if (_arg3){
_arg2.x = _arg1;
} else {
_arg2.y = _arg1;
};
}
public function sessionStartResponse(){
questionsArray = questionWell.generateQuestions(numofQuestions);
numofCorrectAnswers = 0;
questionIndex = -1;
quizController.chooseAvatar();
}
override public function getWinningsText():String{
return ((((("You answerd " + numofCorrectAnswers) + "/") + (questionIndex + 1)) + " questions correcly!"));
}
override public function getNextQuestion():Question{
var _local1:Date;
var _local2:Question;
trace("Get New Question");
_local1 = new Date();
setStartTime(_local1, objTime, true);
trace(("Starttime: " + objTime.x));
_local2 = null;
questionIndex++;
if (questionIndex < numofQuestions){
_local2 = questionsArray[questionIndex];
};
return (_local2);
}
override public function giveAnswer(_arg1:int):Boolean{
var _local2:Date;
_local2 = new Date();
trace("Answer");
setStartTime(_local2, objTime, false);
trace(((("Starttime: " + objTime.x) + " Endtime: ") + objTime.y));
trace((("Time to answer took: " + (Math.max(1000, (objTime.y - objTime.x)) / 1000)) + "seconds"));
if ((Math.max(1000, (objTime.y - objTime.x)) / 1000) > 15){
trace("Answer took too long time.. cheating?");
};
if (_arg1 == questionsArray[questionIndex].rightAnswerIndex){
numofCorrectAnswers++;
};
return ((_arg1 == questionsArray[questionIndex].rightAnswerIndex));
}
override public function startQuizSession(){
sessionStartResponse();
}
}
}//package se.rocketxl.quiz.server
Section 30
//ServerQuestion (se.rocketxl.quiz.server.ServerQuestion)
package se.rocketxl.quiz.server {
import se.rocketxl.quiz.*;
public class ServerQuestion extends Question {
var _rightAnswerIndex:int;
public function ServerQuestion(_arg1:String, _arg2:Array, _arg3:int){
super(_arg1, _arg2, _arg3);
_rightAnswerIndex = _arg3;
}
public function get rightAnswerIndex():int{
return (_rightAnswerIndex);
}
}
}//package se.rocketxl.quiz.server
Section 31
//answebox1 (se.rocketxl.quiz.answebox1)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class answebox1 extends Sprite {
}
}//package se.rocketxl.quiz
Section 32
//answebox2 (se.rocketxl.quiz.answebox2)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class answebox2 extends Sprite {
}
}//package se.rocketxl.quiz
Section 33
//answebox3 (se.rocketxl.quiz.answebox3)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class answebox3 extends Sprite {
}
}//package se.rocketxl.quiz
Section 34
//answebox4 (se.rocketxl.quiz.answebox4)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class answebox4 extends Sprite {
}
}//package se.rocketxl.quiz
Section 35
//AvatarThumb (se.rocketxl.quiz.AvatarThumb)
package se.rocketxl.quiz {
import fl.transitions.easing.*;
public class AvatarThumb extends QuizState {
private var charsPos:Array;
public var chars:charactersHolder;
public function AvatarThumb(_arg1:Object){
charsPos = new Array();
super(_arg1);
this.x = 309;
this.y = 388;
charsPos.push({__x:-1, __y:-29});
charsPos.push({__x:-248, __y:-45});
charsPos.push({__x:-494, __y:-30});
charsPos.push({__x:-737, __y:-36});
charsPos.push({__x:-1047, __y:-11});
charsPos.push({__x:-1323, __y:-26});
charsPos.push({__x:-1573, __y:-27});
charsPos.push({__x:-1837, __y:-17});
charsPos.push({__x:-2078, __y:4});
charsPos.push({__x:-2322, __y:-56});
charsPos.push({__x:-2624, __y:-18});
charsPos.push({__x:-2881, __y:-28});
charsPos.push({__x:-3176, __y:-28});
charsPos.push({__x:-3461, __y:-13});
charsPos.push({__x:-3726, __y:-38});
charsPos.push({__x:-4008, __y:-20});
setAvatar(charsPos[_arg1.avatar].__x, charsPos[_arg1.avatar].__y);
}
private function setAvatar(_arg1:int, _arg2:int){
chars.x = _arg1;
chars.y = _arg2;
}
}
}//package se.rocketxl.quiz
Section 36
//bgImage (se.rocketxl.quiz.bgImage)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class bgImage extends Sprite {
}
}//package se.rocketxl.quiz
Section 37
//bigPopup (se.rocketxl.quiz.bigPopup)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class bigPopup extends Sprite {
}
}//package se.rocketxl.quiz
Section 38
//block (se.rocketxl.quiz.block)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class block extends Sprite {
}
}//package se.rocketxl.quiz
Section 39
//button (se.rocketxl.quiz.button)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class button extends Sprite {
}
}//package se.rocketxl.quiz
Section 40
//BuzzSound0 (se.rocketxl.quiz.BuzzSound0)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound0 extends Sound {
}
}//package se.rocketxl.quiz
Section 41
//BuzzSound1 (se.rocketxl.quiz.BuzzSound1)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound1 extends Sound {
}
}//package se.rocketxl.quiz
Section 42
//BuzzSound10 (se.rocketxl.quiz.BuzzSound10)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound10 extends Sound {
}
}//package se.rocketxl.quiz
Section 43
//BuzzSound11 (se.rocketxl.quiz.BuzzSound11)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound11 extends Sound {
}
}//package se.rocketxl.quiz
Section 44
//BuzzSound12 (se.rocketxl.quiz.BuzzSound12)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound12 extends Sound {
}
}//package se.rocketxl.quiz
Section 45
//BuzzSound13 (se.rocketxl.quiz.BuzzSound13)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound13 extends Sound {
}
}//package se.rocketxl.quiz
Section 46
//BuzzSound14 (se.rocketxl.quiz.BuzzSound14)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound14 extends Sound {
}
}//package se.rocketxl.quiz
Section 47
//BuzzSound15 (se.rocketxl.quiz.BuzzSound15)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound15 extends Sound {
}
}//package se.rocketxl.quiz
Section 48
//BuzzSound16 (se.rocketxl.quiz.BuzzSound16)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound16 extends Sound {
}
}//package se.rocketxl.quiz
Section 49
//BuzzSound2 (se.rocketxl.quiz.BuzzSound2)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound2 extends Sound {
}
}//package se.rocketxl.quiz
Section 50
//BuzzSound3 (se.rocketxl.quiz.BuzzSound3)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound3 extends Sound {
}
}//package se.rocketxl.quiz
Section 51
//BuzzSound4 (se.rocketxl.quiz.BuzzSound4)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound4 extends Sound {
}
}//package se.rocketxl.quiz
Section 52
//BuzzSound5 (se.rocketxl.quiz.BuzzSound5)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound5 extends Sound {
}
}//package se.rocketxl.quiz
Section 53
//BuzzSound6 (se.rocketxl.quiz.BuzzSound6)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound6 extends Sound {
}
}//package se.rocketxl.quiz
Section 54
//BuzzSound7 (se.rocketxl.quiz.BuzzSound7)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound7 extends Sound {
}
}//package se.rocketxl.quiz
Section 55
//BuzzSound8 (se.rocketxl.quiz.BuzzSound8)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound8 extends Sound {
}
}//package se.rocketxl.quiz
Section 56
//BuzzSound9 (se.rocketxl.quiz.BuzzSound9)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSound9 extends Sound {
}
}//package se.rocketxl.quiz
Section 57
//BuzzSoundWrong (se.rocketxl.quiz.BuzzSoundWrong)
package se.rocketxl.quiz {
import flash.media.*;
public dynamic class BuzzSoundWrong extends Sound {
}
}//package se.rocketxl.quiz
Section 58
//characterSelectButton (se.rocketxl.quiz.characterSelectButton)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class characterSelectButton extends Sprite {
}
}//package se.rocketxl.quiz
Section 59
//charactersHolder (se.rocketxl.quiz.charactersHolder)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class charactersHolder extends Sprite {
}
}//package se.rocketxl.quiz
Section 60
//ChooseAvatarGUI (se.rocketxl.quiz.ChooseAvatarGUI)
package se.rocketxl.quiz {
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
public class ChooseAvatarGUI extends QuizState {
private var charsPos:Array;
public var avatar:int;
public var selLeft:characterSelectButton;
public var startBtn:ClickToSelectChar;
public var chars:charactersHolder;
public var selRight:characterSelectButton;
private var qC:Object;
public function ChooseAvatarGUI(_arg1:Object){
var quizController = _arg1;
charsPos = new Array();
super(quizController);
qC = quizController;
this.x = 140;
avatar = 0;
charsPos.push(44, 284, 510, 773, 1054, 1352, 1610, 1872, 2119, 2376, 2629, 2928, 3208);
selLeft.buttonMode = true;
selRight.buttonMode = true;
startBtn.buttonMode = true;
selLeft.addEventListener(MouseEvent.MOUSE_UP, function (_arg1:MouseEvent):void{
toggleChar("left");
});
selRight.addEventListener(MouseEvent.MOUSE_UP, function (_arg1:MouseEvent):void{
toggleChar("right");
});
startBtn.addEventListener(MouseEvent.MOUSE_UP, function (_arg1:MouseEvent):void{
doStartQuiz(avatar);
});
}
public function playSound(_arg1:int){
var _local2:BuzzSound0;
var _local3:BuzzSound1;
var _local4:BuzzSound2;
var _local5:BuzzSound3;
var _local6:BuzzSound4;
var _local7:BuzzSound5;
var _local8:BuzzSound6;
var _local9:BuzzSound7;
var _local10:BuzzSound8;
var _local11:BuzzSound9;
var _local12:BuzzSound10;
var _local13:BuzzSound11;
var _local14:BuzzSound12;
var _local15:BuzzSound13;
var _local16:BuzzSound14;
var _local17:BuzzSound15;
var _local18:BuzzSound16;
switch (_arg1){
case 0:
_local2 = new BuzzSound0();
_local2.play();
break;
case 1:
_local3 = new BuzzSound1();
_local3.play();
break;
case 2:
_local4 = new BuzzSound2();
_local4.play();
break;
case 3:
_local5 = new BuzzSound3();
_local5.play();
break;
case 4:
_local6 = new BuzzSound4();
_local6.play();
break;
case 5:
_local7 = new BuzzSound5();
_local7.play();
break;
case 6:
_local8 = new BuzzSound6();
_local8.play();
break;
case 7:
_local9 = new BuzzSound7();
_local9.play();
break;
case 8:
_local10 = new BuzzSound8();
_local10.play();
break;
case 9:
_local11 = new BuzzSound9();
_local11.play();
break;
case 10:
_local12 = new BuzzSound10();
_local12.play();
break;
case 11:
_local13 = new BuzzSound11();
_local13.play();
break;
case 12:
_local14 = new BuzzSound12();
_local14.play();
break;
case 13:
_local15 = new BuzzSound13();
_local15.play();
break;
case 14:
_local16 = new BuzzSound14();
_local16.play();
break;
case 15:
_local17 = new BuzzSound15();
_local17.play();
break;
case 16:
_local18 = new BuzzSound16();
_local18.play();
break;
};
}
private function doStartQuiz(_arg1:int){
quizController.startQuiz(_arg1);
}
public function toggleChar(_arg1:String){
var _local2:Tween;
switch (_arg1){
case "left":
if (avatar != 0){
avatar--;
};
break;
case "right":
if (avatar < (charsPos.length - 1)){
avatar++;
};
break;
};
_local2 = new Tween(chars, "x", Elastic.easeOut, chars.x, (-(charsPos[avatar]) + 116), 1, true);
playSound(avatar);
}
}
}//package se.rocketxl.quiz
Section 61
//ClickToSelectChar (se.rocketxl.quiz.ClickToSelectChar)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class ClickToSelectChar extends Sprite {
}
}//package se.rocketxl.quiz
Section 62
//CollectInfoState (se.rocketxl.quiz.CollectInfoState)
package se.rocketxl.quiz {
import flash.events.*;
import flash.text.*;
public class CollectInfoState extends QuizState {
public var emailText:TextField;
public function CollectInfoState(_arg1:Object){
super(_arg1);
}
public function onStartQuiz(_arg1:MouseEvent){
quizController.StartQuizforSweepstakes(emailText.text);
}
}
}//package se.rocketxl.quiz
Section 63
//Correct (se.rocketxl.quiz.Correct)
package se.rocketxl.quiz {
import flash.display.*;
public class Correct extends MovieClip {
public function Correct(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function setTo(_arg1:Boolean){
if (_arg1){
gotoAndStop(1);
} else {
gotoAndStop(2);
};
}
}
}//package se.rocketxl.quiz
Section 64
//CorrectHolder (se.rocketxl.quiz.CorrectHolder)
package se.rocketxl.quiz {
import flash.display.*;
public class CorrectHolder extends Sprite {
public var c0:Correct;
public var c1:Correct;
public var c2:Correct;
var setToFalse:Array;
var quizController:Object;
var setNum:int;// = 0
public function CorrectHolder(_arg1:Object){
setToFalse = new Array();
setNum = 0;
super();
quizController = _arg1;
setToFalse.push(c0, c1, c2);
this.x = 150;
this.y = 430;
}
public function setFalse(_arg1:Boolean){
setToFalse[setNum].setTo(false);
setNum++;
if (setNum == 3){
if (_arg1){
quizController.endQuiz(_arg1, false);
};
return (true);
} else {
if (((_arg1) && (!((setNum == 3))))){
quizController.showNextQuestion(false);
return (false);
};
};
}
}
}//package se.rocketxl.quiz
Section 65
//Drapes (se.rocketxl.quiz.Drapes)
package se.rocketxl.quiz {
import flash.display.*;
import mx.effects.*;
public class Drapes extends Sprite {
public var leftDrape:MovieClip;
public var rightDrape:MovieClip;
protected var leftDrapeStartPos:Number;
protected var rightDrapeStartPos:Number;
var animTween:Tween;// = null
public function Drapes(){
animTween = null;
super();
leftDrapeStartPos = leftDrape.x;
rightDrapeStartPos = rightDrape.x;
}
public function onTweenEnd(_arg1:Array){
onTween(_arg1);
animTween = null;
}
public function separateDrapes(){
animTween = new Tween(this, [leftDrape.x, rightDrape.x], [(leftDrapeStartPos - 100), (rightDrapeStartPos + 100)], 1000);
animTween.setTweenHandlers(onTween, onTweenEnd);
}
public function closeDrapes(){
animTween = new Tween(this, [leftDrape.x, rightDrape.x], [leftDrapeStartPos, rightDrapeStartPos], 1000);
animTween.setTweenHandlers(onTween, onTweenEnd);
}
public function onTween(_arg1:Array){
leftDrape.x = _arg1[0];
rightDrape.x = _arg1[1];
}
}
}//package se.rocketxl.quiz
Section 66
//EndQuizState (se.rocketxl.quiz.EndQuizState)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class EndQuizState extends QuizState {
public var signup:SimpleButton;
public var errorMsg:errorMsg;
public var inputName:TextField;
public var cancel:SimpleButton;
public var winningsText:TextField;
public var inputEmail:TextField;
public function EndQuizState(_arg1:Object){
super(_arg1);
signup.addEventListener(MouseEvent.MOUSE_UP, onGotoHighscore);
cancel.addEventListener(MouseEvent.MOUSE_UP, onCancel);
}
public function removeError(_arg1:MouseEvent):void{
errorMsg.alpha = 0;
errorMsg.x = -1000;
errorMsg.y = -1000;
}
override public function setWinningsText(_arg1:String):void{
winningsText.text = _arg1;
}
public function onCancel(_arg1:MouseEvent){
quizController.doCleanUp(true);
}
public function onGotoHighscore(_arg1:MouseEvent):void{
if (((!((inputName.text == ""))) && (!((inputEmail.text == ""))))){
quizController.showHighscore(inputName.text, inputEmail.text, winningsText.text);
} else {
errorMsg.alpha = 100;
errorMsg.x = 12;
errorMsg.y = 25;
errorMsg.okBtn.buttonMode = true;
errorMsg.okBtn.addEventListener(MouseEvent.MOUSE_UP, removeError);
};
}
public function onPlayforFun(_arg1:MouseEvent):void{
quizController.startQuizSession();
}
public function onSignup(_arg1:MouseEvent):void{
quizController.signup();
}
}
}//package se.rocketxl.quiz
Section 67
//EndSplashState (se.rocketxl.quiz.EndSplashState)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import se.rocketxl.mediaplayer.videoviewer.*;
import se.rocketxl.track.*;
public class EndSplashState extends QuizState {
public var videoPlayer:VideoViewer;
var VIDEO2_URL:String;// = "http://www.rocketxl.com/buzz/OYCE14033VP6_512K_001.flv"
public var playerButtons:MovieClip;
public var videoLoader:MovieClip;
var VIDEO1_URL:String;// = "http://www.rocketxl.com/buzz/OYCE14013VP6_512K_001.flv"
public function EndSplashState(_arg1:Object){
VIDEO1_URL = "http://www.rocketxl.com/buzz/OYCE14013VP6_512K_001.flv";
VIDEO2_URL = "http://www.rocketxl.com/buzz/OYCE14033VP6_512K_001.flv";
super(_arg1);
playerButtons.playButton.buttonMode = true;
playerButtons.playButton.addEventListener(MouseEvent.MOUSE_UP, onPlayAgain);
playerButtons.trailer1.buttonMode = true;
playerButtons.trailer1.addEventListener(MouseEvent.MOUSE_UP, onPlayTrailer1);
playerButtons.trailer2.buttonMode = true;
playerButtons.trailer2.addEventListener(MouseEvent.MOUSE_UP, onPlayTrailer2);
videoPlayer.visible = false;
videoPlayer.addEventListener("onVideoLoadProgress", onVideoLoadProgress);
videoLoader.width = 0;
}
public function onPlayTrailer1(_arg1:MouseEvent){
Track.trackAction("110");
videoPlayer.visible = true;
videoPlayer.playVideo(VIDEO1_URL);
}
public function clearStream(){
videoPlayer.clearStream();
}
public function onVideoLoadProgress(_arg1:ProgressEvent){
videoLoader.width = ((videoPlayer.width * _arg1.bytesLoaded) / _arg1.bytesTotal);
}
public function onPlayTrailer2(_arg1:MouseEvent){
Track.trackAction("111");
videoPlayer.visible = true;
videoPlayer.playVideo(VIDEO2_URL);
}
public function onPlayAgain(_arg1:MouseEvent){
quizController.gotoStartState();
videoPlayer.visible = false;
videoPlayer.clearStream();
}
}
}//package se.rocketxl.quiz
Section 68
//errorMsg (se.rocketxl.quiz.errorMsg)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class errorMsg extends Sprite {
public var okBtn:errorMsgBtn;
}
}//package se.rocketxl.quiz
Section 69
//errorMsgBack (se.rocketxl.quiz.errorMsgBack)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class errorMsgBack extends Sprite {
}
}//package se.rocketxl.quiz
Section 70
//errorMsgBtn (se.rocketxl.quiz.errorMsgBtn)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class errorMsgBtn extends Sprite {
}
}//package se.rocketxl.quiz
Section 71
//GameMusic (se.rocketxl.quiz.GameMusic)
package se.rocketxl.quiz {
import flash.events.*;
import flash.media.*;
public class GameMusic extends Sound {
var acticeSoundChannel:SoundChannel;// = null
var soundTransform:SoundTransform;
var loppMusic:GameMusicLoop;
var startPlayed:Boolean;// = false
public function GameMusic(){
acticeSoundChannel = null;
startPlayed = false;
super();
soundTransform = new SoundTransform();
loppMusic = new GameMusicLoop();
}
public function onSoundFinished(_arg1:Event){
startLoopMusic();
}
public function stopMusic(){
trace("Stop The Music");
acticeSoundChannel.stop();
}
public function startLoopMusic(){
if (acticeSoundChannel != null){
acticeSoundChannel.stop();
};
acticeSoundChannel = loppMusic.play(0, 0, soundTransform);
acticeSoundChannel.addEventListener(Event.SOUND_COMPLETE, onLoopFinished);
}
public function startMusic(){
if (acticeSoundChannel != null){
acticeSoundChannel.stop();
};
acticeSoundChannel = play(0, 0, soundTransform);
acticeSoundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundFinished);
}
public function onLoopFinished(_arg1:Event){
startLoopMusic();
}
}
}//package se.rocketxl.quiz
Section 72
//grabBgImage (se.rocketxl.quiz.grabBgImage)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class grabBgImage extends Sprite {
}
}//package se.rocketxl.quiz
Section 73
//grabBigPopup (se.rocketxl.quiz.grabBigPopup)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class grabBigPopup extends Sprite {
}
}//package se.rocketxl.quiz
Section 74
//grabButton (se.rocketxl.quiz.grabButton)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class grabButton extends Sprite {
}
}//package se.rocketxl.quiz
Section 75
//GrabCodeState (se.rocketxl.quiz.GrabCodeState)
package se.rocketxl.quiz {
import flash.text.*;
public class GrabCodeState extends QuizState {
public var grabText:TextField;
public var grabButton:grabButton;
public function GrabCodeState(_arg1:Object){
super(_arg1);
}
}
}//package se.rocketxl.quiz
Section 76
//GrabSend (se.rocketxl.quiz.GrabSend)
package se.rocketxl.quiz {
import flash.net.*;
import flash.display.*;
import flash.events.*;
import se.rocketxl.track.*;
import flash.text.*;
import flash.system.*;
public class GrabSend extends MovieClip {
var quizControll:Object;
public var grabCodeTxt:TextField;
public var grabBtn:block;
public var grabCode:grabButton;
public var senderEmail:TextField;
public var recieverEmail:TextField;
public var cancelBtn:SimpleButton;
public var senderName:TextField;
public var sendToFriend:grabButton;
public var recieverName:TextField;
public var grabButton:SimpleButton;
public var catchClick:block;
public var challengeBtn:SimpleButton;
public function GrabSend(_arg1:Object){
quizControll = _arg1;
this.gotoAndStop(1);
this.x = 46;
this.y = 64;
catchClick.addEventListener(MouseEvent.MOUSE_UP, doNothing);
grabCodeTxt.addEventListener(MouseEvent.MOUSE_DOWN, doGrab);
grabCodeTxt.visible = false;
sendToFriend.addEventListener(MouseEvent.MOUSE_UP, viewSendToFriend);
grabCode.addEventListener(MouseEvent.MOUSE_UP, viewGrabCode);
cancelBtn.addEventListener(MouseEvent.MOUSE_UP, doCancel);
grabButton.addEventListener(MouseEvent.MOUSE_UP, doGrab);
grabButton.visible = false;
challengeBtn.addEventListener(MouseEvent.MOUSE_UP, doSend);
challengeBtn.visible = false;
}
public function viewGrabCode(_arg1:MouseEvent){
this.gotoAndStop(3);
grabButton.visible = true;
grabCodeTxt.visible = true;
cancelBtn.visible = true;
}
public function doGrab(_arg1:MouseEvent){
var _local2:String;
grabCodeTxt.removeEventListener(MouseEvent.MOUSE_DOWN, doGrab);
Track.trackSale("grabCode");
_local2 = grabCodeTxt.text;
System.setClipboard(_local2);
}
public function doSend(_arg1:MouseEvent){
var _local2:String;
var _local3:URLVariables;
var _local4:URLRequest;
var _local5:URLLoader;
Track.trackSale("sendToFriend");
_local2 = "http://www.rocketxl.com/buzz/app/taf.php";
_local3 = new URLVariables();
_local3.from_name = senderName.text;
_local3.from_email = senderEmail.text;
_local3.to_name = recieverName.text;
_local3.to_email = recieverEmail;
_local4 = new URLRequest();
_local4.url = _local2;
_local4.data = _local3;
_local4.method = URLRequestMethod.POST;
_local5 = new URLLoader();
_local5.addEventListener(Event.COMPLETE, doCancel);
_local5.load(_local4);
}
public function doNothing(_arg1:MouseEvent){
}
public function doCancel(_arg1:Event){
quizControll.removeGrabSend();
}
public function viewSendToFriend(_arg1:MouseEvent){
this.gotoAndStop(2);
challengeBtn.visible = true;
}
}
}//package se.rocketxl.quiz
Section 77
//highScoreArrow (se.rocketxl.quiz.highScoreArrow)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class highScoreArrow extends Sprite {
}
}//package se.rocketxl.quiz
Section 78
//HighScoreState (se.rocketxl.quiz.HighScoreState)
package se.rocketxl.quiz {
import flash.net.*;
import flash.events.*;
import flash.text.*;
import flash.xml.*;
public class HighScoreState extends QuizState {
var submitEmail:String;
public var playAgain:QuizStartButton;
var submitScore:String;
public var hsArrow:highScoreArrow;
public var txt1:TextField;
public var txt2:TextField;
public var txt3:TextField;
public var txt5:TextField;
public var txt7:TextField;
public var txt8:TextField;
public var txt9:TextField;
var submitName:String;
public var txt6:TextField;
public var txt0:TextField;
var txtArray:Array;
var myXML:XML;
public var txt4:TextField;
public function HighScoreState(_arg1:Object, _arg2:String, _arg3:String, _arg4:String){
txtArray = new Array();
super(_arg1);
submitName = _arg2;
submitEmail = _arg3;
submitScore = _arg4;
this.x = 46;
this.y = 79;
txtArray.push(txt0, txt1, txt2, txt3, txt4, txt5, txt6, txt7, txt8, txt9);
getXML();
playAgain.buttonMode = true;
playAgain.addEventListener(MouseEvent.MOUSE_UP, onPlayAgain);
}
public function drawList(_arg1:XML){
var _local2:XMLDocument;
var _local3:*;
var _local4:XMLNode;
var _local5:TextFormat;
_local2 = new XMLDocument();
_local2.ignoreWhite = true;
_local2.parseXML(_arg1);
_local3 = 0;
for each (_local4 in _local2.firstChild.childNodes) {
if (_local4.attributes.current == "true"){
_local5 = new TextFormat();
_local5.color = 16288016;
_local5.size = 13;
txtArray[_local3].text = ((_local4.childNodes[1].firstChild + " ") + _local4.childNodes[0].firstChild);
txtArray[_local3].setTextFormat(_local5);
hsArrow.y = (txtArray[_local3].y - 9);
} else {
txtArray[_local3].text = ((_local4.childNodes[1].firstChild + " ") + _local4.childNodes[0].firstChild);
};
_local3++;
};
}
public function xmlLoaded(_arg1:Event):void{
var _local2:XML;
_local2 = new XML(_arg1.target.data);
drawList(_local2);
}
public function onPlayAgain(_arg1:MouseEvent){
quizController.doCleanUp(false);
}
public function getXML(){
var _local1:String;
var _local2:URLVariables;
var _local3:int;
var _local4:URLRequest;
var _local5:URLLoader;
_local1 = "http://www.rocketxl.com/buzz/app/rank.php";
_local2 = new URLVariables();
_local2.name = submitName;
_local2.email = submitEmail;
_local2.score = submitScore;
_local3 = int(submitScore);
_local2.code = ((_local3 * 567) + (289 - _local3));
_local4 = new URLRequest();
_local4.url = _local1;
_local4.data = _local2;
_local4.method = URLRequestMethod.POST;
_local5 = new URLLoader();
_local5.addEventListener(Event.COMPLETE, xmlLoaded);
_local5.load(_local4);
}
}
}//package se.rocketxl.quiz
Section 79
//HighScoreTopTen (se.rocketxl.quiz.HighScoreTopTen)
package se.rocketxl.quiz {
import flash.net.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.xml.*;
public class HighScoreTopTen extends QuizState {
var myXML:XML;
public var score5:TextField;
public var closeBtn:SimpleButton;
public var catchClick:block;
public var txt1:TextField;
public var txt5:TextField;
public var txt7:TextField;
public var txt9:TextField;
public var txt6:TextField;
public var txt8:TextField;
var txtArray:Array;
public var txt3:TextField;
public var txt2:TextField;
public var score0:TextField;
public var score2:TextField;
public var score3:TextField;
public var score7:TextField;
public var score8:TextField;
public var score4:TextField;
public var score6:TextField;
public var txt0:TextField;
public var score9:TextField;
public var txt4:TextField;
public var score1:TextField;
var scoreArray:Array;
public function HighScoreTopTen(_arg1:Object){
txtArray = new Array();
scoreArray = new Array();
super(_arg1);
this.x = 46;
this.y = 74;
txtArray.push(txt0, txt1, txt2, txt3, txt4, txt5, txt6, txt7, txt8, txt9);
scoreArray.push(score0, score1, score2, score3, score4, score5, score6, score7, score8, score9);
catchClick.addEventListener(MouseEvent.MOUSE_UP, doNothing);
closeBtn.addEventListener(MouseEvent.MOUSE_UP, closeTopTen);
getXML();
}
public function drawList(_arg1:XML){
var _local2:XMLDocument;
var _local3:*;
var _local4:XMLNode;
_local2 = new XMLDocument();
_local2.ignoreWhite = true;
_local2.parseXML(_arg1);
_local3 = 0;
for each (_local4 in _local2.firstChild.childNodes) {
txtArray[_local3].text = (((_local3 + 1) + ". ") + _local4.childNodes[0].firstChild);
scoreArray[_local3].text = _local4.childNodes[1].firstChild;
_local3++;
};
}
public function xmlLoaded(_arg1:Event):void{
var _local2:XML;
_local2 = new XML(_arg1.target.data);
drawList(_local2);
}
public function closeTopTen(_arg1:MouseEvent){
quizController.removeTopTen();
}
public function getXML(){
var _local1:String;
var _local2:URLRequest;
var _local3:URLLoader;
_local1 = "http://www.rocketxl.com/buzz/app/topten.php";
_local2 = new URLRequest();
_local2.url = _local1;
_local3 = new URLLoader();
_local3.addEventListener(Event.COMPLETE, xmlLoaded);
_local3.load(_local2);
}
public function doNothing(_arg1:MouseEvent){
}
}
}//package se.rocketxl.quiz
Section 80
//host (se.rocketxl.quiz.host)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class host extends Sprite {
}
}//package se.rocketxl.quiz
Section 81
//HostHolder (se.rocketxl.quiz.HostHolder)
package se.rocketxl.quiz {
import mx.effects.*;
public class HostHolder extends QuizState {
public var host:host;
var animTween:Tween;
public function HostHolder(_arg1:Object):void{
super(_arg1);
this.x = 48;
this.y = 117;
host.x = -200;
host.y = 0;
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
}
public function enable(_arg1:Boolean){
if (_arg1){
animTween = new Tween(this, host.x, 0, 1000);
animTween.setTweenHandlers(onTween, onTweenEnd);
} else {
animTween = new Tween(this, host.x, -200, 1000);
animTween.setTweenHandlers(onTween, onTweenEnd);
};
}
public function onTween(_arg1:Number){
host.x = _arg1;
}
}
}//package se.rocketxl.quiz
Section 82
//Lights (se.rocketxl.quiz.Lights)
package se.rocketxl.quiz {
import flash.display.*;
public class Lights extends MovieClip {
public function Lights():void{
gotoAndPlay(1);
}
}
}//package se.rocketxl.quiz
Section 83
//NextQuestion (se.rocketxl.quiz.NextQuestion)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import mx.effects.*;
import flash.utils.*;
public class NextQuestion extends Sprite {
var tweenInterval:uint;
public var catchClick:block;
var quizController:Object;
var animTween:Tween;
public function NextQuestion(_arg1:Object){
quizController = _arg1;
catchClick.addEventListener(MouseEvent.MOUSE_UP, doNothing);
animTween = new Tween(this, [400, 60, 400, 40, 0], [505, 0, 486, 0, 1], 200);
animTween.setTweenHandlers(onTween, onTweenInEnd);
this.alpha = 0;
}
public function tweenOut(){
clearInterval(tweenInterval);
animTween = new Tween(this, [505, 0, 486, 0, 1], [400, 60, 400, 40, 0], 200);
animTween.setTweenHandlers(onTween, onTweenOutEnd);
}
public function onTweenInEnd(_arg1:Array){
onTween(_arg1);
tweenInterval = setInterval(tweenOut, 500);
}
public function onTweenOutEnd(_arg1:Array){
onTween(_arg1);
quizController.continueQuiz();
}
private function doNothing(_arg1:MouseEvent){
}
public function onTween(_arg1:Array){
this.width = _arg1[0];
this.x = _arg1[1];
this.height = _arg1[2];
this.y = _arg1[3];
this.alpha = _arg1[4];
}
}
}//package se.rocketxl.quiz
Section 84
//PopRight (se.rocketxl.quiz.PopRight)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import mx.effects.*;
import flash.utils.*;
public class PopRight extends Sprite {
var tweenInterval:uint;
public var catchClick:block;
var quizController:Object;
var animTween:Tween;
public function PopRight(_arg1:Object){
quizController = _arg1;
catchClick.addEventListener(MouseEvent.MOUSE_UP, doNothing);
animTween = new Tween(this, [400, 60, 400, 40, 0], [505, 0, 486, 0, 1], 200);
animTween.setTweenHandlers(onTween, onTweenInEnd);
this.alpha = 0;
}
public function tweenOut(){
clearInterval(tweenInterval);
animTween = new Tween(this, [505, 0, 486, 0, 1], [400, 60, 400, 40, 0], 200);
animTween.setTweenHandlers(onTween, onTweenOutEnd);
}
public function onTweenInEnd(_arg1:Array){
onTween(_arg1);
tweenInterval = setInterval(tweenOut, 500);
}
public function onTweenOutEnd(_arg1:Array){
onTween(_arg1);
quizController.showNextQuestion(true);
}
private function doNothing(_arg1:MouseEvent){
}
public function onTween(_arg1:Array){
this.width = _arg1[0];
this.x = _arg1[1];
this.height = _arg1[2];
this.y = _arg1[3];
this.alpha = _arg1[4];
}
}
}//package se.rocketxl.quiz
Section 85
//PopWrong (se.rocketxl.quiz.PopWrong)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import mx.effects.*;
import flash.utils.*;
public class PopWrong extends Sprite {
var tweenInterval:uint;
public var catchClick:block;
var endQuiz:Boolean;
var quizController:Object;
var animTween:Tween;
public function PopWrong(_arg1:Object, _arg2:Boolean){
endQuiz = _arg2;
quizController = _arg1;
catchClick.addEventListener(MouseEvent.MOUSE_UP, doNothing);
animTween = new Tween(this, [400, 60, 400, 40, 0], [505, 0, 486, 0, 1], 200);
animTween.setTweenHandlers(onTween, onTweenInEnd);
this.alpha = 0;
}
public function tweenOut(){
clearInterval(tweenInterval);
animTween = new Tween(this, [505, 0, 486, 0, 1], [400, 60, 400, 40, 0], 200);
animTween.setTweenHandlers(onTween, onTweenOutEnd);
}
public function onTweenInEnd(_arg1:Array){
onTween(_arg1);
tweenInterval = setInterval(tweenOut, 500);
}
public function onTweenOutEnd(_arg1:Array){
onTween(_arg1);
if (!endQuiz){
quizController.showNextQuestion(true);
} else {
quizController.endQuiz(false, true);
};
}
private function doNothing(_arg1:MouseEvent){
}
public function onTween(_arg1:Array){
this.width = _arg1[0];
this.x = _arg1[1];
this.height = _arg1[2];
this.y = _arg1[3];
this.alpha = _arg1[4];
}
}
}//package se.rocketxl.quiz
Section 86
//Question (se.rocketxl.quiz.Question)
package se.rocketxl.quiz {
public class Question {
var _question:String;
var _correct:int;
var _answers:Array;
public function Question(_arg1:String, _arg2:Array, _arg3:int){
_question = _arg1;
_answers = _arg2;
_correct = _arg3;
}
public function get question():String{
return (_question);
}
public function get correct():int{
return (_correct);
}
public function get answers():Array{
return (_answers);
}
}
}//package se.rocketxl.quiz
Section 87
//questionBox (se.rocketxl.quiz.questionBox)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class questionBox extends Sprite {
}
}//package se.rocketxl.quiz
Section 88
//QuizAnswer (se.rocketxl.quiz.QuizAnswer)
package se.rocketxl.quiz {
import flash.display.*;
import flash.text.*;
public class QuizAnswer extends Sprite {
public var answerText:TextField;
public var bg:quizAnswerBackground;
var answerNum:int;
public function getAnswerNum(){
return (answerNum);
}
public function setBgColor(_arg1:int){
bg.gotoAndStop(_arg1);
}
public function setAnswerNum(_arg1:int){
answerNum = _arg1;
}
public function setText(_arg1:String){
answerText.htmlText = _arg1;
}
}
}//package se.rocketxl.quiz
Section 89
//quizAnswerBackground (se.rocketxl.quiz.quizAnswerBackground)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class quizAnswerBackground extends MovieClip {
}
}//package se.rocketxl.quiz
Section 90
//QuizController (se.rocketxl.quiz.QuizController)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import se.rocketxl.quiz.server.*;
import se.rocketxl.track.*;
import flash.utils.*;
public class QuizController extends Sprite {
var active:Boolean;// = false
var lights:Lights;
var grabSend:GrabSend;
var answerTimer:Timer;
var timerTracker:Timer;
var quizState:QuizState;
var serverController:ServerController;
var quizScore:int;// = 0
var timeUp;
var latestScore:int;
var gameMusic:GameMusic;
public var hsBtn:SimpleButton;
var correct:CorrectHolder;
public var grabBtn:SimpleButton;
public var avatar:int;
var hostHolder:HostHolder;
var quizStarted:Boolean;
var timeout:Boolean;// = false
var activeRightWrong;
var totalScore:TotalScoreCount;
public var drapes:Drapes;
public var hostMask:MovieClip;
var highScoreTopTen:HighScoreTopTen;
public var _drapes:Drapes;
var nextQuestion;
var avatarThumb:AvatarThumb;
static var SITE_ID:String = "47";
static var TIME_SITE_ID:String = "49";
static var SHOW_RIGHT_ANSWER_TIME:int = 1000;
static var CAMPAIGN_ID:String = "2569";
static var TIME_ACTION_ID:String = "47";
public function QuizController(){
quizScore = 0;
active = false;
timeout = false;
super();
addEventListener(Event.ENTER_FRAME, onEnterFrame);
_drapes = (drapes as Drapes);
gameMusic = new GameMusic();
Track.setTrackerURL("http://www.rocketxl.com/track.php");
Track.setSiteId(SITE_ID);
Track.setCampaign(CAMPAIGN_ID);
Track.trackVisitor();
timerTracker = new Timer(30000);
timerTracker.addEventListener(TimerEvent.TIMER, onTimerTrack);
timerTracker.start();
stage.addEventListener(MouseEvent.MOUSE_DOWN, onGlobalMouseDown);
}
public function gotoStartState(){
removeChild(correct);
quizScore = 0;
removeChild(avatarThumb);
removeChild(totalScore);
quizStarted = false;
removeChild(quizState);
setQuizStartState();
}
public function StartQuizforSweepstakes(_arg1:String){
startQuizSession();
}
public function showGrabSend(_arg1:MouseEvent){
if ((quizState is EndSplashState)){
(quizState as EndSplashState).clearStream();
};
removeChild(quizState);
if (quizStarted){
quizState.stopTimer();
removeChild(correct);
quizScore = 0;
removeChild(avatarThumb);
removeChild(totalScore);
hostHolder.enable(false);
_drapes.closeDrapes();
gameMusic.stopMusic();
};
quizStarted = false;
grabSend = new GrabSend(this);
addChild(grabSend);
}
public function setHost(_arg1:Boolean){
hostHolder.enable(true);
}
public function giveAnswer(_arg1:int){
var _local2:*;
var _local3:Boolean;
var _local4:BuzzSoundWrong;
if (serverController.giveAnswer(_arg1)){
quizState.setScore(true);
activeRightWrong = new PopRight(this);
playSound(avatar);
} else {
quizState.setScore(false);
_local3 = correct.setFalse(false);
activeRightWrong = new PopWrong(this, _local3);
_local4 = new BuzzSoundWrong();
_local4.play();
};
quizState.stopTimer();
addChild(activeRightWrong);
}
public function removeTopTen(){
removeChild(highScoreTopTen);
setQuizStartState();
}
public function showSendToFriend(){
removeChild(quizState);
quizState = new SendToFriendState(this);
addChild(quizState);
}
public function onTimerTrack(_arg1:TimerEvent){
if (active){
Track.trackTimeAction(TIME_SITE_ID, TIME_ACTION_ID, CAMPAIGN_ID);
active = false;
trace("Time Action");
} else {
timerTracker.stop();
timeout = true;
active = false;
trace("Time Out");
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onGlobalMouseEvent);
};
}
public function chooseAvatar(){
removeChild(quizState);
quizState = new ChooseAvatarGUI(this);
addChildAt(quizState, 6);
}
public function setTotalScoreCount(_arg1:String, _arg2:Boolean){
var _local3:String;
var _local4:*;
if (_arg2){
quizScore = (quizScore + int(_arg1));
} else {
quizScore = (quizScore - int(_arg1));
if (quizScore < 0){
quizScore = 0;
};
};
latestScore = quizScore;
_local3 = (quizScore + "");
_local4 = _local3.length;
while (_local4 < 6) {
_local3 = ("0" + _local3);
_local4++;
};
totalScore.setScore(_local3, true);
}
public function setQuizStartState(){
quizState = new QuizStartState(this);
addChild(quizState);
}
public function removeGrabSend(){
removeChild(grabSend);
setQuizStartState();
}
public function timesUp(){
timeUp = new TimeUp(this);
addChild(timeUp);
}
public function createServerConnection(){
serverController = new ServerEmulator(this);
}
public function showHighscore(_arg1:String, _arg2:String, _arg3:String){
removeChild(quizState);
quizState = new HighScoreState(this, _arg1, _arg2, _arg3);
addChild(quizState);
}
public function onGlobalMouseDown(_arg1:MouseEvent){
stage.addEventListener(MouseEvent.MOUSE_MOVE, onGlobalMouseEvent);
onGlobalMouseEvent(_arg1);
}
public function continueQuiz(){
var _local1:Question;
quizState.startTimer();
removeChild(nextQuestion);
_local1 = serverController.getNextQuestion();
if (_local1 != null){
quizState.uppdateQuestion(_local1);
} else {
trace("Error out of questions");
endQuiz(false, false);
};
}
public function signup(){
removeChild(quizState);
quizState = new CollectInfoState(this);
addChild(quizState);
}
public function onEnterFrame(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
createServerConnection();
setQuizStartState();
hostHolder = new HostHolder(this);
hostHolder.mask = hostMask;
grabBtn.addEventListener(MouseEvent.MOUSE_UP, showGrabSend);
hsBtn.addEventListener(MouseEvent.MOUSE_UP, showTopTen);
addChildAt(hostHolder, 4);
lights = new Lights();
addChildAt(lights, 6);
}
public function doCleanUp(_arg1:Boolean){
removeChild(quizState);
quizState = new EndSplashState(this);
addChild(quizState);
}
public function startQuizSession(){
serverController.startQuizSession();
}
public function showNextQuestion(_arg1:Boolean){
if (_arg1){
removeChild(activeRightWrong);
} else {
removeChild(timeUp);
};
nextQuestion = new NextQuestion(this);
addChild(nextQuestion);
}
public function endQuiz(_arg1:Boolean, _arg2:Boolean){
var _local3:String;
hostHolder.enable(false);
_drapes.closeDrapes();
gameMusic.stopMusic();
quizState.stopTimer();
if (_arg1){
removeChild(timeUp);
};
if (_arg2){
removeChild(activeRightWrong);
};
removeChild(quizState);
quizState = new EndQuizState(this);
quizState.x = 46;
quizState.y = 86;
_local3 = (latestScore + "");
quizState.setWinningsText(_local3);
addChild(quizState);
}
public function playSound(_arg1:int){
var _local2:BuzzSound0;
var _local3:BuzzSound1;
var _local4:BuzzSound2;
var _local5:BuzzSound3;
var _local6:BuzzSound4;
var _local7:BuzzSound5;
var _local8:BuzzSound6;
var _local9:BuzzSound7;
var _local10:BuzzSound8;
var _local11:BuzzSound9;
var _local12:BuzzSound10;
var _local13:BuzzSound11;
var _local14:BuzzSound12;
var _local15:BuzzSound13;
var _local16:BuzzSound14;
var _local17:BuzzSound15;
var _local18:BuzzSound16;
switch (_arg1){
case 0:
_local2 = new BuzzSound0();
_local2.play();
break;
case 1:
_local3 = new BuzzSound1();
_local3.play();
break;
case 2:
_local4 = new BuzzSound2();
_local4.play();
break;
case 3:
_local5 = new BuzzSound3();
_local5.play();
break;
case 4:
_local6 = new BuzzSound4();
_local6.play();
break;
case 5:
_local7 = new BuzzSound5();
_local7.play();
break;
case 6:
_local8 = new BuzzSound6();
_local8.play();
break;
case 7:
_local9 = new BuzzSound7();
_local9.play();
break;
case 8:
_local10 = new BuzzSound8();
_local10.play();
break;
case 9:
_local11 = new BuzzSound9();
_local11.play();
break;
case 10:
_local12 = new BuzzSound10();
_local12.play();
break;
case 11:
_local13 = new BuzzSound11();
_local13.play();
break;
case 12:
_local14 = new BuzzSound12();
_local14.play();
break;
case 13:
_local15 = new BuzzSound13();
_local15.play();
break;
case 14:
_local16 = new BuzzSound14();
_local16.play();
break;
case 15:
_local17 = new BuzzSound15();
_local17.play();
break;
case 16:
_local18 = new BuzzSound16();
_local18.play();
break;
};
}
public function startQuiz(_arg1:int){
quizStarted = true;
avatar = _arg1;
removeChild(quizState);
quizState = new QuizGUI(this);
addChild(quizState);
avatarThumb = new AvatarThumb(this);
addChild(avatarThumb);
totalScore = new TotalScoreCount();
addChild(totalScore);
correct = new CorrectHolder(this);
addChild(correct);
hostHolder.enable(true);
drapes.separateDrapes();
quizState.startQuiz();
gameMusic.startMusic();
nextQuestion = new NextQuestion(this);
addChild(nextQuestion);
}
public function sendUserInfo(_arg1:String){
trace(("Applayed For winnings with e-mail: " + _arg1));
removeChild(quizState);
quizState = new EndQuizState(this);
addChild(quizState);
}
public function showTopTen(_arg1:MouseEvent){
if (quizStarted){
removeChild(correct);
quizScore = 0;
removeChild(avatarThumb);
removeChild(totalScore);
hostHolder.enable(false);
quizState.stopTimer();
_drapes.closeDrapes();
gameMusic.stopMusic();
};
if ((quizState is EndSplashState)){
(quizState as EndSplashState).clearStream();
};
removeChild(quizState);
quizStarted = false;
highScoreTopTen = new HighScoreTopTen(this);
addChild(highScoreTopTen);
}
public function onGlobalMouseEvent(_arg1:MouseEvent){
if (timeout){
timeout = false;
timerTracker.reset();
timerTracker.start();
active = false;
} else {
active = true;
};
}
}
}//package se.rocketxl.quiz
Section 91
//QuizGUI (se.rocketxl.quiz.QuizGUI)
package se.rocketxl.quiz {
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class QuizGUI extends QuizState {
public var questionText:TextField;
var answerTimer:Timer;
public var timer:TimeCount;
var timeOutShown:Boolean;
var answers:Array;
var question:Question;
static var TOTAL_SCORE:int = 100;
static var ANSWER_TIME_LIMIT:int = 100;
static var BUTTON_START_Y:int = 160;
public function QuizGUI(_arg1:Object){
super(_arg1);
answerTimer = new Timer(100, ANSWER_TIME_LIMIT);
answerTimer.addEventListener(TimerEvent.TIMER, onUpdateTime);
answerTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimeOut);
_arg1.setHost(true);
}
override public function startTimer():void{
answerTimer.reset();
timer.setTimer("0100");
answerTimer.start();
timeOutShown = false;
}
public function setNewTimer():void{
answerTimer.reset();
answerTimer.start();
timeOutShown = false;
}
public function setupAnswers(){
var _local1:int;
var _local2:int;
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:String;
var _local7:QuizAnswer;
_local1 = BUTTON_START_Y;
answers = new Array();
_local2 = 1;
_local3 = question.answers;
_local4 = makeRandomArray();
_local5 = 0;
for each (_local6 in question.answers) {
_local7 = new QuizAnswer();
_local7.setBgColor(_local2);
_local7.setText(_local3[_local4[_local5]]);
_local7.setAnswerNum(_local4[_local5]);
addChild(_local7);
_local7.y = _local1;
_local7.x = 248;
_local7.buttonMode = true;
_local7.addEventListener(MouseEvent.MOUSE_UP, onAnswer);
answers[answers.length] = _local7;
_local2++;
_local1 = (_local1 + 56);
_local5++;
};
}
override public function setScore(_arg1:Boolean):void{
var _local2:int;
_local2 = (TOTAL_SCORE - answerTimer.currentCount);
quizController.setTotalScoreCount(_local2, _arg1);
setNewTimer();
}
public function onTimeOut(_arg1:TimerEvent){
if (!timeOutShown){
quizController.timesUp();
clearEventListeners();
timeOutShown = true;
};
}
override public function stopTimer():void{
answerTimer.stop();
}
override public function uppdateQuestion(_arg1:Question):void{
clearQuestion();
this.question = _arg1;
questionText.htmlText = _arg1.question;
setupAnswers();
}
public function onUpdateTime(_arg1:TimerEvent){
var _local2:String;
var _local3:*;
_local2 = ((TOTAL_SCORE - answerTimer.currentCount) + "");
_local3 = _local2.length;
while (_local3 < 4) {
_local2 = ("0" + _local2);
_local3++;
};
timer.setTimer(_local2);
}
public function onAnswer(_arg1:MouseEvent){
var _local2:QuizAnswer;
var _local3:int;
var _local4:QuizAnswer;
clearEventListeners();
_local2 = _arg1.target.parent;
_local3 = -1;
for each (_local4 in answers) {
_local3++;
if (_local2.getAnswerNum() == answers[_local3].getAnswerNum()){
quizController.giveAnswer(answers[_local3].getAnswerNum());
};
};
}
public function makeRandomArray(){
var _local1:Array;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = new Array();
do {
_local2 = Math.floor((Math.random() * 4));
_local3 = true;
_local4 = 0;
while (_local4 < _local1.length) {
if (_local2 == _local1[_local4]){
_local3 = false;
};
_local4++;
};
if (_local3){
_local1.push(_local2);
};
} while (_local1.length < 4);
return (_local1);
}
public function clearQuestion(){
var _local1:QuizAnswer;
if (question != null){
question = null;
};
if (answers != null){
for each (_local1 in answers) {
removeChild(_local1);
};
answers = null;
};
}
public function clearEventListeners(){
var _local1:QuizAnswer;
for each (_local1 in answers) {
_local1.removeEventListener(MouseEvent.MOUSE_UP, onAnswer);
};
}
override public function startQuiz():void{
answerTimer.reset();
timer.setTimer("0100");
}
}
}//package se.rocketxl.quiz
Section 92
//QuizStartButton (se.rocketxl.quiz.QuizStartButton)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class QuizStartButton extends Sprite {
}
}//package se.rocketxl.quiz
Section 93
//QuizStartState (se.rocketxl.quiz.QuizStartState)
package se.rocketxl.quiz {
import flash.net.*;
import flash.events.*;
import se.rocketxl.track.*;
public class QuizStartState extends QuizState {
public var playforFun:startGameButton;
public var prizing:button;
public var instructions:button;
public var rules:button;
public function QuizStartState(_arg1:Object){
super(_arg1);
this.x = 46;
this.y = 70;
instructions.buttonMode = true;
rules.buttonMode = true;
prizing.buttonMode = true;
playforFun.buttonMode = true;
instructions.addEventListener(MouseEvent.MOUSE_UP, onInstructions);
rules.addEventListener(MouseEvent.MOUSE_UP, onRules);
playforFun.addEventListener(MouseEvent.MOUSE_UP, onPlayforFun);
prizing.addEventListener(MouseEvent.MOUSE_UP, onPrizing);
}
public function onInstructions(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.rocketxl.com/buzz/instructions.php";
_local3 = new URLRequest(_local2);
navigateToURL(_local3);
}
public function onRules(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.rocketxl.com/buzz/rules.php";
_local3 = new URLRequest(_local2);
navigateToURL(_local3);
}
public function onPlayforFun(_arg1:MouseEvent){
quizController.startQuizSession();
Track.trackAction("112");
}
public function onPrizing(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.rocketxl.com/buzz/prizing.php";
_local3 = new URLRequest(_local2);
navigateToURL(_local3);
}
}
}//package se.rocketxl.quiz
Section 94
//QuizState (se.rocketxl.quiz.QuizState)
package se.rocketxl.quiz {
import flash.display.*;
public class QuizState extends Sprite {
protected var quizController:Object;
public function QuizState(_arg1:Object){
this.quizController = _arg1;
}
public function startTimer():void{
}
public function doFadeOut(_arg1:Object, _arg2:Boolean):void{
}
public function setWinningsText(_arg1:String):void{
}
public function setScore(_arg1:Boolean):void{
}
public function stopTimer():void{
}
public function uppdateQuestion(_arg1:Question):void{
}
public function setWrong():void{
}
public function getSoundFile(_arg1:int):void{
}
public function setCorrect():void{
}
public function startQuiz():void{
}
}
}//package se.rocketxl.quiz
Section 95
//scoreNumBar (se.rocketxl.quiz.scoreNumBar)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class scoreNumBar extends Sprite {
}
}//package se.rocketxl.quiz
Section 96
//SendToFriendState (se.rocketxl.quiz.SendToFriendState)
package se.rocketxl.quiz {
public class SendToFriendState extends QuizState {
public function SendToFriendState(_arg1:Object){
super(_arg1);
}
}
}//package se.rocketxl.quiz
Section 97
//startGameButton (se.rocketxl.quiz.startGameButton)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class startGameButton extends Sprite {
}
}//package se.rocketxl.quiz
Section 98
//TimeCount (se.rocketxl.quiz.TimeCount)
package se.rocketxl.quiz {
import flash.display.*;
import fl.transitions.*;
import fl.transitions.easing.*;
public class TimeCount extends Sprite {
private var timePos:Array;
private var numBars:Array;
public var num1:timeNumBar;
public var num4:timeNumBar;
public var num3:timeNumBar;
public var num2:timeNumBar;
public function TimeCount(){
timePos = new Array();
numBars = new Array();
super();
timePos.push(1, 34, 69, 103, 138, 172, 205, 241, 275, 311);
numBars.push(num1, num2, num3, num4);
this.x = 284;
this.y = 388;
setTimer("0000");
}
public function setTimer(_arg1:String){
var _local2:*;
_local2 = 0;
while (_local2 < _arg1.length) {
displayTime(_arg1.charAt(_local2), ((_arg1.length - _local2) - 1));
_local2++;
};
}
public function displayTime(_arg1:String, _arg2:int){
new Tween(numBars[_arg2], "y", Elastic.easeOut, numBars[_arg2].y, -(timePos[_arg1]), 0.8, true);
}
}
}//package se.rocketxl.quiz
Section 99
//timeNumBar (se.rocketxl.quiz.timeNumBar)
package se.rocketxl.quiz {
import flash.display.*;
public dynamic class timeNumBar extends Sprite {
}
}//package se.rocketxl.quiz
Section 100
//TimeUp (se.rocketxl.quiz.TimeUp)
package se.rocketxl.quiz {
import flash.display.*;
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.utils.*;
public class TimeUp extends Sprite {
var hTween:Tween;
var wTween:Tween;
var tweenInterval:uint;
var yTween:Tween;
public var catchClick:block;
var quizController:Object;
var xTween:Tween;
var tweenIn:Tween;
public function TimeUp(_arg1:Object){
quizController = _arg1;
catchClick.addEventListener(MouseEvent.MOUSE_UP, doNothing);
wTween = new Tween(this, "width", None.easeIn, 400, 505, 0.2, true);
xTween = new Tween(this, "x", None.easeIn, 60, 0, 0.2, true);
hTween = new Tween(this, "height", None.easeIn, 400, 486, 0.2, true);
yTween = new Tween(this, "y", None.easeIn, 40, 0, 0.2, true);
tweenIn = new Tween(this, "alpha", None.easeIn, 0, 1, 0.6, true);
tweenIn.addEventListener(TweenEvent.MOTION_FINISH, tweenOutDelay);
}
public function tweenOut(){
var _local1:Tween;
wTween = new Tween(this, "width", None.easeIn, 505, 400, 0.2, true);
xTween = new Tween(this, "x", None.easeIn, 0, 60, 0.2, true);
hTween = new Tween(this, "height", None.easeIn, 486, 400, 0.2, true);
yTween = new Tween(this, "y", None.easeIn, 0, 40, 0.2, true);
_local1 = new Tween(this, "alpha", None.easeOut, 1, 0, 0.2, true);
_local1.addEventListener(TweenEvent.MOTION_FINISH, tweenOutDone);
clearInterval(tweenInterval);
}
public function tweenOutDone(_arg1:TweenEvent){
quizController.correct.setFalse(true);
}
public function tweenOutDelay(_arg1:TweenEvent){
tweenInterval = setInterval(tweenOut, 500);
}
private function doNothing(_arg1:MouseEvent){
}
}
}//package se.rocketxl.quiz
Section 101
//TotalScoreCount (se.rocketxl.quiz.TotalScoreCount)
package se.rocketxl.quiz {
import flash.display.*;
import fl.transitions.*;
import flash.filters.*;
import fl.transitions.easing.*;
import flash.utils.*;
public class TotalScoreCount extends Sprite {
var saveScore:String;
var barTween:Tween;
private var scorePos:Array;
private var numBars:Array;
public var num1:scoreNumBar;
public var num4:scoreNumBar;
public var num5:scoreNumBar;
public var num6:scoreNumBar;
public var num3:scoreNumBar;
public var num2:scoreNumBar;
var numToChange:Array;
var blurFilterArray:Array;
public function TotalScoreCount(){
var _local1:BitmapFilter;
scorePos = new Array();
numBars = new Array();
blurFilterArray = new Array();
numToChange = new Array();
super();
scorePos.push("0", "39", "78", "118", "158", "197", "236", "275", "315", "355");
numBars.push(num1, num2, num3, num4, num5, num6);
this.x = 297;
this.y = 12;
saveScore = "";
_local1 = getBitmapFilter();
blurFilterArray.push(_local1);
setScore("000000", false);
}
public function setScore(_arg1:String, _arg2:Boolean){
var _local3:Boolean;
var _local4:Boolean;
var _local5:*;
saveScore = _arg1;
changeWhatNums(_arg1);
setBlur(true);
_local5 = 0;
while (_local5 < numToChange.length) {
_local3 = false;
_local4 = false;
if ((((_local5 == (numToChange.length - 1))) && (_arg2))){
_local3 = true;
};
if (_local5 == 0){
_local4 = true;
};
displayScore(_arg1.charAt(_local5), _local5, _local3, _local4);
_local5++;
};
}
public function forceSetScore(_arg1:TweenEvent){
new Tween(numBars[5], "y", Elastic.easeOut, numBars[5].y, -(scorePos[saveScore.charAt(0)]), 0.6, true);
new Tween(numBars[4], "y", Elastic.easeOut, numBars[4].y, -(scorePos[saveScore.charAt(1)]), 0.6, true);
new Tween(numBars[3], "y", Elastic.easeOut, numBars[3].y, -(scorePos[saveScore.charAt(2)]), 0.6, true);
new Tween(numBars[2], "y", Elastic.easeOut, numBars[2].y, -(scorePos[saveScore.charAt(3)]), 0.6, true);
new Tween(numBars[1], "y", Elastic.easeOut, numBars[1].y, -(scorePos[saveScore.charAt(4)]), 0.6, true);
new Tween(numBars[0], "y", Elastic.easeOut, numBars[0].y, -(scorePos[saveScore.charAt(5)]), 0.6, true);
setBlur(false);
barTween.removeEventListener(TweenEvent.MOTION_FINISH, forceSetScore);
}
public function changeWhatNums(_arg1:String){
var _local2:*;
numToChange.length = 0;
_local2 = 0;
while (_local2 < _arg1.length) {
if (numBars[_local2].y != (scorePos[_arg1.charAt(((_arg1.length - 1) - _local2))] * -1)){
numToChange.push(numBars[_local2]);
};
_local2++;
};
}
public function setBlur(_arg1:Boolean){
var _local2:*;
_local2 = 0;
while (_local2 < numToChange.length) {
if (_arg1){
numToChange[_local2].filters = blurFilterArray;
} else {
numToChange[_local2].filters = null;
};
_local2++;
};
}
public function displayScore(_arg1:String, _arg2:int, _arg3:Boolean, _arg4:Boolean){
barTween = new Tween(numToChange[_arg2], "y", Elastic.easeIn, numToChange[_arg2].y, -(scorePos[_arg1]), 0.6, true);
if (_arg3){
barTween.addEventListener(TweenEvent.MOTION_FINISH, forceSetScore);
};
}
public function getBitmapFilter():BitmapFilter{
var _local1:Number;
var _local2:Number;
_local1 = 0;
_local2 = 4;
return (new BlurFilter(_local1, _local2, BitmapFilterQuality.HIGH));
}
}
}//package se.rocketxl.quiz
Section 102
//Track (se.rocketxl.track.Track)
package se.rocketxl.track {
import flash.net.*;
public class Track {
protected var _st:String;// = ""
protected var trackURL:URLRequest;// = null
protected var _campaign:String;// = ""
protected var _trackerUrl:String;// = ""
protected var _sc:String;// = "track"
public static var ROTATE_3D_SCENE:String = "54";
public static var VOLUME_CHANGED:String = "18";
public static var GOTO_PREVIOUS_3D_SCENE:String = "10";
public static var GOTO_NEXT_IMAGE:String = "7";
public static var GOTO_NEXT_3D_SCENE:String = "9";
public static var GOTO_PREVIOUS_IMAGE:String = "8";
public static var OFFICIAL_SITE:String = "55";
public static var GOTO_IMAGE_THUMB:String = "11";
public static var GOTO_IMAGE:String = "5";
public static var TIMER_EVENT:String = "52";
public static var TRACKER_URL:String = "http://dev.rocketxl.se/cod4/tracking/index2.php";
public static var VIDEO_FINISHED:String = "17";
public static var SCRUBB_VIDEO:String = "16";
public static var GOTO_3D_SCENE_THUMB:String = "13";
public static var GOTO_VIDEO_THUMB:String = "12";
protected static var tracking:Boolean = true;
protected static var tracker:Track = null;
public static var SWITCH_MEDIA:String = "53";
public static var GOTO_3D_SCENE:String = "6";
public static var GOTO_VIDEO:String = "3";
public function Track(){
_trackerUrl = "";
_sc = "track";
_st = "";
_campaign = "";
trackURL = null;
super();
}
public function set campaign(_arg1:String){
this._campaign = _arg1;
}
public function doActionTrack(_arg1:String){
var _local2:URLVariables;
if (trackURL != null){
_local2 = setupVariabels();
_local2.action = "event";
_local2.eid = _arg1;
trackURL.data = _local2;
trace((("Action: " + trackURL.url) + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function set siteId(_arg1:String){
this._st = _arg1;
}
public function set trackerUrl(_arg1:String){
_trackerUrl = _arg1;
trackURL = new URLRequest(_trackerUrl);
}
public function get campaign():String{
return (_campaign);
}
public function doVisitorTrack(){
var _local1:URLVariables;
if (trackURL != null){
_local1 = setupVariabels();
_local1.action = "default";
trackURL.data = _local1;
trace((("Visitor: " + trackURL.url) + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function doSaleTrack(_arg1:String, _arg2:String){
var _local3:URLVariables;
if (trackURL != null){
_local3 = setupVariabels();
_local3.action = "sale";
if (_arg1 != ""){
_local3.product = _arg1;
};
if (_arg2 != ""){
_local3.d = _arg2;
};
trackURL.data = _local3;
trace((("Sale: " + trackURL.url) + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function doTimeTrack(_arg1:String, _arg2:String, _arg3:String){
var _local4:URLVariables;
if (trackURL != null){
_local4 = setupVariabels();
_local4.action = "event";
_local4.eid = _arg2;
_local4.st = _arg1;
_local4.c = _arg3;
trackURL.data = _local4;
trace((("Time: " + trackURL.url) + trackURL.data));
sendToURL(trackURL);
} else {
trace("Tracker not setup properly");
};
}
public function setupVariabels():URLVariables{
var _local1:URLVariables;
_local1 = new URLVariables();
_local1.sc = _sc;
if (_st != ""){
_local1.st = _st;
} else {
trace("No SiteId to track");
return (null);
};
if (_campaign != ""){
_local1.c = _campaign;
} else {
trace("No campaign to track");
};
return (_local1);
}
public static function trackSale(_arg1:String="", _arg2:String=""){
if (((!((tracker == null))) && (tracking))){
tracker.doSaleTrack(_arg1, _arg2);
};
}
public static function getCampaign():String{
if (tracker != null){
return (tracker.campaign);
};
return ("");
}
public static function setTracking(_arg1:Boolean){
tracking = _arg1;
}
public static function setCampaign(_arg1:String){
if (tracker == null){
tracker = new (Track);
};
tracker.campaign = _arg1;
}
public static function setSiteId(_arg1:String){
if (tracker == null){
tracker = new (Track);
};
tracker.siteId = _arg1;
}
public static function trackTimeAction(_arg1:String, _arg2:String, _arg3:String){
if (((!((tracker == null))) && (tracking))){
tracker.doTimeTrack(_arg1, _arg2, _arg3);
};
}
public static function setTrackerURL(_arg1:String){
if (tracker == null){
tracker = new (Track);
};
tracker.trackerUrl = _arg1;
}
public static function trackAction(_arg1:String){
if (((!((tracker == null))) && (tracking))){
tracker.doActionTrack(_arg1);
};
}
public static function trackVisitor(){
if (((!((tracker == null))) && (tracking))){
tracker.doVisitorTrack();
};
}
}
}//package se.rocketxl.track
Section 103
//AlphaTransition (se.rocketxl.util.transitions.AlphaTransition)
package se.rocketxl.util.transitions {
import flash.display.*;
import mx.effects.*;
public class AlphaTransition extends Transition {
protected var _secondAlpha:Number;
protected var _cykleStates:Boolean;// = false
protected var _changeVisiblity:Boolean;// = false
protected var _firstAlpha:Number;
protected var transitionTween:Tween;// = null
public static var SECOND_ALPHA:String = "secondAlpha";
public static var FIRST_ALPHA:String = "firstAlpha";
public function AlphaTransition(_arg1:DisplayObject, _arg2:Number, _arg3:Number){
_changeVisiblity = false;
_cykleStates = false;
transitionTween = null;
super(_arg1);
_firstAlpha = _arg2;
_secondAlpha = _arg3;
}
public function onTween(_arg1:Number){
_transObject.alpha = _arg1;
}
public function set cykleStates(_arg1:Boolean){
_cykleStates = _arg1;
}
public function changeVisibility(_arg1:Boolean){
_changeVisiblity = _arg1;
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
if (((_changeVisiblity) && ((_state == FIRST_ALPHA)))){
_transObject.visible = false;
};
if (((_cykleStates) && ((_state == FIRST_ALPHA)))){
gotoState(SECOND_ALPHA);
} else {
if (((_cykleStates) && ((_state == SECOND_ALPHA)))){
gotoState(FIRST_ALPHA);
};
};
transitionTween = null;
if (_targetState != _state){
doStateTransition();
};
}
override protected function doStateTransition(){
if (_targetState != _state){
_state = _targetState;
if (transitionTween != null){
transitionTween.pause();
};
if (_state == FIRST_ALPHA){
transitionTween = new Tween(this, _transObject.alpha, _firstAlpha, _firstDuration);
transitionTween.setTweenHandlers(onTween, onTweenEnd);
};
if (_state == SECOND_ALPHA){
if (_changeVisiblity){
_transObject.visible = true;
};
transitionTween = new Tween(this, _transObject.alpha, _secondAlpha, _secondDuration);
transitionTween.setTweenHandlers(onTween, onTweenEnd);
};
};
}
}
}//package se.rocketxl.util.transitions
Section 104
//Transition (se.rocketxl.util.transitions.Transition)
package se.rocketxl.util.transitions {
import flash.display.*;
public class Transition {
protected var _targetState:String;
protected var _firstDuration:Number;
protected var _transObject:DisplayObject;
protected var _state:String;
protected var _secondDuration:Number;
public static var DEFAULT_DURATION:Number = 500;
public static var NO_STATE:String = "noState";
public function Transition(_arg1:DisplayObject){
_state = NO_STATE;
_targetState = NO_STATE;
_firstDuration = DEFAULT_DURATION;
_secondDuration = DEFAULT_DURATION;
super();
_transObject = _arg1;
}
public function set firstDuration(_arg1:Number){
_firstDuration = _arg1;
}
public function gotoState(_arg1:String){
_targetState = _arg1;
doStateTransition();
}
protected function doStateTransition(){
}
public function set duration(_arg1:Number){
_firstDuration = _arg1;
_secondDuration = _arg1;
}
public function getState():String{
return (_state);
}
public function set secondDuration(_arg1:Number){
_secondDuration = _arg1;
}
}
}//package se.rocketxl.util.transitions
Section 105
//YPositionTransition (se.rocketxl.util.transitions.YPositionTransition)
package se.rocketxl.util.transitions {
import flash.display.*;
import mx.effects.*;
public class YPositionTransition extends Transition {
protected var _pos1Easing:Function;// = null
protected var _secondYPos:Number;
protected var _pos2Easing:Function;// = null
protected var _firstYPos:Number;
protected var transitionTween:Tween;// = null
public static var FIRST_YPOS:String = "firstYpos";
public static var SECOND_YPOS:String = "secondYpos";
public function YPositionTransition(_arg1:DisplayObject, _arg2:Number, _arg3:Number){
_pos1Easing = null;
_pos2Easing = null;
transitionTween = null;
super(_arg1);
_firstYPos = _arg2;
_secondYPos = _arg3;
}
public function onTween(_arg1:Number){
_transObject.y = _arg1;
}
public function setPos1Easing(_arg1:Function){
_pos1Easing = _arg1;
}
public function setPos2Easing(_arg1:Function){
_pos2Easing = _arg1;
}
public function onTweenEnd(_arg1:Number){
onTween(_arg1);
transitionTween = null;
if (_targetState != _state){
doStateTransition();
};
}
override protected function doStateTransition(){
if (_targetState != _state){
_state = _targetState;
if (transitionTween != null){
transitionTween.pause();
};
if (_state == FIRST_YPOS){
transitionTween = new Tween(this, _transObject.y, _firstYPos, _firstDuration);
transitionTween.setTweenHandlers(onTween, onTweenEnd);
if (_pos1Easing != null){
transitionTween.easingFunction = _pos1Easing;
};
};
if (_state == SECOND_YPOS){
transitionTween = new Tween(this, _transObject.y, _secondYPos, _secondDuration);
transitionTween.setTweenHandlers(onTween, onTweenEnd);
if (_pos2Easing != null){
transitionTween.easingFunction = _pos2Easing;
};
};
};
}
public function setSecondPos(_arg1:Number){
_secondYPos = _arg1;
}
}
}//package se.rocketxl.util.transitions
Section 106
//LeafLoader (se.rocketxl.util.LeafLoader)
package se.rocketxl.util {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class LeafLoader extends Sprite {
var visibleLeafCounter:int;
var grayLeafsObject:Sprite;
var grayLeafArray:Array;
var whiteLeafArray:Array;
var whiteLeafsObject:Sprite;
var loaderTimer:Timer;
public function LeafLoader(){
createandRotateLeafs();
loaderTimer = new Timer(200);
loaderTimer.addEventListener(TimerEvent.TIMER, onUppdateLoaderIcon);
visibleLeafCounter = 0;
}
public function startLoaderIcon(){
loaderTimer.start();
}
public function stopLoaderIcon(){
loaderTimer.stop();
}
public function onUppdateLoaderIcon(_arg1:TimerEvent){
whiteLeafArray[visibleLeafCounter].fadeOut();
visibleLeafCounter++;
if (visibleLeafCounter >= whiteLeafArray.length){
visibleLeafCounter = 0;
};
}
private function createandRotateLeafs(){
var _local1:Number;
grayLeafArray = new Array();
grayLeafsObject = new Sprite();
whiteLeafArray = new Array();
whiteLeafsObject = new Sprite();
_local1 = 0;
while (_local1 < 8) {
grayLeafArray[_local1] = new LoaderLeafGray();
grayLeafArray[_local1].rotation = ((360 / 8) * _local1);
grayLeafsObject.addChild(grayLeafArray[_local1]);
whiteLeafArray[_local1] = new LoaderLeafWhite();
whiteLeafArray[_local1].rotation = ((360 / 8) * _local1);
whiteLeafArray[_local1].alpha = 0;
whiteLeafsObject.addChild(whiteLeafArray[_local1]);
_local1++;
};
addChild(grayLeafsObject);
addChild(whiteLeafsObject);
}
}
}//package se.rocketxl.util
Section 107
//LoaderLeafGray (se.rocketxl.util.LoaderLeafGray)
package se.rocketxl.util {
import flash.display.*;
public dynamic class LoaderLeafGray extends Sprite {
}
}//package se.rocketxl.util
Section 108
//LoaderLeafWhite (se.rocketxl.util.LoaderLeafWhite)
package se.rocketxl.util {
import mx.effects.*;
import flash.display.*;
public class LoaderLeafWhite extends Sprite {
public function fadeOut(){
var _local1:Tween;
_local1 = new Tween(this, 2, 0, 2000);
_local1.setTweenHandlers(onTweenFade, onTweenFade);
}
public function onTweenFade(_arg1:Number){
alpha = _arg1;
}
}
}//package se.rocketxl.util
Section 109
//GameMusicLoop (GameMusicLoop)
package {
import flash.media.*;
public dynamic class GameMusicLoop extends Sound {
}
}//package
Section 110
//PreLoader (PreLoader)
package {
import flash.events.*;
import se.rocketxl.util.*;
import flash.display.*;
public class PreLoader extends MovieClip {
var loaderIcon:LeafLoader;
public var prescreen:MovieClip;
public function PreLoader(){
addEventListener(Event.ENTER_FRAME, onPreloaderFrame);
stop();
loaderIcon = new LeafLoader();
loaderIcon.x = (stage.stageWidth / 2);
loaderIcon.y = (stage.stageHeight / 2);
addChild(loaderIcon);
loaderIcon.startLoaderIcon();
loaderIcon.x = (stage.stageWidth / 2);
loaderIcon.y = (stage.stageHeight / 2);
}
public function onPlayGame(_arg1:MouseEvent){
removeEventListener(Event.ENTER_FRAME, onPreloaderFrame);
loaderIcon.stopLoaderIcon();
removeChild(loaderIcon);
gotoAndStop(33);
}
public function onPreloaderFrame(_arg1:Event){
if (framesLoaded > 2){
gotoAndStop(2);
};
if ((((framesLoaded == totalFrames)) && (!((prescreen == null))))){
removeEventListener(Event.ENTER_FRAME, onPreloaderFrame);
prescreen.addEventListener(MouseEvent.MOUSE_UP, onPlayGame);
prescreen.buttonMode = true;
};
}
}
}//package