By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,044 Members | 1,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,044 IT Pros & Developers. It's quick & easy.

for what are used following functions

P: n/a
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.
Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
MR. Ask wrote:
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.
Jul 23 '05 #2

P: n/a
On Sat, 19 Feb 2005 14:45:44 +0100 MR. Ask wrote:
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.
Jul 23 '05 #3

P: n/a
Richard (RtS) wrote:
On Sat, 19 Feb 2005 14:45:44 +0100 MR. Ask wrote:
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.


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.
Jul 23 '05 #4

P: n/a
Sat, 19 Feb 2005 14:12:07 -0000, na comp.lang.javascript, Richard Cornford
napisał(a):
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.

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.
Jul 23 '05 #5

P: n/a
MR. Ask wrote:
Sat, 19 Feb 2005 14:12:07 -0000, na comp.lang.javascript, Richard Cornford
napisał(a):
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.


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','newImageNameHer e')
onmouseout=""swapImages('myImage','oldImageNameHer e')

<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.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.