Some questions regarding home made components

Hi!!

I am continuing my struggle with developing my own components. My first component that I am working with now will be similar to the Label component, but I will add some methods for communication and data population and also make it easy for a designer to change font, size and that kind of stuff without coding. The main goal with the component is to make it super easy to use so that you can use it without any knowledge in actionscript.

So my goal is:

Develop a component that displays text (which will come from an external source) with any font and any size and any adjustment.

The thing is that actually, I would like the component to work EXACTLY as the text tool, with all it’s easy accessed properties and such. But since it needs to have several methods and properties attached to it I figured that I need to develop it as a component.

My first thought, since I have tried some JSFL, was to develop a custom tool, but since the actual code for the text tool seems to be precompiled it feels like a huge project to build this from scratch.

I have built a somewhat functioning component by stealing and manipulate the code from the Label. I have some problems with i though, and that leads to my questions:

  1. To rule out the best option, can someone please confirm that there is no way in getting the .jsfl file for flash’s text tool?

  2. Do my component need to extend the UIComponent class to make it styleable and .fla packable in the new CS3 manner?

  3. Is there any way to “take over” the properties window and recreate the property option for the text field? Right now you have to go to the parameters to set font, font size and so on. It’s impossible to make it as powerful as the text tool properties and it is less user friendly.

  4. Is it possible to automatically embed the font that is used by the component without the user needing to do anything at all?

Four questions to start with, probably many more to come…

I will be very grateful for any clues regarding this!

/Andreas