views:

26

answers:

2

Hi everyone,

I have a series of projects that we have been using Flex3/Flashbuilder to work with, but I've recently been trying to move over to Flashdevelop for most of my development but I have hit a snag with a certain project structure that Flex/FB can handle but FD/mxmlc can't with sdk 3.*

What I have is something like this:

project_root/

 /src

 /resources

The resources in flex is added as a class path to the project and I am embedding images like this: [Embed(source="/wardrobe.png")]

This all works fine in Flex/FB but FD I get there errors for all my images :

Error:unable to resolve '/wardrobe.png' for transcoding Error:unable to transcode /wardrobe.png

This problem don't occur when I'm using the Flex 4 sdk, but for these projects I require 3.2. If anyone has any idea of what these projects won't build and a way to make them work outside of Flex/FB that would be great.

A: 

try cleaning the project

i don't know where in flex builder but in eclipse it in Project>Clean

then build again the project..

Treby
Question is about working with FlashDevelop (that is without Eclipse) and has nothing to do with project cleanup.
Philippe
hey, i just stated an example. i am not saying that its the answer... and its a suggestion cause sometimes i get the same error as he does..remove the vote down.
Treby
A: 

Good news: there is a reason why the Flex 3 SDK does not resolve embeds in the entire classpath but only the class' one.

Bad news: it's a bug which is not going to be fixed in Flex 3 SDK (it's ok in Flex 4 SDK). As a matter of fact, both FlashBuilder and Maven Flexmojos use a workaround (they inject a custom "resource resolver" in the compiler).

Solution: The best you can do is to fix embed paths like: "/../resources/wardrobe.png" (the starting "/" makes the path relative to the class' classpath root).

Philippe