Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3405064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:27:35+00:00 2026-05-18T05:27:35+00:00

Few facts first: 1. I can only use ActionScript 2. 2. All files are

  • 0

Few facts first:
1. I can only use ActionScript 2.
2. All files are within the same domain (i.e “http://www.example.com”).

I have a loader SWF which acts as a selection tool (“auto_magic.swf“) located at “/” in the website (the root folder).
A User selects the tool he needs (it’s a mechanical diagnostic system) and the main movie loads it (currently I use loadMovie() – suggest else if needed).
That tool is located at “/tools/[tools_name]/tool_main.swf“.

Now, the “tool_main.swf” is loading just fine.
The problem is that “tool_main.swf” needs to load other files located in its folder, so for example it tries to load “config.xml”, BUT Flash isn’t looking for “config.xml” in the tool’s dedicated folder – instead it’s looking for this file at the root folder “/” where “auto_magic.swf” is located, probably because the movie’s main swf is coming from there.

To make it even worst I cannot modify the tool’s SWF (“tool_main.swf”) because it’s coming from a third party.

Is there any solution? As far as I see this I need one of these solutions;
1. Be able to set the base url of the loaded swf.
2. *Change* the whole movie’s base url at run-time because it needs to load several tools from different folders.

Trying to solve this for several good hours. Help will be highly appriciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:27:35+00:00Added an answer on May 18, 2026 at 5:27 am

    relative paths are always relative to where the main swf exists. so as your load chain expands, ‘/’ always refers to the location of the Main.swf.

    in AS2, you can inspect a swfs _url property to determine its fully qualified url location, and determine its parent folder.

    In the AS2 child swf, you can use this:

    var myfolder = this._url.slice(0, this._url.lastIndexOf('/') + 1);
    

    and then use that to load in further assets relative to itself.

    hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.