1 Reply Latest reply on Sep 16, 2007 4:02 PM by kglad

    Embed[] search path

      Hi, I have a few embedded assets:

      [Embed(source="button.png")] private var btnImg:Class;
      var b:Bitmap = new btnImg() as Bitmap;

      However, I can't seem to add something to the search path that the Embed tag uses to locate resources.

      There's the additional problem that my .as file is referenced from another file, e.g:

      project1\MyButton.as -- has the embed tag
      project2\client.as -- has a MyButton() control
      project2\skin\* -- is where Embed[] should look for assets, including those found in MyButton.as

      this is my command line:

      %SDKPATH%\bin\mxmlc.exe "%SRCFILE%" -compiler.source-path=%COMMON_CLASSES%

      Where SDKPATH is where the flex-2.0.1 SDK is, SRCFILE is the full path to 'client.as' and COMMON_CLASSES refers to the 'project1' directory. Ideally, I should be able to add another parameter: