Frame 1
function checkPlayerLoaded() {
if (ytplayer.isPlayerLoaded()) {
ytplayer.addEventListener("onStateChange", onPlayerStateChange);
ytplayer.addEventListener("onError", onPlayerError);
clearInterval(loadInterval);
}
}
function onPlayerStateChange(newState) {
trace("New player state: " + newState);
}
function onPlayerError(errorCode) {
trace("An error occurred: " + errorCode);
}
var ytplayer = _root.createEmptyMovieClip("ytplayer", 1);
var ytPlayerLoaderListener = {onLoadInit:function () {
loadInterval = setInterval(checkPlayerLoaded, 250);
}};
var loadInterval;
var ytPlayerLoader = new MovieClipLoader();
ytPlayerLoader.addListener(ytPlayerLoaderListener);
ytPlayerLoader.loadClip("http://www.youtube.com/v/0dJu1Jj7VTw", ytplayer);
Symbol 2 Button
on (release) {
if ((Stage.scaleMode = "showAll")) {
Stage.scaleMode = "noScale";
} else {
Stage.scaleMode = "showAll";
}
gotoAndStop (2);
}
Symbol 3 Button
on (release) {
if ((Stage.scaleMode = "noScale")) {
Stage.scaleMode = "showAll";
} else {
Stage.scaleMode = "noScale";
}
gotoAndStop (1);
}
Symbol 4 MovieClip Frame 1
stop();