Created
April 17, 2009 20:11
-
-
Save ntreadway/97233 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// load root vars setup URL and Code to copy | |
var myRoot = root; | |
var player:String = "http://cdn.cloudfiles.mosso.com/c38342/wc_video_player.swf" | |
var EmbedCode:String = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="wc_video" width="552" height="335" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'; | |
EmbedCode += '<param name="movie" value="'+ player +'" />'; | |
EmbedCode += '<param name="allowScriptAccess" value="always" />'; | |
EmbedCode += '<param name="FlashVars" value="mediaType=video&mediaSrc=' + myRoot.strSource +'&addToCanvas='+ myRoot.canvas +'&page='+ myRoot.page +'" />'; | |
EmbedCode += '<embed src="'+ player +'" quality="high" width="552" height="335" name="Example" align="middle" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="mediaType=video&mediaSrc=' + myRoot.strSource +'&addToCanvas='+ myRoot.canvas +'&page='+ myRoot.page +'"></embed>'; | |
EmbedCode += '</object>'; | |
var VideoURL:String = myRoot.page; | |
// button events | |
embed_copy.addEventListener(MouseEvent.MOUSE_DOWN, CopyString); | |
embed_link.addEventListener(MouseEvent.MOUSE_DOWN, showCode); | |
embed_url.addEventListener(MouseEvent.MOUSE_DOWN, showURL); | |
function CopyString(event:MouseEvent):void { | |
System.setClipboard(embed_field.embed_text.text); | |
} | |
function showCode(event:MouseEvent):void { | |
embed_field.embed_text.text = EmbedCode; | |
static_URL_link.visible = false; | |
static_embed_link.visible = true; | |
} | |
function showURL(event:MouseEvent):void { | |
embed_field.embed_text.text = VideoURL; | |
static_embed_link.visible = false; | |
static_URL_link.visible = true; | |
} | |
// show default | |
embed_field.embed_text.text = EmbedCode; | |
static_URL_link.visible = false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment