Forums
This topic is locked
Faster rollovers
Posted 20 Nov 2002 20:51:58
1
has voted
20 Nov 2002 20:51:58 chadmih chad posted:
Howdy all. This has been a thorn in my side for years. I want faster rollovers in HTML. I have tried tiny image sizes and that doesnt seem to improve the speed. Anyone have any input on this topic? Any tricks? Replies
Replied 20 Nov 2002 21:35:37
20 Nov 2002 21:35:37 Brent Colflesh replied:
Dear Chad,
You can't do rollovers in HTML - what scripting language do you currently implement them in - Javascript?
Regards,
Brent
You can't do rollovers in HTML - what scripting language do you currently implement them in - Javascript?
Regards,
Brent
Replied 20 Nov 2002 21:48:34
20 Nov 2002 21:48:34 chadmih chad replied:
Aaah. Sorry about that. I sometimes tend to think of things in only two terms. Either Flash or everything else(HTML). A bad habit.
I use the basic rollover feature offered in Dreamweaver. Here is the code for a sample button:
a href="#" onClick="MM_goToURL('parent.frames[\'mainNav\']','nav_main.htm');return document.MM_returnValue" onMouseOver="MM_swapImage('nav1','','images/navigation_main/1-nav-on.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="images/navigation_main/1-nav.jpg" name="nav1" width="192" height="51" border="0"
I assume it is Javascript.
Thanks for replying.
I use the basic rollover feature offered in Dreamweaver. Here is the code for a sample button:
a href="#" onClick="MM_goToURL('parent.frames[\'mainNav\']','nav_main.htm');return document.MM_returnValue" onMouseOver="MM_swapImage('nav1','','images/navigation_main/1-nav-on.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="images/navigation_main/1-nav.jpg" name="nav1" width="192" height="51" border="0"
I assume it is Javascript.
Thanks for replying.
Replied 20 Nov 2002 22:49:06
20 Nov 2002 22:49:06 Brent Colflesh replied:
Dear Chad,
If you examine the top area of the source in your page, you'll see the actuall Javascript being called by the code you posted - MM's code is pretty heavy, just because it needs to be relatively modular - llook at the simple example here:
javascript.about.com/library/scripts/blrollover.htm
Replace MM's code with a simple script like that & you might get a slight performance gain - the main speed trap in this equation is the size of the graphics to be swapped - I've never bothered with anything over 2K.
Regards,
Brent
If you examine the top area of the source in your page, you'll see the actuall Javascript being called by the code you posted - MM's code is pretty heavy, just because it needs to be relatively modular - llook at the simple example here:
javascript.about.com/library/scripts/blrollover.htm
Replace MM's code with a simple script like that & you might get a slight performance gain - the main speed trap in this equation is the size of the graphics to be swapped - I've never bothered with anything over 2K.
Regards,
Brent
Replied 21 Nov 2002 02:28:53
21 Nov 2002 02:28:53 chadmih chad replied:
Thanks bcolflesh. I will try that out.
I have a question though. I noticed all of my images are "preloaded". If they are, then why would file size effect load time?
I have a question though. I noticed all of my images are "preloaded". If they are, then why would file size effect load time?
Replied 21 Nov 2002 15:53:33
21 Nov 2002 15:53:33 Brent Colflesh replied:
Dear Chad,
The preloading starts when the page is requested - otherwise the image would have to load the first time you rolled over it's trigger area.
Regards,
Brent
The preloading starts when the page is requested - otherwise the image would have to load the first time you rolled over it's trigger area.
Regards,
Brent