Worshipman
02-20-2006, 03:47 PM
Floating Top Bar
http://www.dynamicdrive.com/dynamicindex17/floatbar.htm
Link to the page I am working on
http://worshipfilms.mine.nu:8008/collections.php?coll_id=18
I setup the floating top bar on my site to display flash videos dynamically when a user clicks on the video link. Currently the only video I have encoded into flash is Scene #002 - Chase. So if you click on the image of the second video you can see the script work. Unfortunately my test server is on a cable connection so streaming video is kind of choppy but you can still see it work.
I added a function openbar() to the script so I can call closebar() on the page load and then have the bar open when a user clicks on a link. Everything works great except when you scroll down on the page and click a video link then openbar() is called and the page jumps to the top and opens the video.
Here is the openbar() function.
function openbar(){
document.getElementById("topbar").style.visibility="visible"
}
I tried setting
startY = (document.all)?iecompattest().scrollTop:window.pageYOffset + 5;
at the beginning of the staticbar() function and it causes the window to open in the correct place but then it scrolls to the top which is what I want it not to do.
If anyone can help me I will give you the swf file that I created to stream external flash encoded video (.flv) and a copy of the script that sends the variables to the swf.
Also if you're interested my live site is http://www.worshipfilms.com
http://www.dynamicdrive.com/dynamicindex17/floatbar.htm
Link to the page I am working on
http://worshipfilms.mine.nu:8008/collections.php?coll_id=18
I setup the floating top bar on my site to display flash videos dynamically when a user clicks on the video link. Currently the only video I have encoded into flash is Scene #002 - Chase. So if you click on the image of the second video you can see the script work. Unfortunately my test server is on a cable connection so streaming video is kind of choppy but you can still see it work.
I added a function openbar() to the script so I can call closebar() on the page load and then have the bar open when a user clicks on a link. Everything works great except when you scroll down on the page and click a video link then openbar() is called and the page jumps to the top and opens the video.
Here is the openbar() function.
function openbar(){
document.getElementById("topbar").style.visibility="visible"
}
I tried setting
startY = (document.all)?iecompattest().scrollTop:window.pageYOffset + 5;
at the beginning of the staticbar() function and it causes the window to open in the correct place but then it scrolls to the top which is what I want it not to do.
If anyone can help me I will give you the swf file that I created to stream external flash encoded video (.flv) and a copy of the script that sends the variables to the swf.
Also if you're interested my live site is http://www.worshipfilms.com