D
donradii
Hello all, I am new here and am new the world of javascripting. I am
having a heck of a time trying to accomplish something that i
conceptually know what i want to do but can not seem to get it into
code correctly.
What I am looking to do is this.
I have a web page that uses 3 different formats of video. Right now to
load each format I have 3 separate pages. Each format is loaded onto
the page with an embed function.
This is an example of the FLV loading function:
function LoadThisSWF(FLV){
var strString = "<object
classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=";
strString +=
"\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"
width=\"342\" height=\"291\" title=\"Quickstream.tv\">";
strString += "<param name=\"movie\"
value=\"FLVPlayer_Progressive.swf\">";
strString += "<param name=\"quality\" value=\"high\">";
strString += "<param name=\"FlashVars\"
value=\"&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName="+FLV+"&autoPlay=true&autoRewind=false\">";
strString += "<embed src=\"FLVPlayer_Progressive.swf\"
flashvars=\"&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName="+FLV+"&autoPlay=true&autoRewind=false\"
quality=\"high\"
pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
type=\"application/x-shockwave-flash\" width=\"342\"
height=\"291\"></embed>";
strString += "</object>";
document.getElementById('isFlash').innerHTML = strString;
}
I have additional ones that I have customized for quicktime and windows
media.
All of the players load into a <div id=isFlash> on the page.
what I would like to do is be able to, if possible, create a global
variable called loadThisFormat and have that equal the result of a
function that is set when a person clicks on a different format at the
bottom of the page.
so in pseudo code:
var loadThisFormat = result of chooseFormat
function chooseFormat
if onclick = flash then load LoadThisSWF
if onclick = quicktime then load LoadThisMOV
if onclick = windows media then load LoadThisWMV
this way when a person selects a format of video, when they click on
the other videos on the page they will play in their selected format
If anyone can help me i will be forever grateful!!!
Thank you in advance!
Donald
having a heck of a time trying to accomplish something that i
conceptually know what i want to do but can not seem to get it into
code correctly.
What I am looking to do is this.
I have a web page that uses 3 different formats of video. Right now to
load each format I have 3 separate pages. Each format is loaded onto
the page with an embed function.
This is an example of the FLV loading function:
function LoadThisSWF(FLV){
var strString = "<object
classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=";
strString +=
"\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"
width=\"342\" height=\"291\" title=\"Quickstream.tv\">";
strString += "<param name=\"movie\"
value=\"FLVPlayer_Progressive.swf\">";
strString += "<param name=\"quality\" value=\"high\">";
strString += "<param name=\"FlashVars\"
value=\"&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName="+FLV+"&autoPlay=true&autoRewind=false\">";
strString += "<embed src=\"FLVPlayer_Progressive.swf\"
flashvars=\"&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName="+FLV+"&autoPlay=true&autoRewind=false\"
quality=\"high\"
pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
type=\"application/x-shockwave-flash\" width=\"342\"
height=\"291\"></embed>";
strString += "</object>";
document.getElementById('isFlash').innerHTML = strString;
}
I have additional ones that I have customized for quicktime and windows
media.
All of the players load into a <div id=isFlash> on the page.
what I would like to do is be able to, if possible, create a global
variable called loadThisFormat and have that equal the result of a
function that is set when a person clicks on a different format at the
bottom of the page.
so in pseudo code:
var loadThisFormat = result of chooseFormat
function chooseFormat
if onclick = flash then load LoadThisSWF
if onclick = quicktime then load LoadThisMOV
if onclick = windows media then load LoadThisWMV
this way when a person selects a format of video, when they click on
the other videos on the page they will play in their selected format
If anyone can help me i will be forever grateful!!!
Thank you in advance!
Donald