...

View Full Version : Client wants a marquee effect (I know...ewww...)



Geezer D
04-03-2009, 09:17 PM
Haha. Hey. all.

This is what I made for him: http://www.selfdefensetrainingcentersofamerica.com/ but as you can see, it's pretty bad. I was trying to get the 2 images to pre-load, but Firefox shows them both before the marqueeing starts.
I'm not much of a "dynamic content" guy, so I'm kinda lost here.

Any ideas of how I can get the effect my client wants by using a script, and not Flash (I really hate Flash)?

Thanks in advance.

TinyScript
04-03-2009, 10:38 PM
you could set them to hidden until just before you use them

.style.visibility='hidden'
then switch to 'visible' once you begin the marquee

Geezer D
04-04-2009, 04:09 AM
Sorry, I should have revealed my cluelessness in coding, I'm just a copy and paster :(

What would the script be to make that happen?

Thanks

TinyScript
04-05-2009, 04:47 AM
Sorry, I should have revealed my cluelessness in coding, I'm just a copy and paster :(

What would the script be to make that happen?

Thanks

If you still need help, go ahead and save this page. it has a function
http://h1.ripway.com/stirfry/javascript/tests/menuWithfriends.html

Geezer D
04-05-2009, 06:33 AM
Hmm... no help there. I'm not looking for a mouseover event or an onclick event.
I just need the 2 images in the marquee to load in, then once they do, the marquee starts. No interaction from the user at all.

whyiswyh
04-05-2009, 07:31 AM
Is this the kind of code you are looking for? Automatic scrolling from left to right or vice versa.

<marquee behavior="scroll" direction="right" scrollamount="4" onmouseover="this.scrollAmount=3" onmouseout="this.scrollAmount=4">
<a href="1.html">
<img src="image/1.jpg" width="120" height="130" /></a>
<a href="2.html">
<img src="image/2.jpg" width="120" height="130" /></a>
<a href="3.html">
<img src="image/3.jpg" width="120" height="130" /></a>
<a href="4.html">
<img src="image/4.jpg" width="120" height="130" /></a>
<a href="5.html">
<img src="image/5.jpg" width="120" height="130" /></a>
<a href="6.html">
<img src="image/6.jpg" width="120" height="130" /></a></marquee>

TinyScript
04-05-2009, 09:47 AM
Hmm... no help there. I'm not looking for a mouseover event or an onclick event.
I just need the 2 images in the marquee to load in, then once they do, the marquee starts. No interaction from the user at all.

you asked for a way to not have the images show up before the scroll starts.
I showed you how to change visibility.

what are you looking for?
when you load your images(your preload function) you need to keep them hidden. After preload is over, you set the images to visible. It's not that complicated

make a function and use getelementById().style.visibility

Geezer D
04-05-2009, 04:49 PM
Apparently TinyScript, you can code but not read. You keep giving me half an answer, so no answer from you is preferable, thanks.

Once more, with feeling... actually, **** it, I'll go to a better forum.

TinyScript
04-05-2009, 06:19 PM
Apparently TinyScript, you can code but not read. You keep giving me half an answer, so no answer from you is preferable, thanks.

Once more, with feeling... actually, **** it, I'll go to a better forum.

best of luck. sorry the answers weren't good enough. did you you expect me to code your solution?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum