[COLOR=#003366]Hi, i got this code made by Scotty, it’s an [COLOR=navy]example[/COLOR] on how to load external swfs sliding horizontally onto an mc container. Here’s the part of the code that i need to modify:[/COLOR]
MovieClip.prototype.slideTo = function(tar) {
this.onEnterFrame = function() {
this._x = tar-(tar-this._x)/1.3;
if (Math.abs(this._x-tar)<1) {
this._x = tar;
delete this.onEnterFrame;
}
};
};
[COLOR=#003366]It works nice, but i’d also like to move some graphics vertically using the same code. So if there is a way of adding a “_y” function or something like that to this code so that it’ll allow you to slide things horizontally and vertically at the same time. [/COLOR]
[COLOR=#003366]Any guide on how to do this will be much appreciated[/COLOR]