# Copy motion as moviescript into a class

**URL:** <https://forum.kirupa.com/t/copy-motion-as-moviescript-into-a-class/269871>\
**Category:** Uncategorized\
**Created:** [September 2, 2008, 4:37pm UTC](https://forum.kirupa.com/t/copy-motion-as-moviescript-into-a-class/269871 "2008-09-02T16:37:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoink](https://avatars.discourse-cdn.com/v4/letter/z/9d8465/32.png) [@zoink](https://forum.kirupa.com/u/zoink)\
**Post date:** [September 2, 2008, 4:37pm UTC](https://forum.kirupa.com/t/copy-motion-as-moviescript-into-a-class/269871/1 "2008-09-02T16:37:32Z")

</div>

Good day, kind sir’s. I have a quick question…

Why doesn’t this work:

i have a class that extends movieclip, then in it i put a “move” function that runs when an instance of the class is added (event.ADDED).

Then, i created that class in the main time line, created a keyframe, made a motion tween and stuff, then copied those frames as action script.

In the “move” function, i pasted the above motion code.

However… when i run it, it doesn’t move =(

i placed trace functions before and after the pasted coded and both of them were working properly… what step am i missing?

i already imported:  
import flash.display._;  
import flash.events._;  
import fl.motion.Animator;  
import fl.motion.\*;  
into the class btw…

thanks for your time =)
