We help IT Professionals succeed at work.
Get Started

problem loading external swf and errors, urgent please

1,634 Views
Last Modified: 2013-11-12
first of all, many thanks to every one who is helping people around :)

The files:
http://www.4shared.com/file/90577186/11f7a94e/FLAs.html

in the link below a sample of the FLAs i am working on.
i faced some errors and overlapping objects

what is in the link:
- it is rar file, i convert it to txt, please re-change it to rar file extension.
- inside: main: main fla, it loads other SWFs
- loaded SWFs:  , section1, section5, sec1. these SWFs are from section 1 to section6 as well sec1 to sec6. but i included three to make the size smaller, please duplicate them if needed.
- two folders that contain AS3 classes.

the problems:
1- if you test the main.swf, and from the main menu you clicked any sub button, lets say section5, the following error appears:

ReferenceError: Error #1065: Variable event is not defined.
      at main_fla::MainTimeline/loadSection()
      at section1_fla::MainTimeline/frame47()

2- if you test any section alone with out main.swf, the following error appears:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at section1_fla::MainTimeline/frame47()

3- there is a button in the bottom left "Canada", it tells the time line to play to go to "Canada" section, as well as USA button to play the main time line and go back to frame 15, which is the USA section again.

in frame 20, i removed the current loaded swf, so i can place a new swf for Canada section:
container.removeChild(containerLoader);

is it the right way, according to the ram issue?

4- if you are in Canada section, main.swf will load the sec1.swf as default file. please click any sub section from the menu, lets say sec2. sec1 goes off the stage and there is nothing happens after that. the main.swf must loads the swf related to to the button, sec2.

if you click sec3, it will load sec1 again, this happens to every button.

5- go back to USA: when the user click the USA button to go back, the play head plays until frame 30 to remove current loaded swf and load the default swf for USA, but there is over lapping.:
container.removeChild(containerLoader2);
container.addChild(containerLoader);

please press Canada and USA in this order:
Canada - USA - Canada ... and so on
you will notice overlapping SWFs

Thanks for your time reading this thread.
Comment
Watch Question
Top Expert 2009
Commented:
This problem has been solved!
Unlock 1 Answer and 18 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE