I am trying desperately to make my talking head flash sales people stay on the page in a fixed position while a client scrolls down the page but cannot get it right- here is the website - www.cnyphotobooths.com
I want the guy to be on the bottom right of the screen and stay there while people scroll down the page but cannot get it to work;
There is a js file
Code:
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
////////////////// DO NOT change the LINES Below ///////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function delete_cookie(c){var d=new Date();d.setTime(d.getTime()-1);document.cookie=c+='=; expires='+d.toGMTString()}
function get_cookie(c){var d=document.cookie.match('(^|;) ?'+c+'=([^;]*)(;|$)');if(d){return(unescape(d[2]))}else{return null}}
function set_cookie(k,p,n,q,o,m,r,l){var s=k+'='+escape(p);if(n){var t=new Date(n,q,o);s+='; expires='+t.toGMTString()}if(m){s+='; path='+escape(m)}if(r){s+='; domain='+escape(r)}if(l){s+='; secure'}document.cookie=s}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
////////////////// DO NOT change the TWO LINES Below ///////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
var PlayBackSettings = 'streamName=cnyphotobooths&skinName=Clear_Skin_1&MM_ComponentVersion=1'
var positioning= 'z-index:2147483647;'
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/////////////////// User defined parameters and instructions Below //////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//Below, set the video position according to your preferences.
//Set to 'relative' to put video in same position as the inserted video code.
//Set to 'absolute' to float the video over a specific design element of page.
//Set to 'Fixed' to float the video in one position while scrolling the page.
//Position can be changed to 'left' or 'right' (but not both) and 'top' or 'bottom' (but not both).
// Modify the numbers to set the distance of the video from the top or bottom and from the left or right.
positioning += 'position: fixed; left: 1000px; bottom: 3000px;'
//Below, set the video to automatically play on each page load or to require clicking the play button.
// Set to 'true' for automatic playing on page load or 'false' require click play.
// Below, you can set various video playback behaviors.
// set autoPlay to 'true' to play the video automatically when page loads.
// set autoPlayOncePerVisit to 'true' to auto-play only for new visitors.
// Set showOncePerVisit to 'true' to only display the video for new visitors.
// If showOnAllPages is set to false, video will only play on showurlList URLs.
// For showurlList, enter comma seperated URLs where video should appear.
var autoPlay = true;
var autoPlayOncePerVisit = false;
var showOncePerVisit = false;
var showurlList = '';
var showOnAllPages = true;
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/////////////////// DO NOT change the parameters below //////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
window.onload = function() {
var currentUrl =window.location.href;
if(autoPlay == false){PlayBackSettings += '&autoPlay=false'; delete_cookie('autoPlayOncePerVisit');}else{if(autoPlayOncePerVisit == true){if(get_cookie('autoPlayOncePerVisit') == null){set_cookie('autoPlayOncePerVisit', 1, 1);PlayBackSettings += '&autoPlay=true';}else{PlayBackSettings += '&autoPlay=false'}}else{PlayBackSettings += '&autoPlay=true';delete_cookie('autoPlayOncePerVisit');}}if(showOncePerVisit == true){if(get_cookie('showOncePerVisit') == null){set_cookie('showOncePerVisit', 1, 1);positioning += 'display:block;';}else{positioning += 'display:none;'; }}else{delete_cookie('showOncePerVisit');}var posElem = document.getElementById('video');
if( typeof( posElem.style.cssText ) != 'undefined' ) {
posElem.style.cssText = positioning;
} else {
posElem.setAttribute('style',positioning);
}
var htmlval = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" align="center" width="246" height="330" id="videoCanvas" style="visibility: inherit;">'
htmlval += '<param name="movie" value="FLVPlayer_Progressive.swf">'
htmlval += '<param name="scale" value="noscale">'
htmlval += '<param name="allowfullscreen" value="true">'
htmlval += '<param name="salign" value="tl">'
htmlval += '<param name="wmode" value="transparent">'
htmlval += '<param name="bgcolor" value="#000">'
htmlval += '<param name="showvolume" value="0">'
htmlval += '<param name="flashvars" value="'+PlayBackSettings+'">';
htmlval += '<!--[if !IE]> <-->'
htmlval += '<object align="center" width="246" height="330" type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" >'
htmlval += '<param name="scale" value="noscale">'
htmlval += '<param name="allowfullscreen" value="true">'
htmlval += '<param name="salign" value="tl">'
htmlval += '<param name="wmode" value="transparent">'
htmlval += '<param name="bgcolor" value="#000">'
htmlval += '<param name="showvolume" value="0">'
htmlval += '<param name="flashvars" value="'+PlayBackSettings+'">';
htmlval += '</object>'
htmlval += '<!--> <![endif]-->'
htmlval += '</object>'
document.getElementById('video').innerHTML = htmlval;
}
What I did do is put the flash script ina table and made the table absolute;
Code:
<script type='text/javascript' src='swfobject_modified.js'></script>
<script type='text/javascript' src='controller-for-cnyphotobooths.js'></script>
<div id='video'>
</div>
Bookmarks