PDA

View Full Version : Text fade with actionscript



buddylee
November 12th, 2002, 08:42 PM
Ok, lets say I have a MC called Hobbies. On rollover, I want it to duplicate itself and call the new MC and call it hobbies2. Now what I want to happen is set hobbies2._alpha = 0, and then I am making it move up and over, and while it is moving, I want it slowly to go to home2._alpha = 100. Can someone show me how do to it with this code....?

hobbies.onRollOver = function() {
movement = 26
_root.hobbies.duplicateMovieClip("hobbies2", 1);
_root.hobbies2._x += movement;
_root.hobbies2._y -= movement;
};
hobbies.onRollOut = function() {
_root.hobbies2._x -= movement;
_root.hobbies2._y += movement;
_root.hobbies2._visible = false;
};


Also, if I have multiple movie clips that I want to do this effect, can I put it all in the same layber and frame, or do I have to have a seperate layer for each rollover?
Thanks



Also,

h88
November 13th, 2002, 04:37 AM
I made something really fast:


hobbies.onRollOver = function() {
_root.hobbies.duplicateMovieClip("hobbies2", 1);
_root.hobbies2._alpha = 0;
hobbies2.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha = this._alpha+3;
}
this._x = this._x+1;
this._y = this._y-1;
};
};
hobbies.onRollOut = function() {
_root.hobbies2._visible = false;
};

Bezzer
November 13th, 2002, 06:32 AM
oh..if its dynamic text you should include the outlines..otherwise it won't fade.. :)