PDA

View Full Version : Matching a String Literal with an Instance Name


123Jack
11-23-2002, 09:27 PM
Is there any way to get the ActionScript to load the variable then act on a matching instance name? For example I am creating a dbase driven gaming site. When a review is from Gamecube I want a gamecube logo to pop up in the graphic. I have the logo named "gamecube" as the instance, and the variable read in also is "gamecube" from the systems table in the database. Now I wanted to link the String to the instance, IE "system"._visible = true; Is there any way to do this, because there are many system logos, and instead of having 10+ if statements, I wanted just one that would just turn on the visibility of the instance that matches the String. If anyone can help I would greatly appreciate it.

snapple
11-23-2002, 11:08 PM
This has been identidied as a 'cross-post' please post your question once and we will do our best to answer it. [other post in as.forum]

snapple

Ricod
11-24-2002, 02:06 PM
Snapple, the automatic one can be accessed by typing [ crosspost ] without the spaces inside the brackets.

snapple
11-24-2002, 02:39 PM
HA, thanks Ricod - thoguht i was doing something wrong.

Well you learn something new everyday.

Cheers mate :)

Ricod
11-24-2002, 09:07 PM
I know what you mean !

cheers to you too !