View Single Post
  #6  
Old 05-14-2008, 10:44 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Maybe make some sort of a hash function? Like:

PHP Code:
function doShowImg(text) {
  
temp.hash myhash(text);
  for (
0100; ++i) {
    if (
findimg(hash*100 i).title in {text""}) {
      
with (findimg(hash*100 i)) {
        
yourstuffgoeshere();
        
this.title text;
      }
      break;
    }
  }
}

function 
onCreated() doShowImg("hpbar"); 
Of course you would have to add other params for the various showimg elements but that's just something to give you an idea. Also, I'll leave the hash function up to you but it should return some sort of integer of course. This also assumes that you won't be using more then 100 images for each element that shares the same index on the hash table.

After that, something could be scripted fr hiding the images and when hideimg() is called, the "title" var would be deleted so you wouldn't need to worry about that .

Hope that helps.
__________________
Do it with a DON!
Reply With Quote