# Why this cript can not run well on flash player 7.0

**URL:** <https://forum.kirupa.com/t/why-this-cript-can-not-run-well-on-flash-player-7-0/138031>\
**Category:** Uncategorized\
**Created:** [February 19, 2005, 5:17am UTC](https://forum.kirupa.com/t/why-this-cript-can-not-run-well-on-flash-player-7-0/138031 "2005-02-19T05:17:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmtee](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nmtee](https://forum.kirupa.com/u/nmtee)\
**Post date:** [February 19, 2005, 5:17am UTC](https://forum.kirupa.com/t/why-this-cript-can-not-run-well-on-flash-player-7-0/138031/1 "2005-02-19T05:17:34Z")

</div>

Hi guys,  
I use flash mx 2004 v7.2 . The following action code is run well for the effect to animation when i publish with setting for flash player 6.0, action script 2.0 …But this does not run for the effect when i publish wiht setting for flash player 7.0 , action script 2.0 …PLease help me to fix this. thank you!

here is the code :  
function setAnimation()  
{  
var arr = new Array();  
var i = 20;  
for (var m in this)  
{  
var mc = this[m];  
mc.ox = mc.\_x;  
mc.oy = mc.\_y;  
mc.\_x = 280 \* Math.random();  
mc.\_alpha = 0;  
mc.dx = 10;  
mc.dy = 5;  
arr.push(mc);  
i = i - 0.500000;  
} // end of for…in  
arr.reverse();  
var me = this;  
var i = 0;  
var intvl = setInterval(function ()  
{  
arr\*.onEnterFrame = me.ani;  
var blc = arr\*.attachMovie(“block”, “block”, 100);  
blc.\_rotation = i % 4 \* 90;  
blc.\_width = arr\*.\_width;  
blc.\_height = arr\*.\_height;  
i++;  
if (i \> arr.length)  
{  
clearInterval(intvl);  
} // end if  
}, 30);  
} // End of the function  
function ani()  
{  
var difx = this.ox - this.\_x;  
var dify = this.oy - this.\_y;  
this.\_x = this.\_x + difX / this.dx;  
this.\_y = this.\_y + difY / this.dy;  
this.\_alpha = this.\_alpha + (this.\_alpha \< 100) \* 5;  
this.\_rotation = -difY \* 2;  
if (Math.abs(difX) \< 0.500000 && Math.abs(difY) \< 0.500000 && this.\_alpha \>= 100)  
{  
this.\_x = this.ox;  
this.\_y = this.oy;  
this.\_alpha = 100;  
this.\_rotation = 0;  
delete this[“onEnterFrame”];  
} // end if  
} // End of the function  
setAnimation();
