Create Expandable Flash Banner

First, You can use a transparent swf that on expand calls a javascript that rewrites the containing div properties e.g in actionscript

expandBanner=function(){
getURL("javascript:expandbanner()");");
gotoAndPlay("expandAnimation");
}
contractBanner=function(){
getURL("javascript:contractbanner()");");
gotoAndPlay("contractAnimation");
}

then in the head of your html

<script type='text/javascript'>
function expandbanner(){document.getElementById('mybannerdiv').style.width = "400px";}
function contractbanner(){document.getElementById('mybannerdiv').style.width = "200px";}
</script>

The contracted swf area has a background mc, which only takes up part of the stage, then when you expand you use the full swf stage area.

You may also like...