# Alpha Graphic Fade with Inertia in flash 8 doesn't work

**URL:** https://forum.kirupa.com/t/alpha-graphic-fade-with-inertia-in-flash-8-doesnt-work/168068
**Category:** flash
**Created:** [November 3, 2005, 5:25pm UTC](https://forum.kirupa.com/t/alpha-graphic-fade-with-inertia-in-flash-8-doesnt-work/168068 "2005-11-03T17:25:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kolindre](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kolindre](https://forum.kirupa.com/u/kolindre)
#### Post date: [November 3, 2005, 5:25pm UTC](https://forum.kirupa.com/t/alpha-graphic-fade-with-inertia-in-flash-8-doesnt-work/168068/1 "2005-11-03T17:25:27Z")

</div>

Hello, I was looking the tutorial “[color=black]Alpha Graphic Fade with Inertia” made by telekinesis in flash mx. I´m trying to update it to flash 8 and it doesn´t works. Could anybody help me to translate it to this version. I was trying to talk with telekinesis (the author) but he doesn’t answer me. This is the code[/color]

Thank you very much

[color=gray]/\*  
||== Title: Alpha Graphic Fade ==||  
||== Author: dan4885 (Dan Alu) ==||  
||== Site: [/color][[color=gray]www.macromotive.com[/color]](http://www.macromotive.com/)[color=gray] ==||  
||== Date: 8/12/02 ==============||  
\*/[/color]  
[color=blue][color=gray]//Creates a new movie clip on the ‘\_root’  
//timeline which is named ‘script\_clip’  
[/color]\_root.createEmptyMovieClip(“script\_clip”, 0);  
script\_clip.onLoad = function() {  
[color=gray]//Makes variable to store inertia.  
[/color]mosx = 0;  
[color=gray]//Makes variable to store inertia.[/color]  
mosy = 0;  
};  
[color=gray]//Starts a movie clip loop that executes  
//the code everytime the play head enters  
//a frame and this only works in Flash MX  
[/color]script\_clip.onEnterFrame = function() {  
[color=gray]//Takes ‘mosx’ and subtracts by the \_xmouse mouse position to yield the difference.  
[/color]difx = mosx - \_root.\_xmouse;  
[color=gray]//Takes ‘mosy’ and subtracts by the \_ymouse mouse position to yield the difference.  
[/color]dify = mosy - \_root.\_ymouse;  
[color=gray]//Subtracts the total of the \_xmouse position and ‘mosx’ and 8 determines the speed of the effect.  
[/color]mosx -= difx / 8;  
[color=gray]//Subtracts the total of the \_ymouse position and ‘mosy’ and 8 determines the speed of the effect.  
[/color]mosy -= dify / 8;  
[color=gray]//Used to control the \_alpha setting of ‘graphic1’ with dependency of the mouse position and inertia.  
[/color]\_root.graphic1.\_alpha = (mosx / 4) - (mosy / 4);  
[color=gray]//Used to control the \_alpha setting of ‘graphic2’ with dependency of the mouse position and inertia.  
[/color]\_root.graphic2.\_alpha = 100 - (mosx / 4) - (mosy / 4);  
[color=gray]//Used to control the \_alpha setting of ‘graphic3’ with dependency of the mouse position and inertia.  
[/color]\_root.graphic3.\_alpha = (mosy / 4) - 100 + (mosx / 4);  
[color=gray]//Used to control the \_alpha setting of ‘graphic4’ with dependency of the mouse position and inertia.[/color]  
\_root.graphic4.\_alpha = (mosy / 4) - (mosx / 4);  
};[/color]
