Custom Components and Project suggestions


I am trying to develop a set of classes and custom components which will make it easy to create user interfaces without much knowledge of AS. These user interfaces talk to external IP based devices.
I have completed on such interface using AS2 but used a active x VB container to do all the communications. I am now trying to recreate in AS3 but the learning curve is steep and I have been splitting my head open trying to get my head around which is the best way of attacking it.
So far I have created a class that connects to the control system using an XMLSocket and serializes the communication between the Flash and the Control system. I have also created a custom Event class to fire of messages to the component on the stage that may have to react to the incoming information. That is if a “channel 1 on” message comes in and there is a movie that has a 1 in its channel attribute is should animate to the on position.
I have trying to create a custom component that would have all the attributes that may need to be changed at design stage as Inspectable. I have done this but have run into a few snags (problems).

  1. Custom components don’t seem to lend them selves to multi state buttons (movies). From what I can figure the assets are locked in a single frame (2). I am not sure how this leaves me with being able to let a non programming arty type person giving it a nice pretty animated button gesture. I was thinking of trying to just make the simple animated movie with no AS and the adding it to the component at design time giving it a standard alias as a reference.

  2. If I try and add more than one of my custom components to stage is gives me an error. (already have an instance on the stage bla bla). How can I fix this ?

I have read many blogs on creating custom components and the offical Adobe one which is pretty full on. I was hoping to get some input back that would save me trawling through more blogs at least for a day or two.



Sorry… My question isn’t really connected =) Do you have anything to do with Mattman? =)

  1. I’m not sure I understood completely what you tried to do… May be LivePreview? Or did you want to let the user apply custom styles to it? Or did you extended SimpleButton and it didn’t work as expected?

  2. The easiest way to let someone use your component is to compile it to SWC. Then, the user has to save it to:
    […]\en\Configuration\Components <- the directory for components. Than, the user can create as many copies of the componen as he/she wishes. =)

I could but then the user/designer would not be able to change the Visual look of the component? It would be nice if the user only needed to change a few attributes and drop a movie with the look of the animated button, and it just works.

Sorry I dont know mattman?
Here’s a good tutorial on creating skins for components (it describes how you build component assets). So, your component will consist of the part the user can not modify and the part, the user can modify by simply replacing the graphics you used to create component’s appearence with his custom graphics.

  • Read anything that has to do with ComponentShim thoroughly =)

>> Sorry I dont know mattman?
Nevermind it than… he’s sort of… well… AS-guru in another Flash-community =)