I believe it's because flex builder has a hard time embedding assets
via absolute paths (I've even had it error in this way using relative
paths if the path is not within the same compile-time hierarchy, but
would be during run-time). Basically the compiler cannot find the
file with the given path usually.
It's also a big issue when compiling via command line mxmlc (say via
ant scripts). You have to make sure the pathing is done just right
for the embeds not to cause a problem.
Try the following:
[Embed(source="assets/flash/MenuScreens.swf", symbol="SendToFriend")]
public class SendToFriendScreen extends AbstractScreen {...
If that doesn't work then try using "../" relative to where you are in
the structure. If you're like me and you put assets on the same
relative path as src, and let's assume that SendToFriendScreen.as is
in a subfolder off src called components, then your embed would look
like:
[Embed(source="../../assets/flash/MenuScreens.swf",
symbol="SendToFriend")]
If anyone with a more standard (and always-works) approach would like
to chime in about embeds, please feel free as I would love to learn
the better practices here. However, I've yet to see any real
consistency with flex builder and relative vs. absolute embedding.
Thanks,
Justin Nichols
[email protected]
On May 29, 2009, at 10:25 AM, John Waggener wrote:
I'm trying to embed an asset from an external swf, and I keep
getting 'Unable to transcode /assets/flash/MenuScreen.swf'
[Embed(source="/assets/flash/MenuScreens.swf", symbol="SendToFriend")]
public class SendToFriendScreen extends AbstractScreen {...
What could be the issue?
--
Johnny Waggener
Software Developer
Multicast Media
678-592-2650
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------