Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Using Flash And Java To Create Pop-Ups
Your Ad Here

Using Flash And Java To Create Pop-Ups


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
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!


About the Author:
Having created the outlines for FlashNewz and FLADownloads, John has become a strong voice in the Flash Community. His reviews and tutorials give great insight and knowledge to readers around the world. He has a keen eye for what's hot and what's not in the Flash world. He has also developed and continues to run his own flash portal as a side project to keep his mind on the Flash community

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.


Author's URL: John Paul Rawlins
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Using Flash And Java To Create Pop-Ups"

Only registered users can write comment

Reader's comments