SyNow.org Web Site Design & Web Hosting Tutorials


Articles

Domain Name Registration - Free Web Hosting Email Tips and Tricks -  Home Based Web Business - Work at Home - Chat Rooms  - Voice Chat - Cell Phone - Phone Calls - Love Dating - Online Dating Services


  Macromedia Flash >> ActionScript  >> Flash: Pop-up Windows

Part 2: Editing the HTML

I'm going to use Dreamweaver to edit the HTML file published by Flash, but obviously you could use any editor or even notepad.

Step 1: Editing the popup.html

This is the file published by Flash. Using Dreamweaver, go to File>Open...and select the popup.html.

Step 2: Pasting the Javascript code

In the Code View in Dreamweaver, paste the following code BETWEEN the head tags:

<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>

Step 3: Create the pop-up page

Next, create a new HTML page and call it "test.html". Obviously it could be named anything but it has to be the same name referenced in the Get URL action in Flash.

Flash code:

javascript:openNewWindow('test.html','thewin', 'height=200,width=250,toolbar=no,scrollbars=no')

Step 4: Testing Your Movie

Save your popup.html file and your test.html file (make sure all files are in the same directory as your popup.swf since that's the path structure we used in the example). Test your popup.html movie and click the Flash button to test the page.


IMPORTANT NOTE:

If you make ANY changes to your flash movie and republish it, you will HAVE TO go back and paste in the code into the HTML page published by Flash. When Flash publishes the HTML page it will overwrite the existing one so you'll need to drop in the code again.

Page 1 | Page 2

Domain Hosting | Dedicated Servers| Link Exchange Directory