Confused with actionscript

hi there,

i got this as from kirupa.com tutorials and im frustrated…
i like to know why the object is moving slowly to its targetposition (like tweening)

[AS]setProperty(this, _x, cX-(difX/30)); [/AS]

if i would put in this code:

[AS]setProperty(this, _x, difX); [/AS]

it wont fade to its target position smoothly…

so, what is the main thing about these 2 scripts!?

thanx in advance

d

the calculation puts a decrement value between the first and last positions …
“get there gradually according to this math”

instead of just two different positions

so i see,

therefore i have to store the current x-position after or before the “setProperty” command right?

like this:
[AS]
onClipEvent(enterFrame) {
this._x = cx;
setProperty(this, _x, cX-(difX/30));
}
[/AS]

without that it would not achieve that desired effect right?

sorry for this maybe dumb question but i am new and try to learn as much as i can :wink:

d