PDA

View Full Version : Flex containers


josnajoseph2007
07-10-2008, 10:03 AM
Hi,

I have a bit confusing question here..........
Can I have containers with different shapes, like curved and some other....Please help.................!:confused:

Stealth86
07-10-2008, 08:50 PM
Hi,

I have a bit confusing question here..........
Can I have containers with different shapes, like curved and some other....Please help.................!:confused:

When you say containers, are you referring to things like VBoxes & HBoxes?

josnajoseph2007
07-11-2008, 04:44 AM
yeah.It could be any container..canvas,vbox, panel etc.

fathwad
07-11-2008, 08:15 PM
For different shaped containers, you probably need a custom component. A good guide for this can be found here:

Part 1 (http://weblogs.macromedia.com/pent/archives/2007/10/component_class.html)
Part 2 (http://weblogs.macromedia.com/pent/archives/2007/10/component_class_1.html)
Part 3 (http://weblogs.macromedia.com/pent/archives/2007/10/component_class_2.html)
Part 4 (http://weblogs.macromedia.com/pent/archives/2007/10/component_class_3.html)
Part 5 (http://weblogs.macromedia.com/pent/archives/2007/12/component_class_4.html)

mojito
07-12-2008, 11:08 AM
This series is a great example of the blurred lines between flex and flash. It is a good article but demonstrates the confusion I have. I still don't know what flex is good for. In the first example we have a flex component system using components created in mxml, and then he goes on to do it in action script.

So why use flex then ? If we use import mx...things then are we using the flex framework ? And is there a list of all the components available in the flex framework somewhere, until I know what is available then im blind a bit. I know the standard components that flash has had for ages. What doesn flex bring ?

fathwad
07-13-2008, 01:09 AM
mojito: MXML files and AS files are the same when compiled. In fact, MXML is converted first to AS before being compiled. The advantage of working with MXML over AS is that its format provides a clear visual outline of what you will see on the screen. On the other hand, working in AS provides a very familiar environment to non-Flash coders. Some useful things you can do in AS that can't be achieved (by any reasonable means) in MXML: (By no means is this a comprehensive list)

Pass constructor parameters
Static classes
Interfaces
Programmtic skins
Non-component classes

josnajoseph2007
07-15-2008, 06:12 AM
Hi,
Wold like to know in detail...........
What I am supposed to is:
I have an appllicationControlBar(outside container),Inside that I have another container which should contain 3 Analog Clocks,Also the inside container should have curved shape which inturn goes with the shape of the clock.Like car speedometer shape(curved shape) I need for the inside container.
I am attaching a sample sketch and accordingly I need to design;

28134

mojito
07-15-2008, 07:04 AM
I'd say use a Hbox for the centre things , but have a custom class for the dials, or clocks, which have their own clock class for each clock.
Or do the lot in as 3 pure flash, I dont see any advantages to using flex for this.

It just isnt custom enough, consider my trials with tileList, I started to use it its nice but to achieve the level of customisation I want I should have created a grid class myself.

josnajoseph2007
07-15-2008, 07:57 AM
Yeah, I have separate class for Analog Clock with circular shape.
The problem is with the inside container.Can I have curved surfaces for HBOx like the clock surface. If so please give a small implementation for HBox shape