# This script in AS3?

**URL:** <https://forum.kirupa.com/t/this-script-in-as3/240023>\
**Category:** flash\
**Created:** [September 28, 2007, 12:05pm UTC](https://forum.kirupa.com/t/this-script-in-as3/240023 "2007-09-28T12:05:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bennymartensson](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bennymartensson/32/1317_2.png) [@bennymartensson](https://forum.kirupa.com/u/bennymartensson)\
**Post date:** [September 28, 2007, 12:05pm UTC](https://forum.kirupa.com/t/this-script-in-as3/240023/1 "2007-09-28T12:05:23Z")

</div>

Can anybody help and try to explain how to make this compatible with AS3? Thanks!

```auto

import flash.filters.BlurFilter;

var stagewidth = 650;
var stageheight = 450;
var ease_speed = .1;

//attach images
_root.attachMovie("background_mc","image1_mc",_root.getNextHighestDepth());
_root.attachMovie("flower1_mc","image2_mc",_root.getNextHighestDepth());
_root.attachMovie("flower2_mc","image3_mc",_root.getNextHighestDepth());

var num_images = 3;

var myBlur:BlurFilter = new BlurFilter(15, 15, 1);

for(i = 2; i <= num_images; i++) {
	_root["image"+ i +"_mc"].filters = [myBlur];
}

_root.onEnterFrame = function(){
	mousex_per = (_xmouse / stagewidth);
	mousey_per = (_ymouse / stageheight);
	for(i = 1; i <= num_images; i++) {
		tempxtar = 0 - (_root["image"+ i +"_mc"]._width - stagewidth) * mousex_per; 
		tempytar = 0 - (_root["image"+ i +"_mc"]._height - stageheight) * mousey_per;
		_root["image"+ i +"_mc"]._x += (tempxtar - _root["image"+ i +"_mc"]._x) * ease_speed;
		_root["image"+ i +"_mc"]._y += (tempytar - _root["image"+ i +"_mc"]._y) * ease_speed;
	}
}

```
