Load (on rollover) and unload (on roll off) swf's

Hi all,

Sorry - I know this is something I should’ve been able to find through a search, but didn’t actually turn anything up. If someone wouldn’t mind lending me a quick hand (or pointing me in the right direction).

> I have a map which has about 5 or 6 points on it
> each point needs to load an external swf into a movie clip (is that still the same in AS3?) when a user hovers over the point, then unload it when a user moves their mouse off
> finally, if someone clicks on a point, it will take them to another page

At the moment, I’m able to load it on rollover, but then it doesn’t disappear when I move my mouse off the point (and I’m not really having much luck with linking the …my current AS3 is:

=========================

var swf1Request:URLRequest = new URLRequest(“new.swf”);
var swfLoader:Loader = new Loader();
load1_mc.addEventListener(MouseEvent.ROLL_OVER, clickA);

function clickA(event:MouseEvent):void{
img1Loader.load(swf1Request);
img1Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadNowA);
function loadNowA(event:Event):void{
_1.addChild(swfLoader);
}
}
function unclickA(event:MouseEvent):void{
_1.removeChild(swfLoader);
}

=========================

My code’s probably a little messy, sorry. But I think what I’m doing is pretty common, I’m just not getting anywhere with it. If anyone could point out what I need to change here, that would be much appreciated!

Many thanks,
Jon