×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

slow image swaping - doesn't image preload work??

slow image swaping - doesn't image preload work??

slow image swaping - doesn't image preload work??

(OP)
Hi!
I've done a fireworks rollover-graphic with swapping images. I checked the preload option and it generated a Javascript preload function in the code. But somehow the preload doesn't seem to work properly as the swapping is very slow and it starts loading again and again, whenever I hover over a slice. Please have a look it is on the homepage of corplearn.co.uk.
Can anyone give me advise about this problem??
Jasminka

RE: slow image swaping - doesn't image preload work??

I thought I had the same problem. Apparently, it's not that they don't preload, but that fireworks and dreamweaver both make very slow rollovers. Something to do with the way they generate the code.  The advice that I got was to write them yourself.  There are several tutorials all over the place for this, I looked *everywhere*.  The coolest thing that I found was this.  

http://www.builder.com/Programming/Kahn/012898/toolmom.html

it will generate the code for you.  Pretty sweet.  Here's another one.

http://www.virtuallyignorant.com/buttons/

Good Luck!!!!   Holy tek-tips batman!

RE: slow image swaping - doesn't image preload work??

couldn't get into the url? page not found error!

But it is a good idea to learn the rollover code yourself - much more flexibility. The problem may be that the functions Fireworks inserts are general, so that they will work in a wide range of situations - useful for banging up a quick prototype but a little crude for your final site. They may be slow but they should work...

but if the preloader is working it definitely should not be accessing the site once your page is loaded - that is the function of the preloader!

RE: slow image swaping - doesn't image preload work??

I'm new at this thing too, but I think I have an idea.

The problem may be  that the "frame delay" may be set to something greater than zero.  Check the frame properties of each frame, and change frame delay (hundredths of seconds) to zero instead of the default, which I think is 7.  

Hope this helps!

RE: slow image swaping - doesn't image preload work??

(OP)
Thanks for the tip!
I'm not very fit with JavaScript, I looked at the code generated by Fireworks and found a bit about frames, but nothing stating a delay of seven, as well not in the preload-function. Here's the code, maybe you've got an idea?

<script language="JavaScript">
<!--hide this script from non-javascript-enabled browsers

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); return x;
}
/* Functions that swaps images. */
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

/* Functions that handle preload. */
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

// stop hiding -->
</script>


...or did you mean I need to change this delay not in the code itself, but somewhere in Fireworks, before exporting the file?
 Thank you!
   mink

RE: slow image swaping - doesn't image preload work??

you have to change it in the frames inspector in fireworks.
double click on the actual frame delay setting and a little box will open allowing you to specify a new setting.

Ya' Gotta Love It!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close