Okay, so i've looked and looked and I havent been able to find anything I can understand to help with this problem. I know how to ease a movie clip to the position of my mouse coordinates. What I want to do is use a movieclip that - when clicked- will ease two OTHER movieclips into fixed coordinates.
The movie clips only need to move on the Y axis, but since i have been trying so hard to understand this, getting help for x and y coordinates would be cool. I'm attaching a file with no code in it, but its for visuals. I want the pressed movie clip to move the color blocks down/up according to coordinates I enter into the AS. Can ANYONE help? btw, i'm using Flash 8
it's pretty easy actually... but i know personally how easily this stuff seems to overwhelm and frustrate the hell out of you...
try this
Code:
MovieClip.prototype.moveY = function(targetY, speed) {
this.onEnterFrame = function() {
this._y += (targetY-this._y)/speed;
if (this._y> targetY-1 && this._y< targetY +1) {
this._y = targetY;
delete this.onEnterFrame;
}
};
};
// PARAMETERS:
// targetY = your destination point
// speed = how quickly you want to get there/degree of easing...
// USAGE : (from a button like you need..)
btn.onRelease = function(){
mc_1.moveY(300, 3);
mc_2.moveY(Stage.height-mc_2._height, 4);
};
you can easily use this for x-axis tweening as well... just swap all the Y's for X's.... see... now wasn't that easy?!?!
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |