action script fun
action script fun
- Started
- Last post
- 4 Responses
- stewart
ok, i know this script works.
but maybe there is someone who can tell me WHY / HOW this works?----
onClipEvent (load) {
this._y = 200;
/:endPosy = 0;
this._x = 0;
/:endPosx = 0;
}
onClipEvent (enterFrame) {
movey = (/:endPosy-this._y)/5;
this._y += movey;
movex = (/:endPosx-this._x)/5;
this._x += movex;
}----
for example, what the * is this: "/:" doing in this script?
- stewart0
ok, stupid question.
/clear
- stewart0
wait! this is not a stupid question. i figured out what the "/:" is, but
what's the "+=" in
----
this._x += movex;
----
doing?
- mitsu0
this._x += movex;
is the same as
this._x = this._x + movex;
it's just shorthand
- stewart0
ok, thanks mitsu.
but is it possible that this little script is very processor intensive?
maybe
movey = (this.endPosy-this._y)/4;
is endless or something?