views:

9

answers:

0

I'm trying to create a simple banner ad where the mouse hovers over the button and a panel shows up over some content of the site.

I have two different .swfs: the container, which is the button and a loaded swf that has the animation that comes up when the button is clicked. The button is only 183 x 40px where as the loaded swf is 183 x 160px.

When the loader swf is loaded, it takes the dimensions of the button.

Is there a way to have the loader swf be its original dimensions, so when the mouse hovers over the button, the loader swf covers some of the content on the Web site?

Is loading SWfs even the proper way to do this?

Also, how can I change the MouseEvent to load the SWF when the mouse is only over the button and not clicking?

Help! Thanks.

The simple code I have so far:

stop();

var myLoader:Loader = new Loader();

open_btn.addEventListener(MouseEvent.CLICK, loadBanner);

function loadBanner(myevent:MouseEvent):void { var myURL:URLRequest = new URLRequest("produ_banner.swf"); myLoader.load(myURL); addChild(myLoader);

}