# Custom components

**URL:** <https://forum.kirupa.com/t/custom-components/322172>\
**Category:** Uncategorized\
**Created:** [May 12, 2011, 8:53pm UTC](https://forum.kirupa.com/t/custom-components/322172 "2011-05-12T20:53:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![heiny99](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@heiny99](https://forum.kirupa.com/u/heiny99)\
**Post date:** [May 12, 2011, 8:53pm UTC](https://forum.kirupa.com/t/custom-components/322172/1 "2011-05-12T20:53:34Z")

</div>

hey all,

I’m working in CS5. Please see attached files.

I have a little movieclip that has its own class. It’s an arrow that appears to draw itself (mask that moves across the arrow, takes 1 second/24 frames). Basically you add it to the timeline and input the frame number it’s on in an init() code, and it takes care of the rest.

What I want to do is make this a component and instead of the init() bit of code containing the frame number inside the arrow MovieClip, I’d like to set a parameter.

I have half of what I need: You can right click the MovieClip in the library. If you choose Component Definition, it appears you can set all the parameters needed. On a test run even though I knew it wouldn’t trigger my init() code I created a parameter in this popup called Start Frame, changed it to default to Zero, and set it as a number.

I then clicked the Display in Components Panel checkbox.

Everything works except for the following problems:

[LIST]  
[_]In the component inspector there are still no parameters.  
[_]I’m unable to see the arrow graphic when I add the movie clip to the stage.  
[/LIST]

Even if I could fix the two things above, how do I then get the parameter to trigger the init() function?

I’d greatly appreciate any help.
