This content has been marked as final. Show 3 replies
> im am stumped on how to get around the setProperty part.
setProperty() is older than the hills. It's just a precursor to dot
notation, which you're already using. ;)
For example, this ...
box.targXmove = 151.1;
... is an example of dot notation. You're setting the targXmove property of
this box movie clip to 151.1. It's the same as saying this ...
setProperty(box, targXmove, 151.);
... only clunkier.
To change a line like this ...
setProperty(this, x, cXmove-(difXmove/5));
... you'd render it like this:
this.x = cXmove-(difXmove/5);
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
Please don't take this personally, but I'm always amazed that folks still use setProperty. (It went out of favor in something like 2002!) What I'm wondering is why you can set cXmove (a property) and you can get box.x (a property) and get/set box.targXmove (another property), so what was it about setting x and y that was giving you such a stumbling block?
This question is really a serious attempt for me to try and understand how other folks think so I can explain things better.
thanks for the help guys, you rock.
to answer your question rothrock...
i got this piece of code from some random tutorial site about a year ago. it worked so i did not question using the setProperty method. i just figured using that method was the only way to get the AS to solve the equation. i did not realize you can just enter the equation like you would a single number.
also im kind of a noobie with AS thats more complicated than setting up buttons, loading bars, and other simple stuff.
hope that cleared up my idiot-ness for you.
thanks again for the help.