# Text fade with actionscript

**URL:** <https://forum.kirupa.com/t/text-fade-with-actionscript/8047>\
**Category:** flash\
**Created:** [November 13, 2002, 1:42am UTC](https://forum.kirupa.com/t/text-fade-with-actionscript/8047 "2002-11-13T01:42:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![buddylee](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@buddylee](https://forum.kirupa.com/u/buddylee)\
**Post date:** [November 13, 2002, 1:42am UTC](https://forum.kirupa.com/t/text-fade-with-actionscript/8047/1 "2002-11-13T01:42:18Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2002, 9:37am UTC](https://forum.kirupa.com/t/text-fade-with-actionscript/8047/2 "2002-11-13T09:37:12Z")

</div>

I made something really fast:

```php
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;
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2002, 11:32am UTC](https://forum.kirupa.com/t/text-fade-with-actionscript/8047/3 "2002-11-13T11:32:43Z")

</div>

oh…if its dynamic text you should include the outlines…otherwise it won’t fade… 🙂
