
08-04-08, 19:02
|
|
Junior Member
|
|
Join Date: Apr 2008
Posts: 3
Rep Power: 0
|
|
addChild to holder - CS3
|
|
Hello;
I am a novice with CS3 and have a question.
I have the code below which is working fine. I would like to load this .swf to a holder on the stage (holder_mc), that is sized and positioned how I would like it.
Then I will have another button that I would like to removeChild() from the holder_mc.
Can someone help me with this?
Thank you.
import flash.events.MouseEvent;
import flash.display.MovieClip;
import flash.display.Loader;
import flash.events.*;
import flash.net.URLRequest;
var imageLoader:Loader = new Loader();
var theURL:String = "New4thfloorStar.swf";
var imageRequest = new URLRequest(theURL);
imageLoader.load(imageRequest);
FourthFloor_btn.addEventListener(MouseEvent.CLICK, FourthFloor_btn_Click);
function FourthFloor_btn_Click(event:MouseEvent):void
{
addChild(imageLoader.content);
} |
|