Embedding swf in container on page load
I'm trying to figure out what the AS3 script is to have a swf embedded inside of a container, little new to AS3. any help? Thanks.
I'm trying to figure out what the AS3 script is to have a swf embedded inside of a container, little new to AS3. any help? Thanks.
There is nothing wrong with that code unless you have some object on the stage with the instance name "sliderCont" that you are expecting to have the swf load into. The code creates a loader instance named "sliderCont" and loads an swf into it, and then adds that loader to the display list.
If "sliderCont" is some other object, then you need to pick a different name for your loader and then add the loader as a child of that.
var ldr:Loader = new Loader();
ldr.load(new URLRequest("flash-xml3.swf"));
sliderCont.addChild(ldr);
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.