The source path where the assets are located needs to be in the list of
source paths for the Flex project.  You can add source paths in the project
properties.  When you Embed a asset, this asset needs to be in Flex source.
If you use say a Image tag, the source attribute there is a 'runtime' source
path.

If you are using CSS and set the CSS file to be 'compiled as SWF' so you can
load it at run time, there you may run into weird path issues on occasion.

Cheers!

Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


On Mon, Jun 1, 2009 at 4:25 PM, Justin Nichols <[email protected]>wrote:

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

Reply via email to