0

After completing building a flex project in Flash Builder 4.5, the project was exported using the File -> Export Flash Builder Project.

After which some of the images stopped working (get the broken image icon). This has left me clueless and even search on the internet did not give me good answers...

oberfreak
  • 1,799
  • 13
  • 20
Vivian Lobo
  • 583
  • 10
  • 29

2 Answers2

1

I get the same problem time to time. Probably compiler / Flash Builder bug. But to be sure, you might want to check some basic things. First off: check that you have correct image urls. Secondly, ensure you are not using absolute source paths (e.g. C:\workspace\project\src\assets\images\image.png). Instead use relative path (i.e. assets\images\image.png).

If these are correct, check your build directory (default build directory for release builds in FB is bin-release) and see if the images are compiled there correctly. As I said, for some reason my FB does not always compile all the assets correctly, so sometimes I have to move them in manually. That is, you can simply drag and drop them from the source directory to the bin-release directory (although if you are using svn, you should be careful with this as it might copy also the svn metadata).

Other solutions you might want to try:

  • restart eclipse / FB (maybe it's simply out of memory)
  • delete the project from your workspace and import it again with no project information
  • change workspace and import the project there
Jukka Hämäläinen
  • 647
  • 1
  • 6
  • 17
1

I finally found the answer... made all the images bindable and just used the class to tag the images.

for example... instead of

 if (draggedImage.id == "Chris" )
 {
 newImage.source = "assets/Chris.png";
 }

changed it to

 if (draggedImage.id == "Chris" )
 {
 newImage.source = pic3_icon;
 }
Vivian Lobo
  • 583
  • 10
  • 29