PDA

View Full Version : How do I...


[RDoGz] Alborac
31-10-1999, 15:58
On my webpage - http://www.btinternet.com/~alborac/ - I have buttons down the side that when u put your mouse over them it swaps to another picture, anyway, when u move your mouse over you have to wait for the picture to load, is there a way of getting them to load when u first go to the page so u don't have to wait when your mouse goes over them? Please let me know and if u don't understad what i am yabbering on about please go to my webpage and have a look.
http://www.btinternet.com/~alborac/

[Jedi] Boba Vont
31-10-1999, 16:32
Hi, there are two ways of doing that type of thing. The one which I prefer becuase it is faster to download is demonstrated in my web site. see www.btinternet.com/~jediboba/navbar.htm (http://www.btinternet.com/~jediboba/navbar.htm) then select source from the view menu of IE.
But you might prefer the more flexible way, which you seem to be trying. A good example is at http://clubs.wireplay.co.uk/bladerunners/ . the actual file is http://clubs.wireplay.co.uk/bladerunners/title.htm . Again use veiw source to see how it's done. Basically all of the images are loaded by a script then are in memory ready to be swapped.

------------------
My Web Site (http://www.btinternet.com/~jediboba/index.htm)
<A HREF="http://www.teamjedi.freeserve.co.uk/" TARGET=_blank>Jedi Squadron
</A>

[RDoGz] Alborac
31-10-1999, 16:40
Well m8, i c what u have done but what part is the actual code? Please could u copy and paste it into here for me? Or if there is a way of doing it with Frontpage 2000 you could also post that in here.

[Jedi] Boba Vont
31-10-1999, 16:59
To look at the source code either rightclick on part of the frame that doesn't have a picture the click view source, or load the file for that frame by itself a click view source.
BTW I didn't write the bladerunners page.
Here is a cut down version of that code, with 2 buttons.

&lt;body bgcolor="#000000" text="#FFFFFF" link="#00FFFF"
vlink="#00FFFF" alink="#00FFFF"&gt;
&lt;script language="JavaScript1.1"&gt;

&lt;!--

function change(ObjectName, ChangeTo)
{
document[ObjectName].src = eval(ObjectName + ChangeTo + ".src");
}

mainon = new Image(15,100);
mainon.src = "main_on.gif";
mainoff = new Image(15,100);
mainoff.src = "main_off.gif";

clanon = new Image(15,100);
clanon.src = "clan_on.gif";
clanoff = new Image(15,100);
clanoff.src = "clan_off.gif";

//--&gt;

&lt;/script&gt;&lt;div align="center"&gt;&lt;center&gt;

&lt;table border="1" cellpadding="0" cellspacing="0" width="100%"
bordercolor="#E87160"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;p align="center" onmouseover="change('main', 'on')"
onmouseout="change('main', 'off')"&gt;&lt;a href="main.htm"
target="main"&gt;&lt;img src="main_off.gif" border="0"
width="100" height="20" name="main"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p align="center" onmouseover="change('clan', 'on')"
onmouseout="change('clan', 'off')"&gt;&lt;a
href="http://www.btinternet.com/~dachande/br/members/index.htm"
target="main"&gt;&lt;img src="clan_off.gif" border="0"
width="100" height="20" name="clan"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/table&gt;
&lt;/center&gt;&lt;/div&gt;
&lt;/body&gt;

You should be able to work out how it works from that.

------------------
My Web Site (http://www.btinternet.com/~jediboba/index.htm)
<A HREF="http://www.teamjedi.freeserve.co.uk/" TARGET=_blank>Jedi Squadron
</A>