Re: [Flashcoders] Conditional statement in [Embed(source=... tag
So, you could do something like this in an embed tag [Embed(source=Arial-Rounded-MT-Bold.ttf, fontFamily=ArialRoundedBold, fontWeight=bold, mimeType=application/x-font-truetype, unicodeRange=getCodeRange()] Will try it. Cheers for replying. Sidney de Koning wrote: Hi Jiri, Why do you want to do that conditional there? Cant you call a var? Then in your main entry class you set that var depending on the lang you get in. Idea? Or if you work with some sort of MVC ( Model View Controller ) architecture you could do that conditional in your Model and in your Emdbed tag just query MainModel.getUnicodeRange() which returns a string of all appropriate unicode chars. Let me know if this works, Sid On Apr 28, 2009, at 5:47 PM, Jiri wrote: Hello list, i was wondering if it is possible to set a conditional statement in the EMBED tag. I would like to set the unicode range based on an id. Here is the class i have now: package { import flash.display.Sprite; public class ArialRoundedBoldFont extends Sprite { [Embed(source=Arial-Rounded-MT-Bold.ttf, fontFamily=ArialRoundedBold, fontWeight=bold, mimeType=application/x-font-truetype, unicodeRange=U+0020-U+017E,U+20A0-U+20CF)] public static var font:Class; } } I would like to achive that the var unicodeRange=U+0020-U+017E,U+20A0-U+20CF is something like unicodeRange=((lang==id)? U+0020-U+017E,U+20A0-U+20CF : U+0020-U+017E) Is this possible, or do I need to write a pre parser, generating the .as file with the correct unicodeRange for a specific language. Then compile all the .as files for each individual country? Many thanks, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Sidney de Koning - be a geek, in rockstar style! Flash / AIR Developer @ www.funky-monkey.nl Technical Writer @ www.insideria.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Conditional statement in [Embed(source=... tag
Thanx, i will look into that. Jiri Ian Thomas wrote: It does accept conditionals, sort of, using the mxmlc -define tag. I blogged about it somewhere (hunts around). Aha! http://code.awenmedia.com/node/34 HTH, Ian On Tue, Apr 28, 2009 at 8:41 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: I don't believe you can do conditionals with [Embed] statements. Those are compile-time directives for the compiler, not runtime player logic like an if/else. If the compiler accepts conditionals of some sort, I am not aware of it and don't think it's documented anywhere. I could be wrong, but I doubt this is possible. Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Conditional statement in [Embed(source=... tag
Hello list, i was wondering if it is possible to set a conditional statement in the EMBED tag. I would like to set the unicode range based on an id. Here is the class i have now: package { import flash.display.Sprite; public class ArialRoundedBoldFont extends Sprite { [Embed(source=Arial-Rounded-MT-Bold.ttf, fontFamily=ArialRoundedBold, fontWeight=bold, mimeType=application/x-font-truetype, unicodeRange=U+0020-U+017E,U+20A0-U+20CF)] public static var font:Class; } } I would like to achive that the var unicodeRange=U+0020-U+017E,U+20A0-U+20CF is something like unicodeRange=((lang==id)? U+0020-U+017E,U+20A0-U+20CF : U+0020-U+017E) Is this possible, or do I need to write a pre parser, generating the .as file with the correct unicodeRange for a specific language. Then compile all the .as files for each individual country? Many thanks, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Conditional statement in [Embed(source=... tag
Hi Jiri, Why do you want to do that conditional there? Cant you call a var? Then in your main entry class you set that var depending on the lang you get in. Idea? Or if you work with some sort of MVC ( Model View Controller ) architecture you could do that conditional in your Model and in your Emdbed tag just query MainModel.getUnicodeRange() which returns a string of all appropriate unicode chars. Let me know if this works, Sid On Apr 28, 2009, at 5:47 PM, Jiri wrote: Hello list, i was wondering if it is possible to set a conditional statement in the EMBED tag. I would like to set the unicode range based on an id. Here is the class i have now: package { import flash.display.Sprite; public class ArialRoundedBoldFont extends Sprite { [Embed(source=Arial-Rounded-MT-Bold.ttf, fontFamily=ArialRoundedBold, fontWeight=bold, mimeType=application/x-font-truetype, unicodeRange=U+0020-U+017E,U +20A0-U+20CF)] public static var font:Class; } } I would like to achive that the var unicodeRange=U+0020-U+017E,U +20A0-U+20CF is something like unicodeRange=((lang==id)? U+0020-U+017E,U+20A0-U+20CF : U+0020-U +017E) Is this possible, or do I need to write a pre parser, generating the .as file with the correct unicodeRange for a specific language. Then compile all the .as files for each individual country? Many thanks, Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Sidney de Koning - be a geek, in rockstar style! Flash / AIR Developer @ www.funky-monkey.nl Technical Writer @ www.insideria.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Conditional statement in [Embed(source=... tag
I don't believe you can do conditionals with [Embed] statements. Those are compile-time directives for the compiler, not runtime player logic like an if/else. If the compiler accepts conditionals of some sort, I am not aware of it and don't think it's documented anywhere. I could be wrong, but I doubt this is possible. Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Conditional statement in [Embed(source=... tag
It does accept conditionals, sort of, using the mxmlc -define tag. I blogged about it somewhere (hunts around). Aha! http://code.awenmedia.com/node/34 HTH, Ian On Tue, Apr 28, 2009 at 8:41 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: I don't believe you can do conditionals with [Embed] statements. Those are compile-time directives for the compiler, not runtime player logic like an if/else. If the compiler accepts conditionals of some sort, I am not aware of it and don't think it's documented anywhere. I could be wrong, but I doubt this is possible. Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders