-
this command...
I am trying to skip a couple of levels in my actionscript book and ask a question I still don't understand.
what does this._x and this._y do exactly.
lamens terms please?
-
_global.chosenson="flash";
_x/_y refer to the x/y coordinates of the object they are referencing.
for instance, I have a movie clip on stage at a postion of x=100, y=100
On the movieclip i place a script like :
onClipEvent(mouseDown){
yPos = this._y;
xPos = this._x;
trace(yPos);
trace(xPos);
}
this would show an out put of
100
100
If you have a question, need some help, email me: chosenson
It's always the simplest things that escape the complex mind!
always be just
-
Left-Handed Flash User
.... andthis refers to the timeline you are in
-
\/\/EB/\/\ASTER
Originally posted by mickbrit55
.... andthis refers to the timeline you are in
Slighty true. If you are adding code to a frame, then yes, this refers to the timeline, but if you are adding code to an MC then it will only refer to that MC.
-
so with drag what will it do
So how do I use this
onClipEvent(mouseDown){
yPos = this._y;
xPos = this._x;
trace(yPos);
trace(xPos);
}
with drag....????
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|