With Flash it is quite common to have a customized pop up window to hold your flash movie. This is almost always done using HTML and JavaScript. Well, what about having buttons in your flash movies that will open customized pop up windows?
In this tutorial I am going to show you how to incorporate Flash and Java to do the same effect from a Flash movie.
First we need to create our button. For this tutorial to make things as simple as possible we are going to create a very simple button. With your rectangle tool draw a rectangle.
Now highlight the button and hit F8, which will bring up convert to symbol dialog box. Check button and hit OK.
Action buttons
To add our actions we are going to right click the button and select actions.
In our actions pane we want to add the follow action script code:
| on (release) { getURL("JavaScript:popup();"); } |
Now save your movie and publish. Go to File and Publish.
Now we are going to add our JavaScript to our HTML file. Just copy and paste the code below changing the options as necessary for your project. You will need to replace the http://flashnewz.com with the url that you want to use for the pop-up window.
Java Script to be inserted in the <head> tag of your HTML.
| <SCRIPT LANGUAGE="JavaScript"> function popup() { window.open('http://flashnewz.com','','toolbar=no,location=no,status=no,menubar=yes, scrollbars=no,resizable=no,width=10,height=10,left=0,top=0'); } </script> |
And that's all folks!
Being a key designer for advertising creative, he's got style when it comes to grabbing readers attention. With a proven track record, there isn't much this guy can't handle.








