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 464299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:15:41+00:00 2026-05-12T23:15:41+00:00

A website I’m working on (using AS2 because it’s oldschool) has a larger index

  • 0

A website I’m working on (using AS2 because it’s oldschool) has a larger index .swf file that loads sub-swfs using loadMovie("foo1.swf", placeToShowSwf). There’s foo1.swf through 4, which is silly because the only thing that’s different between them is a single number in the address of an xml file that tells it what content to load. So I want to reduce this to one file, with a simple function that the index file calls to load the xml file, as seen here.

function setFooNum(i:Number) {
   fooNum = i;
   //my_xml = new XML();  edit: this line has since been removed and is kept for historical purposes
   my_xml.load("foo"+fooNum+".xml");
};

However, for some reason, the xml file won’t load. It loads properly outside the function, but that doesn’t do me much good. It changes fooNum properly, but that doesn’t do me any good if the wrong xml file is already loading. As far as I can tell, the code behaves as though the my_xml.load("foo"+fooNum+".xml") isn’t there at all.

Is this some sort of security measure I don’t know about, and is there any way around it?

EDIT
As several people pointed out, the my_xml = new XML() line was the culprit. Unfortunately, I’m now getting a new and exciting error. When setFooNum(i) is called immediately after the loadMove() in the index file, a trace(fooNum) inside the setFooNum() function prints that fooNum is set correctly, but a trace(fooNum) inside the onLoad() (which returns a success despite loading apparently nothing, btw) shows that fooNum is undefined! Also, I made a button in the index swf that calls setFooNum(3) (for debugging purposes), which for some reason makes it work fine. So waiting a few seconds for the file to load seems to solve the problem, but that’s an incredibly ugly solution.

So how do I wait until everything is completely loaded before calling setFooNum()?

  • 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-12T23:15:41+00:00Added an answer on May 12, 2026 at 11:15 pm

    Perhaps you should double-check that you have proper authorization in crossdomain.xml. If your crossdomain file is jacked, none of your requests will go through.

    http://crossdomainxml.org/

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

Sidebar

Related Questions

My website structure has a root /index.php, some files as /directory/index.php and some as
My website has been giving me intermittent errors when trying to perform any Ajax
My website has an Atom feed and I want to make it easier to
My website has a large number of readers every day. I wanted to track
My website is in the root directory, which is /www.lebmotor.com/web/content/ . I am using
My website was recently attacked by, what seemed to me as, an innocent code:
Files: Website\Controls\map.ascx Website\App_Code\map.cs I'd like to create a strongly typed instance of map.ascx in
My website makes a lot of requests. I often need to cancel all current
The website works with Wemf and Google Analytics, but they are giving me very
A website of mine will host the usual images, javascript and CSS stylesheets in

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.