BTW your component should appear in the Custom part of the component palette!
Main Topics
Browse All TopicsIn flex builder I am using the drag and drop design gui to lay out an mxml project.
I have a (different) actionscript project where I have made a a sprite-extending class called "shapes". It just draws a geometric pattern.
I want 'Shapes' to appear as a component which I can drag into the mxml project using the gui, just like I could drag and drop a button, slider, textarea or image.
How can I do this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: evcrPosted on 2008-12-05 at 21:55:18ID: 23110927
Two options:
Easy but non visible at design time:
1. Create a new actionscript class in your flex project
2. Put your as code in there
3. Drag your component onto the design area
Run the app to view it
Fiddly but viewable at design time:
1. Create a Flex *Library* project outside of your Flex project
2 Create a new actionscript class in the Libray project
3 Go to the Library properties Check the class you made in the classes tab
4 Build the Library Project, this should create a .swc file in the \bin folder of the Library project
5 Go to your main Flex Project Properties, add the .swc file to the Library Path
6. Drag your component onto the design area
Your shape should now be visible at runtime, basically Flex needs the SWC in order to render the component at design time.
You might need to resize it depending on your code.