Webmaster Forums 101 - Free Help and Discussions
 
 
 

MEMBER REWARDS - Earn free advertising by participating in these forums! Click here for details.

Welcome to Webmaster Forums 101!

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th June 2005, 12:30 AM   #1

Username: mark4man
Rank: WF101 Newbie
Join Date: Jun 2005
Posts: 6
Points: 32.42
Exclamation Weird Image Scrolling Script...Please Help

People,

Can someone please take a look at this scrolling graphic & tell me what’s wrong with the script?:

http://mysite.verizon.net/vze3yjbu

I had wanted to add a graphic of a sound wave to my new site (created in Dreamweaver MX...which will be a resource site for digital musicians when complete); & to have it scroll across the page to resemble an audio track during playback in a computer-based digital audio workstation.

I created the graphic myself; & thought I had it configured properly with an appropriate java script to scroll correctly…but when I uploaded the site, the script caused it to scroll beautifully, allright…but the cursor on the page undergoes a rapid-fire toggling between the cursor arrow & the hourglass.

One java programmer tells me it’s because the cursor is switching between normal & busy…due to the fact that the code is making a server call at the same rate the script causes it to scroll.

Another told me the problem can be fixed if the coding sets up the graphic to cache.

Now...there's 3 parts to this script (as it was written.) The first is:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script>
function moveBackground(x) {
var obj = document.getElementById('testy');
obj.style.backgroundPosition = ""+x+"px 0px";
setTimeout("moveBackground("+(x-1)+")",25);
}
</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

...where the script writer referred to the layer ID as 'testy'...

...the 2nd is:

~~~~~~~~~~~~~~~~~~~~~~~~
<body onload="moveBackground(0);">
~~~~~~~~~~~~~~~~~~~~~~~~

...this component appears on the very next line after the script's closing tag (</script>)

...the third component is the layer itself, which contains the graphic (I added some layer coding myself, so as to get absolute positioning...so the graphic scrolled at the height & location on the page where I wanted it to):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div id="testy" style="background:url(SoundWave3.jpg) repeat-x; position:absolute; left:0px; top:285px; height:58px; width:800px;">&nbsp;</div>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

those are the 3 components. The only thing I changed in the layer was to add the absolute positioning.

Can somebody help me out, here?...I’m not a programmer…but this page is almost there…almost working.

Thanks very much,

mark4man
mark4man is offline   Reply With Quote
Old 14th June 2005, 10:09 AM   #2
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Welcome Mark4man,

This problem only happens in Internet Explorer(IE). It is happening because IE is somewhat cumbersome and firing timers that many times and that quickly takes more resources than it would in other browsers. I've never found a way around it other than creating an animated GIF.
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 15th June 2005, 02:48 AM   #3

Username: mark4man
Rank: WF101 Newbie
Join Date: Jun 2005
Posts: 6
Points: 32.42
Default

Mr. Tech,

Thanks.

mark4man
mark4man is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Login
User Name
Password


Featured Members


Featured Links


Useful Resources
Webmaster Resources
Developers Tools
Developer Tutorials


Partners

All times are GMT +10. The time now is 06:29 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.3.2
 
 
WEBMASTER FORUMS 101
ARCHIVE
CONTACT US
TOP
   
© Webmaster Forums 101 2005. All Rights Reserved.
Design by: vBCore