This is another solution.
Code:var list:Array = [Pic1_btn, Pic2_btn, Pic3_btn]; var defaultShadow:DropShadowFilter = new DropShadowFilter(5, 45, 0x000000, 0.6, 16, 16); var overShadow:DropShadowFilter = new DropShadowFilter(4, 45, 0x000000, 0.7,12,12); var clickShadow:DropShadowFilter = new DropShadowFilter(3, 45, 0x000000, 0.8, 8,8); for(var i:uint = 0; i < list.length; i++) { list[i].filters = [defaultShadow]; list[i].addEventListener(MouseEvent.MOUSE_OVER, mOverOut); list[i].addEventListener(MouseEvent.MOUSE_OUT, mOverOut); list[i].addEventListener(MouseEvent.CLICK, callJS); } function mOverOut(e:MouseEvent):void { if(e.type == MouseEvent.MOUSE_OVER) e.target.filters = [overShadow]; if(e.type == MouseEvent.MOUSE_OUT) e.target.filters = [defaultShadow]; } function callJS(e:MouseEvent):void { e.target.filters = [clickShadow]; if(e.target == Pic1_btn) ExternalInterface.call("Photo_Enlarge", "/images/Pics/Pic1.jpg", " " ); if(e.target == Pic2_btn) ExternalInterface.call("Photo_Enlarge", "/images/Pics/Pic2.jpg", " " ); if(e.target == Pic3_btn) ExternalInterface.call("Photo_Enlarge", "/images/Pics/Pic3.jpg", " " ); }




Reply With Quote