# Movement actionscirpt

**URL:** <https://forum.kirupa.com/t/movement-actionscirpt/175148>\
**Category:** Uncategorized\
**Created:** [January 12, 2006, 2:07am UTC](https://forum.kirupa.com/t/movement-actionscirpt/175148 "2006-01-12T02:07:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kid](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/32.png) [@kid](https://forum.kirupa.com/u/kid)\
**Post date:** [January 12, 2006, 2:07am UTC](https://forum.kirupa.com/t/movement-actionscirpt/175148/1 "2006-01-12T02:07:53Z")

</div>

good day!

i already finish my memory game. now i am working on this fish…

i have a fish movieclip. i use actionscript to make it move.

here is the code from [kirupa.com](http://kirupa.com) Movement Actionscript Tutorial

```auto

fish_mc.onEnterFrame = function () {

          speed = 2;
          fish_mc._x += speed;
}

```

this fish is inside the aquarium, so how can i make the fish detect the width of the aquarium so it won’t go outside of the aquarium.

thank you for any help…  
:pleased:
