for what are used following functions

M

MR. Ask

Hallo. I have a question. For what are used following functions
MM_swapImgRestore, MM_preloadImages, MM_findObj(n,d), MM_swapImage(). I
would be grateful for the answer or source where I could found these
informations (www,books). I need description or example of using.
 
R

Richard Cornford

MR. Ask said:
Hallo. I have a question. For what are used following functions

(For future reference, in English that question would more commonly be
expressed "What are the following functions used for?")
MM_swapImgRestore,

Restoring to the original image, images that were previously swapped
using - MM_swapImage.
MM_preloadImages,

Pre-loading images (into Image objects, where supported).
MM_findObj(n,d),

Finding (returning references to) elements within the DOM by name or ID
string reference.
MM_swapImage().

Swapping images (making their SRC attribute point to a different image
source so that different image is displayed (where supported).
I would be grateful for the answer or source where
I could found these informations (www,books).

The "MM_" prefix is indicative of functions used in Macromedia products
so it is the documentation for those products that should be examined
for explanations of the functions. And it is the output of those
products that should be examined for the source code of the functions
(Dreamweaver being the most likely candidate).
I need description or example of using.

These functions are designed to be automatically generated/employed by
machines. There are overly general, inefficient and obscurely written
(they are also not that safe or cross-browser). A human programmer would
(should) not choose to use these functions at all.

Richard.
 
R

Richard

Hallo. I have a question. For what are used following functions
MM_swapImgRestore, MM_preloadImages, MM_findObj(n,d), MM_swapImage(). I
would be grateful for the answer or source where I could found these
informations (www,books). I need description or example of using.


I have found that it is much easier to put an image in a division, then show
or hide the division as needed.
 
R

Richard Cornford

Richard said:
I have found that it is much easier to put an image in a
division, then show or hide the division as needed.

As you posses no technical knowledge in any web-related area, are not
rational enough to ever comprehend programming and apparently are not
capable of understanding simple statements in you own native tongue, you
will find yourself labouring under may misguided and mystical beliefs.
However, others are not necessarily subject to your inadequacies and
would generally benefit from never hearing from you at all.

It is probably redundant to point out that you have managed to be
spectacularly irrelevant in your response to the question actually
asked.

Richard.
 
M

MR. Ask

Sat, 19 Feb 2005 14:12:07 -0000, na comp.lang.javascript, Richard Cornford
napisa³(a):
These functions are designed to be automatically generated/employed by
machines. There are overly general, inefficient and obscurely written
(they are also not that safe or cross-browser). A human programmer would
(should) not choose to use these functions at all.

Richard.
Sorry for my English. I ask because I want to create web pages with some
pictures and I don't want this pictures load all the times. I would use
this pictures as menu. I observed that in many pages these functions are
used and I wanted to do the same.
 
R

Randy Webb

MR. Ask said:
Sat, 19 Feb 2005 14:12:07 -0000, na comp.lang.javascript, Richard Cornford
napisa³(a):


Sorry for my English. I ask because I want to create web pages with some
pictures and I don't want this pictures load all the times. I would use
this pictures as menu. I observed that in many pages these functions are
used and I wanted to do the same.

The functions that you are referring to (that start with MM_) are a
product of Macromedia's (failed) attempt to write a "standard" function
that works in most (if not all) cases. Thats impossible to do. The best
script you can write is very specific to a particular page. If all you
want is a simple image rollover, it is done a lot simpler, and more
efficient, than the MM_ functions.

<img src="someImage.jpg" name="myImage" width="XX" height="XX" alt="XXXX">

function swapImages(imageName,newSource){
if (document.images && document.images[imageName]){
document.images[imageName].src = newSource;
}
else{return false;}
}

And you call it something like this:

onmouseover="swapImages('myImage','newImageNameHere')
onmouseout=""swapImages('myImage','oldImageNameHere')

<FAQENTRY>
Is there a notes section that deals with image swaps? I know 4.31
addresses why rollovers are slow but I do not see anything in the FAQ
itself that addresses how to do an image swap.
</FAQENTRY>

When replying to this message, please make Richard's life simpler and
modify the FA*ENTRY tags above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top