How do I use Embed with an environment variable in an Actionscript AIR project Flash Builder 4.7

I am using Flash Builder 4.7 to build an Actionscript AIR project.  The project embeds a number of png files from my local directory and I have been using absolute paths which all works fine.
I have a laptop with which I want to start developing the same project - I set up a git repository that both the laptop and main pc can pull from and so I can get the source where I need it and push it back to the central repository.
My problem is that the absolute paths for the embed commands don't work on the laptop as it has a different filesystem setup (Windows 8 with one drive as opposed to Windows 7 with a SSD and a data drive).  I thought the solution would be as easy as using an environment variable to specify the path which could then point to a different physical directory on both machines, i.e:
[Embed(source = "DEVELOPER_RESOURCES/graphics/are/here.png"]
I did a bit of research and there was quite a lot mentioned about setting up resource directories using path variables which I worked through but I just can't get it to compile.  The Actionscript compiler just won't find the png files however I specify the path.  I tried something with a FLEX project and the compiler didn't complain but I think this is because the compiler for FLEX uses a different convention.
[Embed(source ="/Project Name/DEVELOPER_RESOURCES/graphics/are/here.png"]  works with FLEX but not Actionscript.
So does anyone have a recipe for using the Embed command referencing assets using an environment variable that works across multiple machines with different file structures?

I managed to find a solution on Windows which was to use symlinks and absolute paths.  You an basically point one directory to another so I did something like:
mklink c:\developer_resources c:/the/local/path/to/my/resources
and then reference all resources as c:\developer_resources\...
Now as long as a developer machine has the right link (from c:\developer_resources to the place where the resources are kept) then it seems to work. 
This doesn't however work for Mac and certainly isn't a solution for passing files between Mac and windows

Similar Messages

  • How do I use a OS (Windows) Environment Variable in the source path of me ActionScript 3.0 settings

    I'm sure this can be done as I know we used something similiar at my old work place, below is an image showing what I am attempting to do.
    We used this to create more portable / shareable assets files which when symbols are linking to code, the code was very often in different directories on different machines.
    So we had set up environment variables in the OS to point to source directories and then used these variables in the source paths.
    As long as everyone had these variables set up then it would all work.
    Anyone know the correct way to do this in Flash CC
    Thanks in advance!
    Best Wishes
    Rhys Thomas

    sinious the problem with doing that is that the changed path gets into the code repository as well, so you wind up with everyone going back and forth changing it to their own value, which is a hassle. If you use relative paths and a standard project setup, then it all "just works" without a problem.
    For example, this is the setup I use:
    .dev
         .thisProject
              .Flash1
                   Flash1.as
                   .Flash1
                        Flash1.xfl
                   .view
                        .audioAssets
                        .customViews
              .SoundLib
                   SoundLib.xfl
              SoundLib.swc
         .bin <swfs are output here
              .xml
         .core
              .control
              .model
              .service
              .view
    We have a "base project" that you check out to start a new project (we do heaps of similar work), and the paths are already set up to be relative. Having each project point to its own copy of the core code allows for fine-grained control of which revision you're using--we've even pointed deliberately to old versions or branches on rare occasions.
    The bin folder is actually shared with the website repository, which is in a different directory from the Flash source code (in the website, it has a different name). This allows the generated swfs to be easily updated and ensures that the latest XML is being used both for development and on the site.
    The "thisProject" folder actually includes a Flash Builder workspace with all the standard shortcuts, etc., already set up. This is primarily because of how the "default path" works when you create a new Flash Pro project in FB. Because we output a level up from the workspace, we hack the .metadata folder every time, but that's a small change.

  • I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    try
    http://support.apple.com/kb/ht2589

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • How can I use Bluetooth with another devices?

    How can I use Bluetooth with another devices?

    You can set up your FaceTime account in Settings > FaceTime.

  • How do I use tether with droid ultra, keep getting message to call verizon. Do Verizon charge or have to somehow change my account?

    How do I use tether with droid ultra, keep getting message to call verizon. Do Verizon charge or have to somehow change my account?

    Verizon Wireless Customer Support wrote:
    Hi there JByrd,
    Let's take a closer look into this. What plan are you currently on? If you are on the More Everything plan, then you shouldn't have to do anything additional. If you are on the Nationwide plan it is an additional $20 a month for 2 GB of data. Let us know what plan you have. Thanks!
    ErinW_VZW
    Follow us on Twitter @VZWSupport
    Hey Erin how about you confirm to Elector and others that you HAVE to pay for tethering on Nationwide plans and that if you are using a 3rd tethering app to bypass paying you are violating the terms of service. They don't seem to believe me.

  • How can i use ipad with apple tv

    How can i use ipad with appletv

    Assuming both devices are on the same network and that AirPlay is not turned off on the Apple TV, then simply tap on the screen when you are watching content you wish to stream to your Apple TV, then tap the airplay icon that appears in the control bar, choose the Apple TV from the menu that appears.
    When displaying the content you wish to mirror on the iPad 2 (or better), iPad Mini, iPhone 4S (or better), double tap the home button (quickly) and swipe the bottom row of apps to the right to reveal the playback controls, tap the AirPlay icon and select your Apple TV from the list of available devices.

  • How do I use windows with my mac

    How do I use windows with my imac?  I need to know which program I need.

    use the built in boot camp or a program such as Parallels or VMware Fusion.

  • HT204053 how do i use icloud with mac os x 10.6.8?

    how do i use icloud with mac os x 10.6.8?

    how do i use icloud with mac os x 10.6.8?

  • How can I use TrueSequenceFactory with multiple sequences

    In the post "How to use existing Oracle sequences using KODO" answered
    by Marc Prud'hommeaux a "sample code" was given. But seems to me that
    example will only work with a single Oracle sequence for the entire
    system. Is this right?
    How can I use TrueSequenceFactory with primary-keys and their
    respective existing sequences? Can you (SolarMetric guys) provide me a
    sample code?

    The problem is that you are using application-identity. When you
    specify an objectid-class, we treat is automatically as application
    identity. To resolve this, I would recommend removing both the
    objectid-class and identity-type atributes from your class. With
    "objectid-class" in place, we asssume that you wil take care of identity.
    Eduardo Bobsin Machado wrote:
    I'm using Kodo 2.4.0, Oracle 9i, JBoss 3.0.4, the Kodo jars are in the
    JBoss' lib/ext.
    Well, I'll show what I have...
    This is the script of my table:
    CREATE TABLE LINEUP_VOYAGE (
    VOYAGEID NUMBER (10) NOT NULL,
    VESSEL_NAME VARCHAR2 (1000) NOT NULL,
    CONSTRAINT PK_LINEUP_VOYAGE
    PRIMARY KEY ( VOYAGEID ) ) ;
    This is an excerpt of my .jdo file:
    <class name="LineupVoyage" objectid-class="LineupVoyageId"
    identity-type="datastore">
    <extension vendor-name="kodo" key="table" value="LINEUP_VOYAGE"/>
    <extension vendor-name="kodo" key="sequence"
    value="LINEUP_VOYAGEID_SEQ"/>
    <extension vendor-name="kodo" key="pk-column" value="VOYAGEID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="vesselName">
    <extension vendor-name="kodo" key="data-column"
    value="VESSEL_NAME"/>
    </field>
    <!--field name="id" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="VOYAGEID"/>
    </field-->
    </class>
    As you can see, the "id" field is commented.
    And this is my class:
    package br.com.fertimport.entity;
    import java.util.*;
    public class LineupVoyage {
         private String vesselName;
    //     private long id;
    //     public LineupVoyage(long id) { this.id = id; }
    //     public long getId() { return id; }
    //     public void setId(long id) { this.id = id; }
         public String getVesselName() { return vesselName; }
         public void setVesselName (String vesselName) { this.vesselName =
    vesselName; }
    The "id" attribute is commented.
    Now the questions...
    To use ClassSequenceFactory must the identity-type of my entities be
    application or datastore?
    Is the "objectid-class" parameter required in this case?
    As you see, all references to the "id" property are commented. Can I
    use this property to represent my object id?
    If not, how can I identify my object with something like a long?
    The last question is related to my architecture: one VM with the EJBs
    (entity and session) and another VM with the web classes and JSPs,
    connected by a session facade. I don't want to use any Kodo or JDO stuff
    in the web tier. Is this possible?
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • FAQ: How do I use Revel with the Elements 12 Organizer (Mobile Albums)?

    FAQ: How do I use Revel with Photoshop Elements 12 Mobile Albums?
    Photoshop Elements lets you upload your media to Adobe® Revel and then access it from any device. Media already present in your Revel libraries is downloaded into Elements Organizer, so that you can work with it. Adobe Revel is an app that lets you store your media in the cloud and share it privately or publicly. See the links below for additional informtion about using Elements 11 and Premiere Elements 12 with Revel.
    If you check the option to make all your Elements photos and videos available in Mobile Albums, then Elements will move everything over to Mobile Albums, and upload it all to your Revel Library. Note that with mobile albums if you delete an image it will be deleted inElements and Revel.
    If you have some mobile albums that you only want in elements and you have already made them mobile albums, there is a way to move them back. You can drag and drop a mobile album onto a local category. Media in the mobile album is downloaded as it exists in Revel and stored locally. Subsequentally, the downloaded media is deleted from Revel. You can select one or more of the photos in the Elements Organizer and right click on one of them and select Remove From Revel at the bottom of the list. That will move them out of Revel, and keep them in the Elements Organizer.
    WHATS NEW:
    http://helpx.adobe.com/premiere-elements/using/whats-new.html
    http://helpx.adobe.com/photoshop-elements/using/whats-new.html
    PHOTOSHOP ELEMENTS 12:
    http://helpx.adobe.com/photoshop-elements/topics.html
    http://helpx.adobe.com/pdf/elements-organizer_reference.pdf
    http://tv.adobe.com/show/learn-photoshop-elements-12/
    http://tv.adobe.com/watch/learn-photoshop-elements-12/setting-up-your-mobile-albums/
    http://helpx.adobe.com/photoshop-elements/topics/getting-started-tutorials.html
    http://tv.adobe.com/show/learn-photoshop-elements-12/
    http://helpx.adobe.com/pdf/photoshop-elements_reference.pdf
    http://helpx.adobe.com/photoshop-elements/topics/getting-started-tutorials.html
    PREMIERE ELEMENTS 12:
    http://helpx.adobe.com/premiere-elements/topics.html
    http://helpx.adobe.com/premiere-elements/using/sharing-publish-share-panel.html
    http://tv.adobe.com/watch/learn-premiere-elements-12/sharing-albums-on-the-web/
    http://tv.adobe.com/watch/learn-premiere-elements-12/setting-up-your-mobile-albums/

    Also, bear in mind that few users of the full version of Photoshop are familiar with Photoshop Elements or Organizer, so many of us won't even know exactly what you mean.
    I have to get back on this, Just recently bought Elements and Premiere for Mac (actually more for fun and possible use for a minor workshop, not for my professional workflow) and only had a short glance at it.
    Just glanced at it again (still briefly) but there is a difference that you can't use in Bridge.  Organizer has some shortcuts to fix images and creates a new version of the original.
    This is not possible in Bridge. Also the Output Module in Bridge has a different approach to the create section in Organizer.
    For me Bridge is the right tool and I'm sure "tweetybird" will benefit also after having learned a bit.
    Especially the menu tools/Photoshop and the options in there will give better results (and far more control) to 'fix' ( I rather speak of optimize ) files to your satisfaction
    But If you still need options from the create section that you will not have in the Output Module there is no objection to use Organizer for this by pointing it to the folder with finished files.
    Its just a matter of the right tool for the right job

  • HT201407 i have a vodafone iphone5 - how can i use it with an O2 card? can I unlock?

    I have an iphone5 on a vodafone contract. How can i use it with an o2 sim and how can i unlock?

    Only the carrier to which the phone is locked to can unlock your phone, call your carrier and ask them if they will.

  • How can I use iCloud with Pages?

    How can I use iCloud with Pages?  Not offered as a Save option.

    You are stating you have MacOs 10.6.8 and iCloud isn't available with that system.

  • How can i use tethering with my iphone?

    how can i use tethering with my iphone?

    According to this document, T-Mobile in the Netherlands does not support Personal Hotspot, only Vodafone does, thus that setting will not appear for you.
    http://support.apple.com/kb/HT1937

  • How can we use Alert with Canvas

    Hello to all
    How can I use alert with Canvas .
    I want whenever user do mistake then a alert message should come.
    Thanks in advance
    Mukund

    And where is the problem? Sample code can be found all over the place... just look for it.

Maybe you are looking for