i am trying to remove a .swf once you leave the index page. unsure of the method “contains” and how to remove the banner var or unload the var
the page variable code is
var sights:URLRequest=new URLRequest("sights.swf");
this defines the page loader
var pageLoader=new Loader();
this defines the banner loader
var bannerLoader:Loader=new Loader();
bannerLoader.load(myBanner);
stage.addChild(bannerLoader);
the button script to call the sights page with the condition:
sights_btn.addEventListener(MouseEvent.CLICK, sightspage);
function sightspage(evt:MouseEvent):void
{
pageLoader.load(sights);
stage.addChild(pageLoader);
if(sights.contains(myBanner))
{
sights.removeChild(myBanner);
}
}
yet i still get the error
1061: Call to a possibly undefined method contains through a reference with static type flash.net:URLRequest.
is my syntax correct, punctuation, braces, parentheses etc all in the right places?
thanks for the help!!!
lisa