# Help converting AS2 code to AS3

**URL:** <https://forum.kirupa.com/t/help-converting-as2-code-to-as3/260768>\
**Category:** flash\
**Created:** [May 19, 2008, 6:45pm UTC](https://forum.kirupa.com/t/help-converting-as2-code-to-as3/260768 "2008-05-19T18:45:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twallis](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@twallis](https://forum.kirupa.com/u/twallis)\
**Post date:** [May 19, 2008, 6:45pm UTC](https://forum.kirupa.com/t/help-converting-as2-code-to-as3/260768/1 "2008-05-19T18:45:01Z")

</div>

Hi There

I have created a water effect in Adobe Flash using AS2, however I now wish to create a flash application with the same effect but using AS3.

Please see the attached code I have used to create the water effect using AS2.

I am looking for somebody to help me change this to work in Action Script 3. Any help would be greatly appreciated.  
Thanks  
Tremayne

_Attached Code_  
// ----------------------------------------------- // Water Reflection Effect // ----------------------------------------------- import flash.display._; import flash.geom._; import flash.filters.\*; myBitmap = new BitmapData(1090,770,false,0); pt = new Point(0,0); mpoint = new Point(0,0); myDispl = new DisplacementMapFilter(myBitmap, mpoint,1,2,10,50); water\_mc.myList = new Array(); water\_mc.myList.push(myDispl); water\_mc.filters = water\_mc.myList; i = 1; this.onEnterFrame = function() { filterList = water\_mc.filters; offset = new Array(); offset[1] = new Object(); offset[1].x = i; offset[1].y = i/8; myBitmap.perlinNoise(45,5,3,50,true,false, 7,true,offset); filterList.mapBitmap = myBitmap; water\_mc.filters = filterList; i++; }[h]Text[/h]  
[URL=“[http://www.kirupa.com/forum/register.php?a=act&u=115239&i=12001563](http://www.kirupa.com/forum/register.php?a=act&u=115239&i=12001563)”]
