Actionscript 3 - loading an external swf at runtime
Posted: Tue Aug 19, 2008 10:53 am
Hi All,
I have spent most of the day looking for a simple example of how to load an external swf file at runtime.
Please can some one help.
I can embed it easily but I need to be able to change it. I am not worrying about making it dynamic now, I just want it to work as if it was (hope that makes sense).
I have tried various examples from simple to hard, I have ended up with this simple example that I would like to work...
Thanks 
I have spent most of the day looking for a simple example of how to load an external swf file at runtime.
Please can some one help.
I can embed it easily but I need to be able to change it. I am not worrying about making it dynamic now, I just want it to work as if it was (hope that makes sense).
I have tried various examples from simple to hard, I have ended up with this simple example that I would like to work...
Code: Select all
import mx.controls.SWFLoader;
public var myLoader:SWFLoader = new SWFLoader();
myLoader.load("example.swf");