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 andtutorials 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. Hehas also developed and continues to run his own flash portal as a sideproject to keep his mind on the Flash community

Being a key designer for advertising creative, he's got style when itcomes to grabbing readers attention. With a proven track record, thereisn't much this guy can't handle.

Related Articles

  • 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 incorpora...
  • Platform Independent Client-Side Applications with Java
    That very umph comes with Java. Java was originally developed at Sun Microsystems in 1991 to provide a platform-independent programming language and operating system for consumer electronics (TV sets, toasters and VCRs)...
  • Java Sucks
    Though Java can create interfaces that go way beyond the capability of HTML, CGI, and JavaScript. And though the language is extremely powerful and portable, Java still has serious restrictions...
  • Conclusion: Stocking your Toolbox
    As any good technician knows, there is no such thing as a best tool. The best tool is dependent on a whole host of factors from the type of task at hand to the personality of the marketing director. The best tool is a fantasy. Instead, every web developer should have at her disposal a wide a.....
  • Design A Spider Friendly Site
    To be successful in the search engines its important to design your web site with the spiders in mind. Using the latest in web page design is not generally the best way to go. Spiders dont view web pages like humans do, they must read the HTML in the page to see what its about...
  • RSS Feed Secrets: Using RSS Feeds For Search Engine Spider Food - Part 1
    This is part one of a two part series. In this part you will learn a little about RSS feeds and how to put an RSS feed on your website or blog using just a simple Java Script. If you would like to see this article in its entirety please visit the link in the authors bio.
  • The Good and Bad Things about Flash Based Web Designing
    Flash based websites are being widely used all across the web world by web designing agencies for creation of websites and this is predicted to increase in numbers too.
  • Pros and Cons of Flash-based Sites
    Flash-based sites have been a craze since the past few years, and as Macromedia compiles more and more great features into Flash, we can only predict there will be more and more flash sites around the Internet.
  • Take Advantage of Simple JavaScript Optimization
    Coding, anyone? Let Kay Zetkin show you how to reduce redundancies and increase productivity using JavaScript optimization.
  • Reasons for not Using Flash in your Website
    Recently web have become more multimedia oriented than in its early days. While in some domains the new technologies work and prove successful. On the other hand, flash just makes browsing more time consuming. Here I point out the drawbacks of using Flash as well as give some pointers on how to bett...

Contact Web Design Outsource and get started today

Need Website Designing, Development, Redesigning, Maintenance and SEO services or help growing your company's web presence? Request a free Quote Now.