Skip to main content
Annihil8ted
Participating Frequently
May 21, 2014
Question

Loading External Swf with Other Swf Dependencies

  • May 21, 2014
  • 2 replies
  • 1015 views

I'm trying to load an old project into a new project via swf. My old project had local external swf dependencies.In other words A.swf is the old project swf and it loads in B.swf and C.swf. I want to load A.swf into my new project. All the .swf file are local and will be loaded locally. Using the url and loader to load the old project's swf into the new project, I get an error that says that the stage must not be null. I have put A.swf, B.swf, and C.swf all within the same folder together in the new project. Is the correct approach? I'd like to know if this is even possible and if so how should I do it? Thanks in advance!

This topic has been closed for replies.

2 replies

Annihil8ted
Participating Frequently
June 2, 2014

Can someone please help me out?

Ned Murphy
Legend
May 21, 2014

If the A.swf file is attempting to target the stage and is doing so before it is completely loaded then there is a likelihood of getting a null stage error.

As far as having A.swf loading other swf's, that should not be a problem as long as you target the files appropriately.

Annihil8ted
Participating Frequently
May 21, 2014

Could you explain what target the stage means? Sorry I'm relatively new to AS3.

Ned Murphy
Legend
May 21, 2014

Targeting an object is the same for any object... if you add an event listener to a button you target the button...

btnName.addEventListener(etc...);

There might be code targeting the stage in the same manner, such as an event listener just like you might do for a button

stage.addEventListener(etc...);