[flexcoders] Re: loading a swf file and dynamic symbols

2007-02-27 Thread Mark
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
 
 
 
 





Re: [flexcoders] Re: loading a swf file and dynamic symbols

2007-02-27 Thread Tom Chiverton
On Tuesday 27 Feb 2007, Mark wrote:
 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.

I think you want the URLLoader here then.

-- 
Tom Chiverton
Helping to autoschediastically transform enterprise-class environments
at http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



 Yahoo! Groups Sponsor ~-- 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/nhFolB/TM
~- 

--
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/