Skip to main content
Participant
May 3, 2019
Answered

Loading animation from external swf

  • May 3, 2019
  • 2 replies
  • 646 views

Hello,

I'm doing a school project and I want to load an external swf with an frame by frame animation inside of it and then load it into a loader within a movieclip. I get no error messages when I test the code but the animation doesn't show up. It's just a black screen. I'm using the newest version of Animate and I'm on a Windows 10.

This is the code I use for calling the URL:

var tieURL:URLRequest = new URLRequest ("externalkillingme.swf");

var tieLoader:Loader= new Loader();

tieLoader.load(tieURL);

loader_mc.addChild(tieLoader);

Am I missing something?

Thank you.

This topic has been closed for replies.
Correct answer kdmemory

Hi

The code looks fine.

Is everything alright with the external file "externalkillingme.swf" ? Not that it is an AVM1 swf and your host swf is AVM2?

(Read more ...)

Is "externalkillingme.swf" really located in the same folder as your host swf?

Is everything okay with your loader_mc ? Not that it is set to invisible or something.

Is your loader_mc an empty movieclip with the registration point set to default or x = 0, y = 0 ?

Klaus

2 replies

kdmemory
Inspiring
May 4, 2019

some more ..

Read this tutorial from Republic of Code Using the Loader Class in AS3 . In particular the stuff that is written under Using the LoaderInfo Events with the Loader Class.

It explains how you can create eventListeners for different loading stages like Event.COMPLETE, Event.INIT and ProgressEvent.PROGRESS. These you could use to trace() where your problem sits.

Klaus

kdmemory
kdmemoryCorrect answer
Inspiring
May 4, 2019

Hi

The code looks fine.

Is everything alright with the external file "externalkillingme.swf" ? Not that it is an AVM1 swf and your host swf is AVM2?

(Read more ...)

Is "externalkillingme.swf" really located in the same folder as your host swf?

Is everything okay with your loader_mc ? Not that it is set to invisible or something.

Is your loader_mc an empty movieclip with the registration point set to default or x = 0, y = 0 ?

Klaus