Groups | Blog | Home
all groups > flash (macromedia) > july 2004 >

flash (macromedia) : a variable in a path? do i use a + ?


Dan Defenbaugh
7/7/2004 5:45:47 PM
I think you want the eval() function..

for example:

eval("_root.enginemap." + currentSpotlight + ".anotherMovie").play();

d

[quoted text, click to view]
bitfactory
7/7/2004 11:58:15 PM
hey folks...

simple question (i think)...

i have a variable that i'm trying to add to a path, but not sure about the
syntax...

the line is:
_root.enginemap.currentSpotlight.anotherMovie

if currentSpotlight above is the variable, how do i get it to register as
such... Flash obviously thinks there's a movie called "currentSpotlight" - when
it's really a variable for the name of a movie...

anyone? i've tried "+" and "( )" and now i'm going nuts....

thanks much!
bitfactory
7/8/2004 1:43:24 AM
AddThis Social Bookmark Button