PDA

View Full Version : Getting Property and Adding a Value to that property to get the new position


papaan
03-11-2005, 04:32 AM
Hi,
I am sure this is very simple but I do not know how to do it right.
I have a button that I would like to get the property_x of a certain movie clip and then add a certain number(ie. 200 px) to that _x property to move the MC to left or right depending on the button clicked.
Any help is appricated.
Thanks
The button action goes like this
on (press) {

_root.xpos = -756;
trace(scroll_mc._x);
var isPortrait = true;

}
//_root.b3.enabled = false;

Cota
03-11-2005, 05:28 AM
Getting the _x property of a movieclip is as simple as movieclip._x. Seems like you have the rest down, assuming I understand you correctly.