Figured out the answer for anyone that needs it as well.
unloadAndStop() is what I used and here is how I used it.
Code:
var myLoader:Loader = new Loader(); // create a new instance of the Loader class
var url:URLRequest = new URLRequest("news.swf"); // in this case both SWFs are in the same folder
myLoader.load(url); // load the SWF file
addChild(myLoader); // add that instance to the display list, adding it to the Stage at 0,0
// location
myLoader.x = 590; // move the loaded SWF 590 pixels to the right (from the left edge)
myLoader.y = 53;
// move the loaded SWF 53 pixels down from the top
function unLoad (event:MouseEvent):void
{
trace("click!");
myLoader.unloadAndStop();
}
btn_home.addEventListener(MouseEvent.CLICK, unLoad);
btn_home.addEventListener(MouseEvent.CLICK, GoToAndStop2); // the function for this is on frame one
Bookmarks