Skip to content

Instantly share code, notes, and snippets.

@phinity
Created June 18, 2010 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phinity/443936 to your computer and use it in GitHub Desktop.
Save phinity/443936 to your computer and use it in GitHub Desktop.
//Ro, this is where the video is initialized
if (image.video) {
var myPlayerWrapper = new Element('div', {id: newMain.id+"Player"});
myPlayerWrapper.inject(newMain.id);
var flashvars = {
youtube: "1",
key: "cbdnp3xJHHQ",
color: "cccccc",
autoplay: "0"
};
var params = {
menu: "false",
wmode: "opaque"
};
var attributes = {};
this.project.images[index].swf = swfobject.embedSWF("/_lib/videoplayer.swf", newMain.id+"Player", "927", "491", "9.0.0", "/_lib/expressInstall.swf", flashvars, params, attributes);
}
//this function is run whenever a frame is changed on the work overlay. i have some if it
stopPlayer: function() {
alert(this.viewers[this.selected].id);
var player = $(this.viewers[this.selected].id+'Player');
//var player = window[this.viewers[this.selected].id+'Player'];
//var player = this.project.images[this.selected].swf;
if (player) {
//if (player.sendEvent) {
//player.sendEvent('STOP');
player.pause();
//}
if (player.setStyle) {
//player.setStyle('display', 'none');
} else if (player.style) {
//player.style.display = 'none';
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment