Results 1 to 3 of 3

Thread: Flash movie problem

  1. #1
    Join Date
    Mar 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Flash movie problem

    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>
    Last edited by jscheuer1; 03-08-2012 at 05:41 AM. Reason: Format

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    Ah but the scripted fixed positioning of the video div overrides any absolute positioning you may have. Put this in your homepage.css stylesheet:

    Code:
    #video {
    	right: 10px !important;
    }
    That will force the video over to the right.

    Other than that, seems OK to me except that it goes behind the YouTube Flash movie. To fix that, add the highlighted (two places) as shown:

    Code:
    <object width="530" height="315" align="center">
      <param name="movie" value="http://www.youtube.com/v/i-Rx-ag2e9Q?version=3&hl=en_US&rel=0">
      <param name="wmode" value="transparent">
      <param name="allowFullScreen" value="true">
      <param name="allowscriptaccess" value="always">
      <embed wmode="transparent" src="http://www.youtube.com/v/i-Rx-ag2e9Q?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true">
    </object>
    Note: I took the code from Opera's Dragonfly developer's tools which formats it. The actual code on the page looks like (again with the two highlighted additions, but this time you have to scroll the block to see them) so:

    Code:
    <object width="530" height="315" align="center"><param name="movie" value="http://www.youtube.com/v/i-Rx-ag2e9Q?version=3&amp;hl=en_US&amp;rel=0"></param><param name="wmode" value="transparent"><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed wmode="transparent" src="http://www.youtube.com/v/i-Rx-ag2e9Q?version=3&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
    Last edited by jscheuer1; 03-08-2012 at 06:04 AM. Reason: realized the positioning was also a factor
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    This is an old thread, so I'm closing it. If you have a question about it, you may refer back to it by linking to it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •