I didn't think of that (that it's a compile-time operation), thanks for pointing that out, it makes sense now why it wouldn't be working.
So then let me ask this, is there another way to get to that symbol without embedding the SWF? The example you give, although I'm sure will work for me, still embeds it all up front (right?). I was hoping to display that symbol on the fly only because we're talking about close to 30 separate symbols, and that could grow as time goes on. Also right now I'm just trying to see how I can get the images (symbols) to display dynamically so I'm not tied to anything other than that Array. The Array holds country identification id's (US = United States, CA=Canada, etc.). This Array is created from a series of country ID's tied to the current Item they're looking at (it could be 1 to 30 countries). Each symbol is named for the specific ID. What I'm getting at is at this point I'm looking for the best way to display that corresponding symbol with the ID so when the user sees the country, they'll also see a little image of the country. Thanks, Mark --- In flexcoders@yahoogroups.com, "Ciarán" <[EMAIL PROTECTED]> wrote: > > Hi, > > Embedding is a compile-time operation, so you need to embed your > symbols initially, then reference them later. > > You might try embedding all the symbols as separate assets within your > flex app, i.e. > > [Embed(source='imageSwf.swf;,symbol='symbolName')] > public var symbolName:Class; > > You can of course group these into a class of their own, i.e. > > public class Images > { > [Embed(source='imageSwf.swf;,symbol='symbolNameA')] > public static var symbolNameA:Class; > > [Embed(source='imageSwf.swf;,symbol='symbolNameB')] > public static var symbolNameB:Class; > } > > ... then reference with Images.symbolNameX; > > Get the dataProvider in your repeater component to reference using > that mechanism and it should work. If there's some special reason why > you're using text to reference the image, you can always create > another object type, with both name and class variables, then use > whichever is applicable to render the correct image. > > Best Regards, > Ciarán > > > On 2/27/07, Mark <[EMAIL PROTECTED]> wrote: > > I have a swf file with a number of symbols that I'd like to display dynamically. I have a > > repeater with an Image component. The repeater is binded to an Array of text that mimics > > the symbol names in my SWF. This Array is dynamically populated with the symbol binded to > > the currentItem of the repeater (which doesn't work). I can't seem to display the swf this way, > > is there a way to do this? > > > > > > > > <mx:Repeater id="rp" dataProvider={arrayImage} > > > <mx:Image source="@Embed(source="imageSwf.swf", symbol= {rp.currentImage})" /> > > </mx:Repeater> > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > >