Getting my application domain

Been searching all morning trying to find a example of the ApplicationDomain funciton in Flash AS3. So far none have given me the desired result. I am trying to retrieve the domain my swf is running in only. I need to set variables (STRINGS) according to the domain address. Since Flash shows the actual url + the swf this is almost what I want. I have a html page that launchs at a address... http://.... myDomain.html. In there I have a link to a swf that is located in the folder mySWF. Because the html page is linked to the root location when I pass in the path to my data folder ... the return is http://....myDomain/mySWF/data.
I've been studing up on the Funciton ApplicationDomain. But I can't figure how to extract my location url of where the swf is running. Can anyone direct me to an example?
If not able, I could search the url string and remove the app.swf from the path, but there must be an easier way.
THANKS

GREAT ANSWERS... this helped allot. Now I can easly append the path to the various folders I use for video, data, etc.
kglad here is a modified code based on your answer.
var s:String=this.loaderInfo.url
var myFolder:String = s.substring(0,s.lastIndexOf("/")) + "/subFolder/";
trace(myFolder);
kennethkawamoto2 here is a modified code based on your answer.
(myFolder is defined above)
var path:String = this.loaderInfo.url.substr(0, loaderInfo.url.lastIndexOf("/") + 1);
myFolder = path + "subFolder/";
trace(myFolder);
The difference in the two are one returns the string without the "/" at the end and the other returns the "/" at the end. I was only able to answer one correct response and I'm sorry I could not answer both of them.
Here is what I came up with on the replace function: _Global is a AS file I have defined. But I like your answers better and will use them.
_Global.pathLink = this.loaderInfo.url;
_Global.pathLink = _Global.pathLink.replace("/test.swf", "/");
trace("Path = ", _Global.pathLink);
THANK YOU BOTH for helping out of this jam.

Similar Messages

  • How to get the Application name/fullpath in a servlet deployed in WebLogic

    Hi ,
    Just like we can get the domain root directory from weblogic.management.DomainDir
    String root = DomainDir.getRootDir() ;and domain name from weblogic.management.configuration.DomainMBean
    DomainMBean domainMBean = MBeanUtils.getDomainMBean();
    String domainName = domainMBean.getName() ;How can i get , the application name in which the servlet is deployed from inside the same servlet ? Which API from weblogic provides that information ?
    for eg : application path = Middleware/user_projects/domains/Domain_1/servers/AdminServer/upload/webapp1.war
    and application name = webapp1.war
    Edited by: Tom on Mar 31, 2011 9:32 PM

    Not sure about Weblogic Specific API however you can use Java API.
    public void init(ServletConfig config) throws ServletException {
              // TODO Auto-generated method stub
              System.out.println(config.getServletContext().getRealPath(""));
              System.out.println(config.getServletContext().getContextPath());
    output:
    C:\Documents and Settings\user\KEDB\KEDBRISKIT\WebContent --- Application Path
    /KEDBRISKIT --- Application Name
    -Akshay

  • IOS AIR3.6  runtime error 3747 Multiple application domains are not supported on this operating syst

    3747
    Multiple application domains are not supported on this operating system.
    I'm getting this error from an IOS app compiled with air 3.6.
    No code has changed  from Air 3.5 which is error free. Web app / android versions of the same codebase do not error.
    See the stackTrace below ( well done Adobe for providing this since air 3.5 !! )
    I use swfloaders for loading embedded swf vector art graphics. This has not caused any issue until now. Should I load all art into the main app's application domain ?
    The error does not crash the app and I could suppress it easily but is could the tip of the iceberg because application domains are scary stuff.
    Error: Error #3747
            at flash.display::Loader/loadBytes()
            at mx.core::MovieClipLoaderAsset()
            at mx.controls::SWFLoader/loadContent()
            at mx.controls::SWFLoader/load()
            at mx.controls::SWFLoader/initializeHandler()
            at flash.events::EventDispatcher/dispatchEvent()
            at mx.core::UIComponent/dispatchEvent()
            at mx.core::UIComponent/set processedDescriptors()
            at mx.core::UIComponent/initialize()
            at com.komodomath.app::ImageSWFloader/initialize()
            at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
            at mx.core::UIComponent/addChildAt()
            at spark.components::Group/addDisplayObjectToDisplayList()
            at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()
            at spark.components::Group/setMXMLContent()
            at spark.components::Group/set mxmlContent()
            at spark.components::SkinnableContainer/set mxmlContent()
            at spark.components::SkinnableContainer/createDeferredContent()
            at spark.components::SkinnableContainer/createContentIfNeeded()
            at spark.components::SkinnableContainer/createChildren()
            at mx.core::UIComponent/initialize()
            at com.komodomath.lesson::SaveStatusCheck/initialize()
            at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
            at mx.core::UIComponent/addChildAt()
            at spark.components::Group/addDisplayObjectToDisplayList()
            at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()
            at spark.components::Group/addElementAt()
            at mx.states::AddItems/addItemsToContentHolder()
            at mx.states::AddItems/apply()
            at mx.core::UIComponent/applyState()
            at mx.core::UIComponent/commitCurrentState()
            at mx.core::UIComponent/setCurrentState()
            at mx.core::UIComponent/set currentState()
            at com.komodomath.maingroups::LessonGroup/handleNewLessonClick()
            at com.komodomath.maingroups::LessonGroup/___LessonGroup_KButton1_click_lessonOver()

    same issue as http://forums.adobe.com/message/4736711

  • Multiple Application Domain Error with Preloader

    Hi all,
    I'm attempting to upgrade to Air 3.6. My app runs as a swf on the web and also meant to be packaged as a "slow" build (not interpreter) for iOS since I need the performance of Starling. Since it's a fat app, so thus it has a preloader for the web, which works perfectly. However when I try to start the app in ios-debug on my iPad, I get:
    [Fault] exception, information=Error: Error #3747: Multiple application domains are not supported on this operating system.
    mPreloader = new PreloaderSwfEmbed();
    mPreloaderLoader = Loader(mPreloader.getChildAt(0));        // need to wait until the swf loads before grabbing all the information from it
    mPreloaderLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, EmbeddedPreloaderLoadCompleteCB);
    On the first line of my code snippet here. How can I insert permission regarding multiple application domains for embedded swfs?
    Thanks!
      ZS

    Ok so I got the swf to load by changing the code above to the following:
              var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
                   context.allowCodeImport = true;
                   mPreloaderLoader = new Loader();
                   mPreloaderLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, EmbeddedPreloaderLoadCompleteCB);
                   mPreloaderLoader.loadBytes(new PreloaderSwfEmbed(), context);
    But now when I run the app I get a message dialog on the iPad saying:
    Uncompiled ActionScript
    Your application is attempting to run uncompiled ActionScript, probably due to the use of an embedded SWF. This is unsupposed on iOS. See the Adobe Developer Connection website for more info.
    And yes I am using Adobe Air SDK 3.6, and building with -swf-version=19, at least on the main swf. The other swf was made with an fla with Flash Pro.
    Any help people? Why is this still not working? I thought it was fixed in 3.6. I must be missing something.
    Thanks!

  • Multiple application domain error with ANEs

    I'm building a mobile app that loads external SWFs, and it works fine when I include the current application domain in the loader context for the Loaders.
    However, as soon as I include some native extensions I need to use for the app, I start getting this familiar error:
         Error #3747: Multiple application domains are not supported on this operating system.
    I've tried switching to the parentDomain, grabbing the application domain from the parent's loaderInfo... no dice.
    Anybody know a workaround for this?
    I really need to load the SWFs and I really need the ANEs...

    Well, in case anyone else runs into this issue, here's what I did that fixed it...
    I just deleted the <extensions> node from the application descriptor XML and re-published. I have no idea why that fixed it (since Flash Builder repopulates that node when you include ANEs in your build packaging). But it did.

  • Application Domain error

    While trying to invoke a web service the following error is encountered. "Your
    application domain is not configured for weblogic integration which is required
    to run a JPD file. Please select an integration domain to run your JPD file. You
    can use tools-Applications properties menu to set the domain for your application."
    Any help on getting beyond this issue would be greatly appreciated.

    James,
    The error states that the domain which you are connected to currently does
    not support Integration. In Workshop each application connects to a single
    server. This can be changed by viewing the WebLogic Server entries under the
    applications properties tab.
    Tools -> Application properties - WebLogic Server
    Can you choose an intergration server from entries listed ?
    By default the list contains the various sample servers shipped with the
    product.
    You can create a new integration domain by running the configuration wizard
    and then connect to that domain too.
    Hope this helps.
    Regards,
    Raj Alagumalai
    Backline Workshop Support
    "James Stamp" <[email protected]> wrote in message
    news:3f7a144d$[email protected]..
    >
    While trying to invoke a web service the following error is encountered."Your
    application domain is not configured for weblogic integration which isrequired
    to run a JPD file. Please select an integration domain to run your JPDfile. You
    can use tools-Applications properties menu to set the domain for yourapplication."
    Any help on getting beyond this issue would be greatly appreciated.

  • I have installed Adobe packages and cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?

    I have installed Adobe Creative Cloud for teams CC Packages which says that Acrobat XI Pro is installed. Your support page says it does not install Acrobat and I have to look in the Extensions folder for an MSI file.  I have run a number of searches and  cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?
    Also I now administer the teams and have accepted the invitation to I received to be a team member and download the apps.  The admin page shows that I have been sent an invitation but does not show my account as "ACtive" unlike my other team members.  I tried to use the link in the invite to accept it become active but the link displayed an error saying I had already accepted the invite... why is no account not active?
    Finally what other product downloads in Creative Cloud do not actually download as part of the Creative cloud Packager for downloading the apps? e.g. acrobat and what else?

    My apologies Eadeszoo I believe our support agents are unavailable on January 1.
    Are you able to copy the contents of the DVD to your computer?  Are you receiving any particular error messages when you are trying to install?  Finally which operating system are you using?

  • How to get SAP application language only with SQL code

    Hi all,
      is there a way to get the current language only whith a sql query on the Database?
    I know that Ican find that information from the Application object of the UI Api but in this case i can't access them.
    Thanks in advance, Luca.

    Hello
    You cannot get the Application language (GUI Language) from SQL, because it is stored on the client machine filesystem
    Location is defined in
    C:\Program Files\SAP\SAP Business One\Conf\b1-config-path.txt text file, which by defaulf is:
    %USERPROFILE%\Local Settings\Application Data\SAP\SAP Business One\b1-current-user.xml file
    Regards
    J.

  • Not able to get the Application ID value in ADF Phase listener for Custom ADF application which integrates with Ebiz R12.2.3

    Hi All ,
    I am working on one custom Order Mangement ADF Application which integrates with EBiz R12.2.3.
    We are trying to get the Ebiz userid ,username,Responsibility ID and Application ID in ADF through below Code
           public HashMap checkEBSSession(HttpServletRequest request,
                                       HttpServletResponse response) {
            System.out.println("In AMImpl.. checkEBSSession1");
            Session session = null;
            HashMap hmap = new HashMap();
            try {
                Connection conn =
                    getDBTransaction().createStatement(1).getConnection();
                System.out.println("In AMImpl.. checkEBSSession2");
                EBiz ebiz =
                    new EBiz(conn, "012E7E82CD8852BBE053860F6E0AD63413191049361744553610276495342217");
                System.out.println("In AMImpl.. checkEBSSession3");
                AppsRequestWrapper wrapper =
                    new AppsRequestWrapper(request, response, conn, ebiz);
                System.out.println("In AMImpl.. checkEBSSession4");
                session = wrapper.getAppsSession(true);
                System.out.println("In AMImpl.. checkEBSSession5");
                Map columns = session.getInfo();
                System.out.println("In AMImpl.. checkEBSSession6");
                String respId = (String)columns.get("RESPONSIBILITY_ID");
                String currentUserId = (String)columns.get("USER_ID");
                String currentApplId = (String)columns.get("APPLICATION_ID");
                String currentOrgId = (String)columns.get("ORG_ID");
                System.out.println("In AMImpl.. checkEBSSession7...respId : "+respId);
                System.out.println("In AMImpl.. checkEBSSession8...UserId : "+currentUserId);
                System.out.println("In AMImpl.. checkEBSSession9...APPL_SERVER_ID : "+currentApplId);
                System.out.println("In AMImpl.. checkEBSSession10..OrgId : "+currentOrgId);
                logger.info("respid:  " + respId);
                //System.out.println("In AMImpl.. checkEBSSession8");
                hmap.put("RESPONSIBILITY_ID",respId);
                //System.out.println("In AMImpl.. checkEBSSession9");
            } catch (Exception e) {
                System.out.println("Error: " + e.getMessage());
            return hmap;
    By using this code I am Getting all the Information Except the Application ID.
    If someone  have any idea how to get the application ID please share it .
    Thanks in Advance !!
    Thanks & Regards
    Apurv Agarwal

    Hi,
    since you implements the backing bean from PagePhaseListener. some where the same view is excuting before getting the selected record. Even if you select the record after excuteQuery() it will set the first record as selected. Please try to check some where query is excuting.
    try give some more details like what are all the methods you are using in PagePhaseListener and where you worte u r coding.
    Reg,
    Brahma

  • Itunes wont open, I get "itunes application could not be opened. An unknown error occurred (-50)"

    I'm on Windows 7 - using itunes daily without problems and suddenly itunes wont open, I get "itunes application could not be opened. An unknown error occurred (-50)"  The only thing I can think is I think there was a download in progress when I shut down the computer.
    I tried uninstalling and reinstalled, but I get the same thing. I tried clearing the itunes folder and reinstalling, same thing. help!

    Doublechecking. When you did the complete uninstall, were you using the following document as a guide?
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    (If damaged program files are involved here, a standard install might not remove them, and a reinstall might not then replace them. So the Verify iTunes and related components are completely uninstalled section is an important step.)

  • How to get web application to use Tuscany without conflicting with SAP SDO

    Hi,
    We are attempting to run a web application on SAP NetWeaver CE 7.1 SP1 which uses Tuscany SDO.  As it now stands We must use Tuscany because the web application will not run with the SAP SDO implementation provided by Netweaver. To ensure that Tuscany is loaded with priority, we have packaged the Tuscany JAR files and their dependencies as a heavy resource, as described here:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60642a88-95fe-2b10-d387-a245d48fc257?overridelayout=true
    The final check showed that Tuscany was correctly deployed as a heavy resource and included the following JAR files:
    common-2.2.3.jar
    ecore-2.2.3.jar
    ecore-change-2.2.3.jar
    ecore-xmi-2.2.3.jar
    tuscany-sdo-impl-1.1.1.jar
    tuscany-sdo-lib-1.1.1.jar
    tuscany-sdo-tools-1.1.1.jar
    xsd-2.2.3.jar
    We also verified that the web application using Tuscany has a hard reference to the Tuscany heavy resource.
    However, when we try to run the web application, the following error is logged:  java.lang.LinkageError: Class commonj/sdo/DataGraph violates loader constraints
    The issue is definitely due to some kind of classloading conflict with the SAP SDO library, as the application runs normally when SAP SDO is manually removed from the classpath. Doing this on a production system is unfortunately not an option, though.
    So the question is: how to get web application to use Tuscany without conflicting with SAP SDO?

    I took a look at the "printerReady" example.  Looks like I may be able to use the InetPing (...) function to ping through a range of IP addresses looking for a response.
    Any ideas on how to find the MAC address associated with the IP addresses that respond?
    We may have multiple units responding and the MAC address will allow the operator to determing which unit to connect to.
    I'll try the InetPing to see how it works,
    Kirk

  • I have an ipod touch 2 and rebuilt my laptop.  Reinstalled ITUNES and can't find my applications on ITunes after login.  I tried to activate Itunes again but it didn't.  How can I get my applications to display on ITUNEs?

    I have an Ipod Touch 2 and rebuilt my laptop.  Reinstalled ITUNES and can't find my applications on ITunes after login.  I tried to activate Itunes again but it didn't.  How can I get my applications to display on ITUNEs?

    It sounds like you essentially have a new computer and unless you restored from a backup your iTunes library would be empty.  You can transfer your iTunes purchases from your iPod to the computer by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    SInce you changed syncing computers. after you move the stuff you need to restore the iPod to factory defaults and sync the stuff back to your iPod.  If you had the iPod backup file you could restore from backup.
    If you have non-iTunes pruchases you can copy them to your computer by using one of the third-party programs discussed in this previous discussion:
    Best iPod to PC

  • Can't seem to get my own domain name to work

    First of all I'm sure this has been asked a lot so apologies if it's a repetitive post I'm just at the hair pulling stage!
    Well. I've had no issues joining mobile me (joined a week ago) and publishing my site from iWeb.
    But then I wanted to get my own domain name.
    (i got it from 123-reg.co.uk just in case that is is anyway significant.)
    This is where my question becomes a bit "Balloon" shaped.
    When setting my CName on 123-reg I was asked to enter info into two boxes. (That seemed to tally with the help files I have read.)
    I entered web.me.com into the first box and my domain name into the second. I'll just call it for now www.mywebsite.co.uk
    Then it asked me to enter my website IP which I located by using one of those pages you can type a domain into and it searches...
    Sorry if this is dumb but does that sound about right?
    Some questions-
    -Is it correct to put www.mywebsite.co.uk as well as web.me.com or should it be something else?
    -Would there be any mobile-me issues while I'm still on the free trial?
    -Are some domain name providers incompatible with mobile-me?
    -And if I change the CName with the registrar should I delete and reconfigure myown domain in my mobile me-account?
    If anyone could enlighten me they would basically be my new hero!
    Thanks.

    Oh one more thing..
    When asked for the IP of your website does that mean the IP of your own website or the host (being Mobileme of course? i.e. the IP of www.web.me.com/mywebsitetemporaryname or me.com?

  • TS1368 Have downloaded the latest version of ITunes and now i get "Incompatable Application" I tunes will no longer open. have worked my way through FAQ and help to no avail. What am i doing wrong? currently running windows 7.

    Have downloaded the latest version of ITunes and now i get "Incompatable Application" I tunes will no longer open. have worked my way through FAQ and help to no avail. What am i doing wrong? currently running windows 7.

    Have downloaded the latest version of ITunes and now i get "Incompatable Application" I tunes will no longer open. have worked my way through FAQ and help to no avail. What am i doing wrong? currently running windows 7.

  • I can't get my applications to open to full screen. The apps are opening at about 75% and I cant figure out how to get them to open to the full screen.

    I cant get my applications to open to full screen. The apps are opening up to about 75% and i cant get them to extend to full screen.

    Which applications are you talking about? 
    Example: Browser application - At the bottom right corner of a browser window you will see a small square with 3 diagnal lines.  Place your cursor in that corner to stretch out your window to full screen.  The next time you open your browser app, the window will be full screen.

Maybe you are looking for

  • How can I determine how many events are in my calendars?

    The web version of my iCloud Calendar and subsequently also my Calendar.app did show recently various malfunctions and error messages that were inconsistant. Also, Calendar.app crashed when I was editing events. Finally, Calendar.app did complain tha

  • Reports 6.0 not executing thru Menu

    Hi Everybody, Problem in executing Report through menu. Software used: Windows NT / 98, Oracle 8.1.6, Developer 6.0 Following is the PL/SQL code in Menu to call reports: DECLARE pl_id ParamList; pl_name VARCHAR2(10) := 'tempdata'; ind number := 0; BE

  • How do i create permanent javascripts that do not have to be run using the javascript console

    I have written a code that adds footers to the bottom of an adobe pdf and i have been running that code from the adobe console.  I would like to create a permanent script that can be called from the edit tab and will ask for two user inputs and run w

  • Web Page Composer

    Hi, I am working in EP NW04s SP 14. I am using web page composer for designing a web page. I have followed all the steps and finally assigned the web page in the navigation structure to both the anonymous user and the logged in user. I am able to vie

  • Issues with Sequence Generator

    I'm having trouble with Sequence generator not generating continuous numbers starting from 1, each time I run the mapping. I want the Sequence to start from 1, each time the mapping is run. For this to happen, I'm using a pre-mapping operator which u