Preload Across Frames?

They have: 75 posts

Joined: Mar 2000

Hey, just wondering if any of you know how to use preloaded images accross frames. I'm doing a rollover effect accross frames, and don't want poeple to wait while each image loads =)

Right now, the code I'm using is

onMouseOver="parent.leftFrame.document.images.transparent.src='images/member/tallon.jpg'"

, which someone was nice enough to give me on this message forum. I'm not using an "onMouseOut" because I'm having all the buttons on one side effect the same image in another frame.

Thanks in advance for any help,

-Tallon-
Oh, if you want to see the site..go to http://clannotorious.net-games.com/tallons_claw/TCmain.html

and then click on the button that says "members".

-tallon

They have: 152 posts

Joined: Dec 1999

Why dont you just preload them in that HTML Page. Lets say your left frame is left.html, then place the JS code in there to preload the images that will appear onmouseover, and in the top frame (lets say its top.html) place the JS in top.html that would preload the images that will be effected.

I think that would work. Myabe not, I suck at JS

------------------
-RJ D'Angelo
http://www.dangelowebdesign.com
http://sopranos.virtualave.net
AOL: dangelofly
AIM: flying cow 1016
Email: [email protected]

They have: 75 posts

Joined: Mar 2000

Ok, so your saying to preload the images in both html files? or what? I don't quite follow what you said.

If you did mean that.....I would want to try to stay away from having to preload all th eimages twice over =)

-Tallon-

-tallon

They have: 231 posts

Joined: Feb 2000

Preload your images using this code:

code:

if (document.images) {
   SOURCE_NAME = new Image();
   SOURCE_NAME.src = "FILE.GIF";
   }[/code]

Then change your HTML to:

code:
onMouseOver="parent.leftFrame.document.images.transparent.src = parent.SOURCE_NAME.src;[/code] 

:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.