# Add actionscript to frame with a compomnent

**URL:** <https://forum.kirupa.com/t/add-actionscript-to-frame-with-a-compomnent/241368>\
**Category:** flash\
**Created:** [October 12, 2007, 6:16pm UTC](https://forum.kirupa.com/t/add-actionscript-to-frame-with-a-compomnent/241368 "2007-10-12T18:16:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvargas](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jvargas](https://forum.kirupa.com/u/jvargas)\
**Post date:** [October 12, 2007, 6:16pm UTC](https://forum.kirupa.com/t/add-actionscript-to-frame-with-a-compomnent/241368/1 "2007-10-12T18:16:27Z")

</div>

Hello all,

First let me thank everyone that replies to this.  
I’ve started to create small classes that do specific things that I use often.  
Since I work in a team environment I usually package them into MXPs and then distribute them.

Here is what I want to do:

1. Create a class -( got that one.)
2. Package the class into an MXP - (No problem)
3. When the user installs the MXP it then installs it into their components panel - (so far so good.)
4. When the user drags the component to the stage I want it to write a small snippet of actionscript  
to frame one automatically. Specifically, write the import command and an example of how to use that component class.

Now, I know this can be done. I’ve worked a few times with the eye blaster platform and when you download thier MXP  
and use one of their components, it writes some code to frame one once I drag it to the stage.

How can I do this?

Thank you  
| J |
