PDA

View Full Version : Question



Raydred
October 30th, 2002, 11:34 AM
Hey guys whats up?

Im trying to figure something out,

Whenever i do my coding etc and i want to set a dynamic mc, i use the old school coding like this..

setProperty("myMc" add i,_x, 2);

right, well whats the coding stlye in mx? I havent figured that out. i would want to do something like

_root.("myMc" add i)._x = 2;


But im not sure whats proper, any ideas?

- Raydred

sbeener
October 30th, 2002, 12:03 PM
close...

_root["myMc" + i]._x = 2;

Raydred
October 30th, 2002, 12:16 PM
alrighty =) well i tried that, no worky...


check out my code..
this works..:

setProperty("fx" add i,_x, startx + Number(i*kern));
setProperty("fx" add i,_visible, true);

this doesnt.. hmm.. any thoughts?

_root["fx" + i]._x = startx + Number(i*kern);
_root["fx" + i]._visible = true;

ps. and i do have the path correct =)

srinivas
October 30th, 2002, 12:24 PM
I had the same problem. What I did was to evaluate the expression first and then assign that variable to the _x property

abcd=startx + i*kern;

_root["fx" + i]._x = abcd;

Try this! Hope this helps!

Raydred
October 30th, 2002, 12:54 PM
hmm, still not working right, but thanks ! =)
i'll keep that in mind and i'll play with it some more lol =)

sbeener
October 30th, 2002, 07:27 PM
run this:

trace("clip=" + eval("fx" + i));

and tell me what's traced.

Raydred
October 31st, 2002, 06:04 PM
this is what is outputed..


clip =



=) i tried the eval and no worky.. not sure whats up, seems like sometimes AS doesnt work for me, must be a curse lol jk

sbeener
October 31st, 2002, 06:32 PM
was that trace action right underneath your setProperty code?

put it there and see what it traces.