views:

806

answers:

1

Hello, I red I can create "MXML components" and "AS3 components". The two methods use an existing component as their bases. The question: what if I can't extend any of the existing component (because I need something totally different)? Do I have to create the component from scratch using the (commercial) Flash authoring environment?

+1  A: 

what if I can't extend any of the existing component (because I need something totally different)?

You have the option of creating your own components. Enough documentation is available on Adobe's website. See:

*Custom Flex Components

*Custom Actionscript Components

Do I have to create the component from scratch using the (commercial) Flash authoring environment?

You don't need Flex Builder 3 to create AS3/MXML based components. You can do that in any editor. What you do need is the SDK, which is free, for compiling these.

dirkgently
1. I can't find what I'm looking for at the URLs suggested; 2. I was not talking about Flex Builder 3, but Flex in general. It seems there's no way to create any component very different from the built-in ones. Moreover, Flash CS3 comes with a command that lets you build Flex component.
Yes, you must extend either a Sprite or a UIComponent in order to create a visual element (since otherwise, it wouldn't be part of the display list). Your question is not clear.
dirkgently
Ok. Imagine the following component. It represents a bus stop: so, it has a name (textfield), a basis (button: on rollOver it shows a tooltip), a line. Since the component must be duplicated inside a container, the "line" must support 2 positions (vertical and inclined, and the text too). The text and the basis can change color. The line can be an external image too, so that it could represent another symbol too. The component MUST store the exact x and y position of where it was attached for the first time (because its position varies from a view to another). How could it be done with Flex?
For what you describe you most likely want to extend Canvas.
thenduks
What you describe is a complex component consisting of several small sub-components. You will need a container (like Canvas) to start off with and add the other sub-components (like the name, logo etc) to this container.
dirkgently
So patient, so much information, and no upmod... FTFY :)
inferis