# Mxmlc -context-root and \[Embed(source="/data/img.jpg")\]

**URL:** <https://forum.kirupa.com/t/mxmlc-context-root-and-embed-source-data-img-jpg/242944>\
**Category:** Uncategorized\
**Created:** [October 31, 2007, 9:47pm UTC](https://forum.kirupa.com/t/mxmlc-context-root-and-embed-source-data-img-jpg/242944 "2007-10-31T21:47:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quhaha](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quhaha/32/3327_2.png) [@quhaha](https://forum.kirupa.com/u/quhaha)\
**Post date:** [October 31, 2007, 9:47pm UTC](https://forum.kirupa.com/t/mxmlc-context-root-and-embed-source-data-img-jpg/242944/1 "2007-10-31T21:47:47Z")

</div>

Hi.

I am using free Flex 2 SDK on Windows XP.  
It came with mxmlc.

Current project directory structure:

```auto

proj_root/
         src/
         data/

```

All .as files are in proj\_root/src/.  
All .jpg files are in proj\_root/data/.

In proj\_root/src/Main.as:

```auto
[Embed(source="/data/img.jpg")]

```

I compile it with a batch file:

```auto
 
    @echo off
    mxmlc src\Main.as -output main.swf -context-root "%~d0\%~p0"

```

%~d0%~p0 expands to absolute path of proj\_root (build.bat is in proj\_root).  
However, I get this error:  
Error: unable to resolve ‘/data/img.jpg’ for transcoding.

I can use relative path …/data/img.jpg or /…/data/img.jpg

Is there a way to use /data/img.jpg instead of above 2 versions of relative path?

Thank you.
