Flex 2's default layout management is flat, just x and y coordinates. With layout="horizontal" when you add a child it is laid out to the right (at a greater x coordinate). With layout="vertical" when you add a child it is laid out below (at a greater y coordinate).
If I understand your question correctly, you would like to layer the text above the video. Design environments often refer to this as a z-index or z-order. Essentially a 3rd coordinate. In Flex this requires you using a container specifying layout="absolute". When layout="absolute", the last child added to the display list is on top.
In your case I think this will mean adding both the VideoDisplay and a Label or TextArea to a container providing layout="absolute". You can then set the x and y coordinates of the text control overlapping the coordinates of the VideoDisplay. Since the last child added to the display list is on top, you would first add the VideoDisplay with your text control added last.
Following are some notes from the training course:
Flex 2: Programming the Visual Experience
-- - - - - -
Layering content using absolute layout
Three Flex layout containers allow the use of absolute positioning:
- Application container with the layout property set to absolute.
- Panel container with the layout property set to absolute.
- Canvas container only allows absolute positioning.
If you have overlapping child components, the component MXML tag that is lower in the code will appear on top of the components whose tags are higher in the code.
-- - - - - -
Please post back if this helps.
g
On 9/22/06, kristian_wright2002 <[EMAIL PROTECTED]> wrote:
I have an FLV video which I can play using the VideoDisplay component.
I want to be able to interlace some text across this video when
playing it (but not have it recorded on the video itself, so I can
change it when required).
I can't seem to see how this is done. Adding the text as a child of
the VideoDisplay fails, as it's trying to add a DisplayObject, and not
a string.
This leads me to think that I'll have to create the text as a
DisplayObject, but I'm not sure how...
Any suggestions on how to achieve this?
Cheers,
K.
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Software development tool | Software development | Software development services |
| Home design software | Software development company |
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___

