my swf doesn't work when inserted into my website
Hi I am trying to create a gallery on my website. The way I am doing it is I am making several swfs that consist of an image that you click on, it goes into full screen, click it again and it goes back, then importing them into dreamweaver. the as3 code I am using in Flash is
import flash.display.StageDisplayState;
function toggleFullScreen():void
{
if (stage.displayState == StageDisplayState.NORMAL) {
stage.displayState=StageDisplayState.FULL_SCREEN;
} else {
stage.displayState=StageDisplayState.NORMAL;
}
}
btn_fullsc.buttonMode = true;
btn_fullsc.addEventListener(MouseEvent.CLICK, buttonOnClick)
function buttonOnClick(event:MouseEvent):void
{
toggleFullScreen();
}
When I export and open just the swf, it works, but when imported into dreamweaver, then published it doesn't, it still shows the original image but when you click it nothing happens. What am I doing wrong? any help would be great.
PS
I am an idiot when it comes to computers. If you send me a different code that I'm supposed to use just give me the exact code that I can just copy and paste into flash