Very simple AS problem

Hey everyone,

I am not a flash programmer but sometimes i build some simple things. This time i was building a world map with icons on the continents. If i click a button the website should go to and url. All worked well…

  • Created a map…
  • Created a button with different colours for the mouseover and mouseout state. (blue normal - pink over - blue down - pink hit)
  • on (release) { getURL(); }

Now i want a flashvar to control one of the 11 buttons (icons). Every button has a name (btn1 - btn11). the flashvar is passed correctly (_root.rid). Now i want the identifier (_root.rid) to make a button turn permanent pink if the identifier is there. I tried googeling a lot and i cannot find the answer.

Something like:


if (_root.rid) {
  eval('btn'+_root.rid).somecolorfunction(); 
  eval('btn'+_root.rid).changestate(); 
  eval('btn'+_root.rid).replaceForOtherButtonInastance();
}

I cannot find a way to fill in the above fictive functions. It looks like a dreadfull simple problem but i cannot seem to crack it. Some pointers would be of GREAT help!

Tiec