Nice movieclip moving xy - need as1 to as2 conversion.
I've got a nice code moving movieclip in xy axis with a hit of a button... but it is as1 and so I cannot use some fonts features present in higher flash versions. If exported in as2 the movieclip moves only via x axis. Could someone please help me convert the code to as2? It is not much and I'm still in my very early stages of as education.
Here it is as attached to the movieclip:
onClipEvent (enterFrame) {
Xsquare = _root.maincontainer.mapmc._x;
Xdiff = Xpos-Xsquare;
Xmove = Xdiff/12;
_root.maincontainer.mapmc._x = Xsquare+Xmove;
Ysquare = _root.maincontainer.mapmc._y;
Ydiff = Ypos-Ysquare;
Ymove = Ydiff/12;
_root.maincontainer.mapmc._y = Ysquare+Ymove;
updateAfterEvent(enterFrame);
}
and now the code for a button
on (release) {
_root.maincontainer.mapmc.Xpos = 1670;
_root.maincontainer.mapmc.ypos = 1700;
}
Thanks in advance!