# Actionscript controlled movement

**URL:** <https://forum.kirupa.com/t/actionscript-controlled-movement/12330>\
**Category:** Uncategorized\
**Created:** [January 29, 2003, 8:10pm UTC](https://forum.kirupa.com/t/actionscript-controlled-movement/12330 "2003-01-29T20:10:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [January 29, 2003, 8:10pm UTC](https://forum.kirupa.com/t/actionscript-controlled-movement/12330/1 "2003-01-29T20:10:22Z")

</div>

is it possible to write a function to move an object and then call that function on a clip event

for instance

function (bounce){  
script;  
script;  
}

and then call it by saying

on(mouseOver){  
this.bounce;  
}

or something like that

an example of how this might work would be greatly appreciated

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 29, 2003, 8:13pm UTC](https://forum.kirupa.com/t/actionscript-controlled-movement/12330/2 "2003-01-29T20:13:48Z")

</div>

```php

FUNCTION:

nName = function(){
     //script
}

BUTTON:

on(rollOver){
     nName()
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 29, 2003, 8:29pm UTC](https://forum.kirupa.com/t/actionscript-controlled-movement/12330/3 "2003-01-29T20:29:26Z")

</div>

thanks 👁
