Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell drive driver drivers email error ethernet excel firefox firefox 3 freeze hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition password problem router slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: Moving Object


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Duckman69's Avatar
Computer Specs
Senior Member with 642 posts.
 
Join Date: Jun 2007
19-Aug-2007, 05:56 PM #1
Solved: Moving Object
i have an <object> that i would like to move up and down along with the user's reading so that the links menu is always there for them, does any1 know a way i can set this up cuz that would be the coolest thing ive seen banners and menus that do this but couldnt figure out the exact code causing the effect on the page...

1 page i got close with http://www.freewebs.com/fallingrain1...zvvvvvvvvv.htm ... the only thing is it doesnt work in IE, and its a position set setup so if i set it to a certian area on my screen it will be different on people with smaller screens then my set up and vice versa...

If any1 can help me out here i would be greatful my google searches turned up zip and i only knew a few sites with similar stuff and had no luck with them
Duckman69's Avatar
Computer Specs
Senior Member with 642 posts.
 
Join Date: Jun 2007
19-Aug-2007, 09:17 PM #2
i also just found this site http://ca.geocities.com/randy_bennet...croll-menu.htm

i've been playing with this pretty much the whole day looking @ code on different sites and trying to get somewhere, if any1 has an idea i would love any advice or tips... heres my attempt at getting it to work threw there script i must be missing something or forgetting to do something http://www.freewebs.com/fallingrain1...temelater.html

Last edited by Duckman69 : 19-Aug-2007 10:13 PM.
Duckman69's Avatar
Computer Specs
Senior Member with 642 posts.
 
Join Date: Jun 2007
20-Aug-2007, 05:36 AM #3
http://www.freewebs.com/fallingrain1...temelater.html

got this figured out... 18 hours and numerous search strings, .html downloads / disects, and editing to try to suit my needs... and the F $#$&#&#$&$% ing answer was right infront of like the 4th script i found woulda saved like 10 hours there o well... if any1 wants the script you can check out my page ill be refining the code because theres alot of unneeded code im having trouble getting rid ofto trim it down... i can post the script back here if any1 wants it when im done...
Duckman69's Avatar
Computer Specs
Senior Member with 642 posts.
 
Join Date: Jun 2007
21-Aug-2007, 05:19 AM #4
code works 100% for moving objects flash embedded stuff, etc... here is the code below for 1 object to move (you can change things like size, location of object, etc etc...)

WORKING CODE :: (replace my .swf <object> </object> with yours and test, then work on edits if needed)


<html><head><title>Sticky Menu Bar</title>
<script language=javaScript>
function setVariables(){
y1=-50;ob=1;max=20 // this max sets the distance from the top of the page

if (navigator.appName == "Netscape") {
v=".top=";h=".left=";dS="document.";sD="";
y="window.pageYOffset";x="window.pageXOffset";iW="window.innerWidth";iH="wi ndow.innerHeight"
}
else {h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style";
y="document.body.scrollTop";x="document.body.scrollLeft";iW="document.body. clientWidth";iH="document.body.clientHeight"
}
object="object1";
checkLocationA()
}
movex=0,movey=0,xdiff=0,ydiff=0,ystart=0,xstart=0

function checkLocation(){
// innerX=eval(iW)-115 // place to the right
innerX=21 // controls the horizontal from the left side of the page

// innerY=eval(iH)-35 // place at the bottom
innerY=15 // controls the verticle from the top of the page
if (document.layers){innerY-=10;innerX-=10}
yy=eval(y);
xx=eval(x);
ydiff=ystart-yy;
xdiff=xstart-xx;
if ((ydiff<(-0.01))||(ydiff>(0.01))) movey=Math.round(ydiff/10),ystart-=movey
if ((xdiff<(-0.01))||(xdiff>(0.01))) movex=Math.round(xdiff/10),xstart-=movex

N=(document.layers)?1:0
V=(N) ? 4:5
if (V==4){
object="object1"
eval(dS+object+sD+v+(ystart+innerY+10));
eval(dS+object+sD+h+(xstart+innerX+10));


//eval(dS + objectX + sD + v + y);
}
else{
object=document.getElementById('object1')
object.style.top=ystart+innerY
object.style.left=xstart+innerX
}




setTimeout("checkLocation()",10)}
function checkLocationA(){
ystart=eval(y)+5;
xstart=eval(x)+5;}
spread=1
function scrollOn(){
items=1
if (ob<=items){
objectX="object"+ob;
y1+=10;

N=(document.layers)?1:0
V=(N) ? 4:5
if (V==4){
eval(dS + objectX + sD + v + y1);}
else{
object=document.getElementById(objectX)
object.style.top=y1}
//eval(dS + objectX + sD + v + y);

if (y1<max) xx=setTimeout ("scrollOn()",20)
else y1=-50, max+=spread, ob+=1, xx=setTimeout("scrollOn()",20) // this max sets the spacing
}
if (ob>1){clearTimeout(xx);checkLocation();}
}

</script>
</HEAD>








<body onload="setVariables();scrollOn()" bgcolor="#eeeeee">





test<br>test
<CENTER>New and improved <B>Scroll On Sticky Menu</B><br><br>
The logo uses relative positioning<br><br>and it works with <B>Netscape Version 6</B>
</CENTER>
</tr></td>



<div id="object1" style="position:absolute; visibility:show; left:25px; top:-50px; z-index:2">
<a href="javascript:void" >

<object cellpadding="100";
classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"
width="143"
height="440">
<param name="BGCOLOR" value="#0">
<param name=movie value="irawr-flash-menu-vertical.swf">
<param name=quality value=high>

<embed src="irawr-flash-menu-vertical.swf"
quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash"
width="143"
height="440"
bgcolor="#0">
</embed>
</object>

</a></div></td></tr>





<br>.
<br>.


<br>.
<br>.
<br>.
<br>.
<br>.

<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
Part way down
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.

<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
The End
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.....testing ................................................testing.................... ........................................................................... ........................................................................... ........................................................

</td></tr>

</table>
</html>
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:52 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.