wasn't able to add all the code before. essentially after a movie plays I want the swf to reset to it's first original loading frame.
function stopVideo()
{
showPlayBtn(true);
Tweener.addTween(videocontrols.stopBtn, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
myStream.stop();
myStream.seek(0);
myStream.pause(true);
if (playOnStart == "true")
{
if (!imgHolder.holder)
{
loadImage();
}
else
{
Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
} // end else if
}
else
{
Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
} // end else if
videocontrols.playBtn.gotoAndStop(1);
updateInformation(true);
} // End of the function
function playVideo()
{
if (timeOfPause && timeOfPause > 0)
{
if (tempVideo != myVideo)
{
myStream.seek(0);
} // end if
myStream.pause(false);
tempVideo = myVideo;
}
else
{
if (tempVideo != myVideo)
{
myStream.seek(0);
} // end if
myStream.play(myVideo);
tempVideo = myVideo;
} // end else if
Tweener.addTween(imgHolder.bmp, {_alpha: 0, time: 4.000000E-001, transition: "easeOutCubic"});
videocontrols.playBtn.gotoAndStop(2);
playBtn._visible = false;
} // End of the function
function startVideo()
{
myStream.seek(0);
myStream.play(myVideo);
tempVideo = myVideo;
videocontrols.playBtn.gotoAndStop(2);
playBtn._visible = false;
}// End of the function
Stage.align = "TL";
Stage.scaleMode = "noScale";
setProperty("", _quality, "HIGH");
Stage.displayState = "normal";
ASVideoPlayer._visible = false;
ASVideoPlayer._width = Stage.width;
ASVideoPlayer._height = Stage.height;
playBtn._visible = false;
playBtn._alpha = 0;
videocontrols.progressMC.progressBar._width = 0;
videocontrols.progressMC.loadingBar._width = 0;
errorMC._alpha = 0;
bufferingMC._alpha = 0;
defaultVideo = _parent.defaultVideo;
image = _parent.image;
logo = _parent.logo;
logoLink = _parent.logoLink;
logoTarget = _parent.logoTarget;
playOnStart = _parent.autoplay;
startVolume = _parent.videoVolume;
fitToPlayer = true;
bufferSize = 5;
protection = false;
domain = "as-flash.com";
doubleClickEnable = true;
doubleClickTime = 250;
checkFlashPlayerVersion = true;
FlashPlayerDownloadLink = "http://www.adobe.com/products/flashplayer/";
useKeyboardShortcuts = true;
keyVideoSeek = 5;
mouseWheelEnabled = true;
keyVideoVolume = 5;
logoX = 10;
logoY = 10;
HDbuttonX = 10;
HDbuttonY = 10;
imageLoaderX = 25;
imageLoaderY = 25;
if (!defaultVideo)
{
defaultVideo = 1;
} // end if
if (!startVolume)
{
startVolume = 50;
} // end if
if (!playOnStart)
{
playOnStart = "false";
} // end if
var newConnection = new NetConnection();
newConnection.connect("");
var myStream = new NetStream(newConnection);
myStream.setBufferTime(bufferSize);
mediaDisplay.attachVideo(myStream);
if (!soundMC)
{
this.createEmptyMovieClip("soundMC", this.getNextHighestDepth());
} // end if
soundMC.attachAudio(myStream);
var soundVolume = new Sound(soundMC);
soundVolume.setVolume(startVolume);
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = startVolume / 100 * videocontrols.volumeMC.backgroundMC._width;
startPlayer = function ()
{
memPositions();
resizePlayer();
if (videoLinkHD.length > 3)
{
flashPlayerVersionCheck();
} // end if
if (videoLink.length > 3 && videoLinkHD.length > 3)
{
this.attachMovie("QualityIcon", "QualityIcon", this.getNextHighestDepth());
QualityIcon._x = videoArea._width - QualityIcon._width - HDbuttonX;
QualityIcon._y = HDbuttonY;
QualityIcon.gotoAndStop(defaultVideo);
if (defaultVideo == "1")
{
myVideo = videoLink;
}
else
{
myVideo = videoLinkHD;
} // end else if
QualityIcon.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 80, time: 4.000000E-001, transition: "easeOutCubic"});
};
QualityIcon.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
};
QualityIcon.onPress = function ()
{
myStream.close();
mediaDisplay.clear();
Tweener.addTween(videocontrols.progressMC.progressBar, {_width: 0, time: 1, transition: "easeOutCubic"});
Tweener.addTween(videocontrols.progressMC.posMC, {_x: 0, time: 1, transition: "easeOutCubic"});
if (this._currentframe == 1)
{
myVideo = videoLinkHD;
flashPlayerVersionCheck();
this.gotoAndStop(2);
}
else
{
myVideo = videoLink;
this.gotoAndStop(1);
} // end else if
tempVideo = myVideo;
myStream.play(myVideo);
if (videocontrols.playBtn._currentframe == 1)
{
myStream.seek(0);
myStream.pause(true);
Tweener.addTween(bufferingMC, {_alpha: 0, time: 6.000000E-001, transition: "easeOutCubic"});
loadImage();
}
else
{
Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
myStream.seek(0);
myStream.pause(false);
} // end else if
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
};
} // end if
if (playOnStart == "true")
{
videocontrols.playBtn.gotoAndStop(2);
myStream.play(myVideo);
tempVideo = myVideo;
Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
updateInformation(false, "buffering");
}
else
{
updateInformation(true);
if (image.length > 0)
{
loadImage();
} // end if
videocontrols.playBtn.gotoAndStop(1);
} // end else if
if (logo.length > 3)
{
if (!logoMC)
{
this.createEmptyMovieClip("logoMC", this.getNextHighestDepth());
} // end if
logo_loader.loadClip(logo, logoMC);
} // end if
};
memPositions = function ()
{
screenW = Stage.width;
screenH = Stage.height;
videocontrolsX = videocontrols._x;
playBtnX = videocontrols.playBtn._x;
playBtnY = videocontrols.playBtn._y;
stopBtnX = videocontrols.stopBtn._x;
stopBtnY = videocontrols.stopBtn._y;
progressMCX = videocontrols.progressMC._x;
progressMCY = videocontrols.progressMC._y;
progressMCW = videocontrols.progressMC._width;
outputMCX = Stage.width - 200;
outputMCY = videocontrols.outputMC._y;
volumeonoffMCX = Stage.width - 104;
volumeonoffMCY = videocontrols.audioOnOff._y;
volumeMCX = Stage.width - 89;
volumeMCY = videocontrols.volumeMC._y;
volumeMCW = videocontrols.volumeMC._width;
fitToPlayerBtnX = Stage.width - 31;
fitToPlayerBtnY = videocontrols.fitToPlayerBtn._y;
fullscreenBtnX = Stage.width - 13;
fullscreenBtnY = videocontrols.fullscreenBtn._y;
videocontrols.progressMC.backgroundMC._width = Stage.width - videocontrols.progressMC._x - (Stage.width - videocontrols.outputMC._x) - 15;
videocontrols.progressMC.loadingBar._width = pctLoaded * videocontrols.progressMC.backgroundMC._width;
videocontrols.progressMC.outlineMC._width = videocontrols.progressMC.backgroundMC._width * 1.005000E+000;
};
myStream.onStatus = function (status)
{
errorMC._alpha = 0;
if (status.code == "NetStream.Play.Start")
{
preloadVideo();
playingVideo = true;
updateInformation(true);
resizeVideo();
} // end if
if (status.code == "NetStream.Play.Stop")
{
Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
playingVideo = false;
updateInformation(false);
progressMC.progressBar._width = 0;
} // end if
if (status.code == "NetStream.Play.StreamNotFound" || status.code == "NetStream.Play.FileStructureInvalid" || status.code == "NetStream.Play.NoSupportedTrackFound")
{
playingVideo = false;
progressMC.progressBar._width = 0;
videocontrols.playBtn.gotoAndStop(1);
errorMC._alpha = 100;
Tweener.addTween(bufferingMC, {_alpha: 0, time: 6.000000E-001, transition: "easeOutCubic"});
} // end if
if (status.code == "NetStream.Buffer.Empty")
{
Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
} // end if
if (status.code == "NetStream.Buffer.Full")
{
Tweener.addTween(bufferingMC, {_alpha: 0, time: 6.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
} // end if
if (status.code == "NetStream.Seek.Notify")
{
} // end if
if (status.code == "NetStream.Seek.InvalidTime")
{
} // end if
};
myStream.onMetaData = function (obj)
{
videoDuration = obj.duration;
};
preloadVideo = function ()
{
if (!preloaderMC)
{
this.createEmptyMovieClip("preloaderMC", this.getNextHighestDepth());
} // end if
preloaderMC.onEnterFrame = function ()
{
pctLoaded = myStream.bytesLoaded / myStream.bytesTotal;
videocontrols.progressMC.loadingBar._width = pctLoaded * videocontrols.progressMC._width - 1;
if (pctLoaded >= 1)
{
pctLoaded = 1;
videocontrols.progressMC.loadingBar._width = videocontrols.progressMC.backgroundMC._width;
delete preloaderMC.onEnterFrame;
} // end if
};
};
updateInformation = function (stat, msg)
{
clearInterval(updateInterval);
if (myStream.time >= 0)
{
resizeVideo();
} // end if
if (stat == true)
{
this.onEnterFrame = function ()
{
videocontrols.progressMC.progressBar._width = videocontrols.progressMC.posMC._x = myStream.time / videoDuration * videocontrols.progressMC._width;
if (!msg)
{
videocontrols.outputMC.outputTF.text = outputTime(myStream.time, videoDuration);
}
else
{
videocontrols.outputMC.outputTF.text = msg;
} // end else if
if (Math.round(myStream.time) == Math.round(videoDuration))
{
videocontrols.playBtn.gotoAndStop(1);
Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
showPlayBtn(true);
timeOfPause = 0;
myStream.seek(0);
myStream.pause(true);
videocontrols.outputMC.outputTF.text = outputTime(timeOfPause, videoDuration);
videocontrols.progressMC.progressBar._width = 0;
delete this.onEnterFrame;
} // end if
};
}
else if (msg)
{
outputMC.outputTF.text = msg;
}
else
{
outputMC.outputTF.text = "";
} // end else if
};
outputTime = function (curTime, totTime)
{
curMinutes = Math.floor(curTime / 60);
curSeconds = Math.floor(curTime % 60);
totMinutes = Math.floor(totTime / 60);
totSeconds = Math.floor(totTime % 60);
if (!totMinutes || totMinutes == undefined)
{
totMinutes = 0;
} // end if
if (!totSeconds || totSeconds == undefined)
{
totSeconds = 0;
} // end if
if (curMinutes < 10)
{
curMinutes = "0" + curMinutes;
} // end if
if (curSeconds < 10)
{
curSeconds = "0" + curSeconds;
} // end if
if (totMinutes < 10)
{
totMinutes = "0" + totMinutes;
} // end if
if (totSeconds < 10)
{
totSeconds = "0" + totSeconds;
} // end if
return (curMinutes + ":" + curSeconds + " / " + totMinutes + ":" + totSeconds);
};
videocontrols.playBtn.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
if (this._currentframe == 1)
{
updateInformation(true, "PLAY");
}
else
{
updateInformation(true, "PAUSE");
} // end else if
};
videocontrols.playBtn.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
};
videocontrols.playBtn.onPress = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
if (this._currentframe == 1)
{
showPlayBtn(false);
if (timeOfPause && timeOfPause > 0)
{
myStream.pause(false);
}
else
{
if (tempVideo != myVideo)
{
myStream.seek(0);
} // end if
myStream.play(myVideo);
tempVideo = myVideo;
} // end else if
this.gotoAndStop(2);
}
else
{
showPlayBtn(true);
timeOfPause = myStream.time;
myStream.pause(true);
Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
this.gotoAndStop(1);
var trackingURL = "";
var trackInfo = new LoadVars();
trackInfo.value1 = myVideo;
trackInfo.value2 = "";
var myDate = new Date();
trackInfo.sendAndLoad(trackingURL + "?cacheKiller=" + (myDate.UTC), (trackInfo), "POST");
} // end else if
Tweener.addTween(imgHolder.bmp, {_alpha: 0, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
var trackingURL = "";
var trackInfo = new LoadVars();
trackInfo.value1 = myVideo;
trackInfo.value2 = "";
var myDate = new Date();
trackInfo.sendAndLoad(trackingURL + "?cacheKiller=" + (myDate.UTC), (trackInfo), "POST");
};
videocontrols.stopBtn.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true, "STOP");
};
videocontrols.stopBtn.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
};
videocontrols.stopBtn.onPress = function ()
{
stopVideo();
};
videocontrols.fullscreenBtn.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
if (this._currentframe == 1)
{
updateInformation(true, "fullscreen");
}
else
{
updateInformation(true, "normal screen");
} // end else if
};
videocontrols.fullscreenBtn.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
};
videocontrols.fullscreenBtn.onPress = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
ratio = mediaDisplay.width / mediaDisplay.height;
if (this._currentframe == 1)
{
Stage.displayState = "fullScreen";
this.gotoAndStop(2);
videoArea._width = Stage.width;
videoArea._height = ASVideoPlayer._height - videocontrols._height;
videoArea._x = videoArea._y = 0;
}
else
{
Stage.displayState = "normal";
videoArea._width = Stage.width;
videoArea._height = ASVideoPlayer._height - videocontrols._height;
videoArea._x = videoArea._y = 0;
this.gotoAndStop(1);
} // end else if
updateInformation(true);
resizeVideo();
resizePlayer();
var trackingURL = "";
var trackInfo = new LoadVars();
trackInfo.value1 = myVideo;
trackInfo.value2 = "";
var myDate = new Date();
trackInfo.sendAndLoad(trackingURL + "?cacheKiller=" + (myDate.UTC), (trackInfo), "POST");
};
videocontrols.fitToPlayerBtn.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
if (this._currentframe == 1)
{
updateInformation(true, "fit to player");
}
else
{
updateInformation(true, "original size");
} // end else if
};
videocontrols.fitToPlayerBtn.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
};
videocontrols.fitToPlayerBtn.onPress = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
if (fitToPlayer == false)
{
fitToPlayer = true;
this.gotoAndStop(2);
}
else
{
fitToPlayer = false;
this.gotoAndStop(1);
} // end else if
updateInformation(true);
resizeVideo();
};
videocontrols.progressMC.backgroundMC.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true, "seek video");
};
videocontrols.progressMC.backgroundMC.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
};
videocontrols.progressMC.backgroundMC.onPress = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
myStream.pause(true);
this.onEnterFrame = function ()
{
if (this._parent._xmouse >= 0 && this._parent._xmouse <= this._width)
{
seekingTime = this._parent._xmouse / this._width * videoDuration;
videocontrols.progressMC.progressBar._width = seekingTime / videoDuration * videocontrols.progressMC._width;
myStream.seek(seekingTime);
if (seekingTime == videoDuration)
{
myStream.pause(true);
} // end if
} // end if
};
};
videocontrols.progressMC.backgroundMC.onRelease = videocontrols.progressMC.backgroundMC.onReleaseOutside = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
if (videocontrols.playBtn._currentframe == 1)
{
myStream.pause(true);
}
else
{
myStream.pause(false);
} // end else if
timeOfPause = myStream.time;
updateInformation(true);
delete this.onEnterFrame;
};
videocontrols.volumeMC.backgroundMC.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true, "adjust volume");
};
videocontrols.volumeMC.backgroundMC.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
};
videocontrols.volumeMC.backgroundMC.onPress = function ()
{
Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
this.onEnterFrame = function ()
{
if (this._xmouse >= 0 && this._xmouse <= this._width)
{
seekingVolume = this._xmouse / this._width * 100;
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = this._xmouse;
soundVolume.setVolume(seekingVolume);
dispTF = "volume: " + Math.round(seekingVolume) + " %";
updateInformation(true, dispTF);
if (seekingVolume == 0)
{
videocontrols.audioOnOff.gotoAndStop(2);
}
else
{
videocontrols.audioOnOff.gotoAndStop(1);
} // end if
} // end else if
};
};
videocontrols.volumeMC.backgroundMC.onRelease = videocontrols.volumeMC.backgroundMC.onReleaseOutside = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);
delete this.onEnterFrame;
};
updateVolumePosition = function ()
{
videocontrols.volumeMC.posMC._x = videocontrols.volumeMC.volBar._width;
soundVolume.setVolume(videocontrols.volumeMC.volBar._width / videocontrols.volumeMC.backgroundMC._width * 100);
};
if (useKeyboardShortcuts == true)
{
keylistener = new Object();
keylistener.onKeyDown = function ()
{
clearInterval(updateInterval);
if (Key.isDown(13))
{
if (Stage.displayState == "normal")
{
Stage.displayState = "fullScreen";
ASVideoPlayer._width = Stage.width;
ASVideoPlayer._height = Stage.height;
videocontrols.fullscreenBtn.gotoAndStop(2);
}
else
{
Stage.displayState = "normal";
ASVideoPlayer._width = screenW;
ASVideoPlayer._height = screenH;
videocontrols.fullscreenBtn.gotoAndStop(1);
} // end if
} // end else if
if (Key.isDown(27))
{
Stage.displayState = "normal";
ASVideoPlayer._width = screenW;
ASVideoPlayer._height = screenH;
videocontrols.fullscreenBtn.gotoAndStop(1);
} // end if
if (Key.isDown(32))
{
if (videocontrols.playBtn._currentframe == 1)
{
showPlayBtn(false);
if (timeOfPause && timeOfPause > 0)
{
myStream.pause(false);
}
else
{
myStream.play(myVideo);
} // end else if
videocontrols.playBtn.gotoAndStop(2);
}
else
{
showPlayBtn(true);
timeOfPause = myStream.time;
myStream.pause(true);
videocontrols.playBtn.gotoAndStop(1);
} // end if
} // end else if
if (Key.isDown(39))
{
gotoTime = myStream.time + keyVideoSeek;
if (gotoTime < videoDuration)
{
myStream.seek(gotoTime);
}
else
{
myStream.seek(videoDuration);
} // end if
} // end else if
if (Key.isDown(37))
{
gotoTime = myStream.time - keyVideoSeek;
if (gotoTime > 0)
{
myStream.seek(gotoTime);
}
else
{
myStream.seek(0);
} // end if
} // end else if
if (Key.isDown(38))
{
gotoVolume = videocontrols.volumeMC.volBar._width / videocontrols.volumeMC.backgroundMC._width * 100 + keyVideoVolume;
videocontrols.audioOnOff.gotoAndStop(1);
if (gotoVolume < 100)
{
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = gotoVolume / 100 * videocontrols.volumeMC.backgroundMC._width;
soundVolume.setVolume(gotoVolume);
}
else
{
gotoVolume = 100;
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = videocontrols.volumeMC.backgroundMC._width;
soundVolume.setVolume(100);
} // end else if
dispTF = "volume: " + Math.round(gotoVolume) + " %";
updateInformation(true, dispTF);
} // end if
if (Key.isDown(40))
{
gotoVolume = videocontrols.volumeMC.volBar._width / videocontrols.volumeMC.backgroundMC._width * 100 - keyVideoVolume;
if (gotoVolume > 0)
{
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = gotoVolume / 100 * videocontrols.volumeMC.backgroundMC._width;
soundVolume.setVolume(gotoVolume);
}
else
{
gotoVolume = 0;
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = 0;
videocontrols.audioOnOff.gotoAndStop(2);
soundVolume.setVolume(0);
} // end else if
dispTF = "volume: " + Math.round(gotoVolume) + " %";
updateInformation(true, dispTF);
} // end if
updateInterval = setInterval(update, 1000);
};
Key.addListener(keylistener);
} // end if
update = function ()
{
updateInformation(true);
};
videocontrols.onEnterFrame = function ()
{
resizeVideo();
resizePlayer();
resizeImage();
};
flashPlayerVersionCheck = function ()
{
if (checkFlashPlayerVersion == true)
{
var _loc4 = System.capabilities.version;
var _loc3 = _loc4.split(" ");
var _loc2 = _loc3[1].split(",");
if (_loc2[0] >= 10)
{
HDsupport = true;
}
else if (_loc2[0] >= 9 && _loc2[1] >= 0 && _loc2[2] >= 115 && _loc2[3] >= 0)
{
HDsupport = true;
}
else
{
HDsupport = false;
} // end else if
if (HDsupport == false)
{
errorMC._alpha = 0;
bufferingMC._alpha = 0;
if (!downloadWindow)
{
this.attachMovie("downloadWindow", "downloadWindow", this.getNextHighestDepth());
} // end if
downloadWindow._x = videoArea._width / 2;
downloadWindow._y = videoArea._height / 2;
downloadWindow.closeBtn.onRollOver = downloadWindow.downloadBtn.onRollOver = function ()
{
Tweener.addTween(this, {_alpha: 40, time: 4.000000E-001, transition: "easeOutCubic"});
};
downloadWindow.closeBtn.onRollOut = downloadWindow.downloadBtn.onRollOut = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
};
downloadWindow.closeBtn.onRelease = downloadWindow.closeBtn.onReleaseOutside = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
downloadWindow.removeMovieClip();
};
downloadWindow.downloadBtn.onRelease = downloadWindow.downloadBtn.onReleaseOutside = function ()
{
Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
getURL(FlashPlayerDownloadLink, "_blank");
downloadWindow.removeMovieClip();
};
} // end if
} // end if
};
loadImage = function ()
{
if (!imgHolder.holder)
{
imgHolder.createEmptyMovieClip("holder", imgHolder.getNextHighestDepth());
} // end if
if (!imgHolder.bmp)
{
imgHolder.createEmptyMovieClip("bmp", imgHolder.getNextHighestDepth());
} // end if
imgHolder.holder._visible = false;
imgHolder.bmp._visible = false;
image_loader.loadClip(image, imgHolder.holder);
};
showPlayBtn = function (stat)
{
if (stat == true)
{
playBtn._visible = true;
playBtn._alpha = 0;
playBtn._xscale = playBtn._yscale = 130;
Tweener.addTween(playBtn, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
Tweener.addTween(playBtn, {_xscale: 100, _yscale: 100, time: 4.000000E-001, transition: "easeOutCubic"});
}
else
{
playBtn._visible = false;
playBtn._alpha = 0;
} // end else if
playBtn.onRollOver = function ()
{
this._alpha = 80;
};
playBtn.onRollOut = function ()
{
this._alpha = 100;
};
playBtn.onPress = function ()
{
playVideo();
};
};
if (protection == true)
{
protocol = _url.substr(0, _url.indexOf(":"));
if (protocol == "file")
{
startPlayer();
}
else if (_url.indexOf(domain) > 0)
{
startPlayer();
}
else
{
videocontrols._visible = false;
myStream.close();
this.attachMovie("protectionMC", "protectionMC", this.getNextHighestDepth());
protectionMC._alpha = 0;
protectionMC._x = Stage.width / 2;
protectionMC._y = Stage.height / 2;
Tweener.addTween(protectionMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
} // end else if
}
else
{
startPlayer();
} // end else if