Learn to create a customizable pop-up window using Flash CS4.
Need a Website? Contact Us Now!
We are going to learn how to create pop-up windows in Flash CS4 using Action Script 2.0.
Create a new Flash AS 2.0 document:
File > New > Flash File (ActionScript 2.0)
If you have already created a Flash AS 3.0 file you will need change your publish settings to AS 2.0:
File > Publish Settings > Flash > Script: ActionScript 2.0
Step 1: Create a button symbol and place it on the stage like the one below.

Step 2: Name the instance of the button “launch.btn”, as seen here

Step 3: Now we need to create the action script,
Create another layer and call it actions, your timeline will look like this below

Let’s now write the action script, so go to actions layer in frame1 and press F9
We will write launch_btn (which is the instance name of the button).onRelease (which on release is going to perform a function as defined).
In the next line getURL (“ “). Now in-between these quotes we are going to call a java script that will publish the swf file and the html file.
In the html file we are going to write a javascript function. So in the getURL function we are going to call the java script function, so in-between the quotes we are going to call a java script function
So type javascript; and type the function we are going to call, lets go and call this function launch, and in brackets we are going to send this function to an URL that its going to take us to, so type bestwebdesignz.com in single quotes, so your action script will look like this below.

Now save the file by going to the main menu File> Save As>call it popup.fla.
At this point we have finished all that we need to do in flash, we now need to publish the file, so go to the main menu File > Publish Settings, and make sure that the flash (.swf) and the html(.html) boxes are checked and click on publish and click ok like this below.

Step 4: Now we need to go into our html file and need to add that javascript function. So open the notepad and open the popup.txt file and you need to add a function in between the title and the head as shown below,

In this script you are basically calling a function called launch in a new page and this will open an URL as defined in the page function with no toolbars, no menubar, no scrollbars, no location, with width =550 pixels and height =250 pixels and to show from the top=250 and from the left =250 .
Now we need to upload the files to the server and test your movie, so go and save your file and upload the .swf and html files to the bestwebdesignz server. Having uploaded the swf files and html files, switch to the browser window and type in the name here “bestwebdesignz.com, you will see that button which we designed earlier and when you click on the button, it will call the java script and load the bestwebdesignz.com site for you.
Flash CS4 Tutorials
- Flash CS4 Tutorial
- Introduction to flash CS4 authoring environment
- Panels and Panel workspace in flash CS4
- Drawing in flash CS4
- Use of polystar tool in flash CS4
- Object drawing Mode in Flash CS4
- How the Line tool, Pencil tool, brush tool and pen tool work in in Flash CS4
- How to use Ink bottle and paint bucket tool in flash CS4
- How to manage layers in Flash CS4
- How to make an image big on rollover in flash CS4
- Creating Mask in Flash CS4
- Moving Ball Animation in Flash CS4
- How to create a shape tween in Flash CS4
- How to create a motion guide in Flash CS4
- Learn how to create a bouncing ball in Flash CS4
- Learn how to put multiple classic tween on stage at the same time in Flash CS4
- Learn Complex Text Animation in Flash CS4
- Learn Create Animations involving Masks in Flash CS4
- Learn to create a movie clip that fades as the user moves the cursor away from it in Flash CS4
- Learn to create cloud animation in Flash
- Learn to import sound in Flash CS4.
- Learn 3D Art in Flash CS4.
- Learn to create a customizable pop-up window using Flash CS4.
- How to create a pop up window in flash CS4 using javascript
- How to get an url in a blank window in a flash CS4 action script
- How to get an url in a blank window in an xml file
- How to put your favorite icon in the browser
- How to create a scroll bar in Flash CS4
- How to create a basic layout in Flash CS4
- How to load pictures in flash CS4 dynamically using the loader component
- Load External swf as2
- Upload a Website/ FTP
Tags: Learn to create a customizable pop-up window using Flash CS4.
Posted in Flash CS4 Tutorial | No Comments »












