Hi Jason, are you trying to embed the images? I'm not sure, if a repeater can do that at all, since it is executed at runtime and not at compile time like the embed directive. Maybe you can load the images at runtime by binding their url to the source attribute of an image? Setting labels in a custom component works similar. Expose a public property of your component to set the value from outside and bind the label's text property to it internally.
Cheers, Ralf. On 1/9/07, jmerrill_2001 <[EMAIL PROTECTED]> wrote:
Newbie to Flex, (but not Flash/AS 2.0) so for me it's like a skier learning to snowboard. I have dabbled with Flex in the past, and recently went through all the lessons in the help docs, as well as read a lot of other things in there. I'm designing a "Team Page" - a site that shows people of the business unit as individual "cards" - like baseball cards. Each card will have elements like a photo of the person, a description of skillsets, and buttons to expand and change to a different state. Making that is easy with a custom component, but I'm having some struggle with the dynamic data part as it relates to the custom component - in other words, making the components generic and then settings the data for them later in my application. I thought I would make a generic "person card" with a placeholder for the photo and data - that would be a single component, and then in another main application MXML I would repeat that component over and over based on some XML data. Easy enough so far - the XML data isn't the problem. In Flex, I'm not sure how to add the image dynamically, or change the value of the image file reference for each component repeated - I can add an image tag easily enough in the component, but having a hard time not hard-coding the image reference. So I guess I have a few questions: 1. What's the best way to set up a generic image "container" for the image file be in the "person card" component and how would I set that in the main application MXML repeat region? Or is making the "person card" as a component not a good approach? Should I just describe the person card within the repeat region and not make it a custom component? 2. How do i set other variables in the custom components like label values? 3. Overall, what would be a good way to architect a site like this? I know how to create and change states, but unsure what should be a component and what should just described right in the main MXML. Thanks, Jason Merrill Bank of America Learning & Organizational Effectiveness Multimedia / eTools Team
-- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany