Using config constants it's sort of possible: (Publish Settings -> Flash
-> Actionscript 3.0 Settings -> Config Constants)
...
public class MyEmbed extends Sprite {
CONFIG::CONFIG_CONST
{
[Embed(source="foo.jpg")]
private var myClass:Class;
}
!CONFIG::CONFIG_CONST
{
[Embed(source="logo.gif")]
private var myClass:Class;
}
public function MyEmbed () {
...
The above piece of code works, although this would be more powerful
(real preprocessing):
[Embed(source=CONFIG::FOO_IMAGE)]
[EMAIL PROTECTED] wrote:
Hi
Does anyone know if its possible to somehow dynamically create the embed tag
when using FlashCS4 to publish FP10 content?
Instead of the following where the embed tag is hardcoded
//CODE START
package {
import flash.display.*;
public class MyEmbed extends Sprite {
[Embed(source="../images/foo.gif")]
private var myClass:Class;
public function MyEmbed () {
var displayObj:DisplayObject = new myClass();
addChild(displayObj);
}
}
}
//CODE END
[f] www.flickr.com/photos/bitstream
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a style."
- Bruce Mau,'LifeStyle'
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org