View Full Version : Flash Components

03-04-2007, 07:21 PM
I recently saw a flash page that had the folowing:
A mini pop-up window embeded in flash;
A menu-bar that acted like a drop down menu;
When you right-clicked a custom made menu came up;
I tried each of these in flash 8 pro, using the window component,
the "menu" component, and using some action script for the right click script.
None of the stuff worked... so thats when I wrote this post.
How can I do this?

03-05-2007, 03:21 AM
it might help if you posted wherever you saw these things. they might/might not be instances of flash components.

03-06-2007, 09:06 PM
The link was:
http://gprime.net/game.php/interactivebuddy (htttp://gprime.net/game.php/interactivebuddy)

03-07-2007, 08:33 PM
1) pop up windows are fun in Flash, when not used as a "real" pop up. Like in the example of the link you gave it is neat, fun part of the "game." Not an annoying "click Britney's boobs and win an Ipod" pop up. Here is the best way to make a pop up:

step 1: make your pop up on the stage, how you want it to look, include the buttons, animations, whatever. Then convert the whole thing to a Movie Clip, export for action script the whole 9. In your MC, make frame 1 of ALL layers blank. This is important for later. put stop(); codes on each frame

step2: delete it from your stage. (Don't worry it is in your library).

step3: on your stage you should have a button or MC that is clickable to bring up the pop up window. On this button put this AS:

on (press) {

Where "popUp" is the name you gave your popUp MC and "2" is the first frame that is not blank.

Now on your popUp MC add this:


This is why we left the frame 1 blank. Now it is "invisible"

There are other options, tweaks, etc. but this is the basics.

2) For the right click thing, that is simple. It is called a context menu. You just need to add the new context menu options to the first frame of your movie:

var my_cm:ContextMenu = new ContextMenu();
my_cm.builtInItems.quality = true;
my_cm.builtInItems.print = false;
my_cm.builtInItems.save = false;
my_cm.builtInItems.zoom = false;
my_cm.builtInItems.play = false;
my_cm.builtInItems.loop = false;
my_cm.builtInItems.rewind = false;
my_cm.builtInItems.forward_back = false;
my_cm.builtInItems.print = false;
this.menu = my_cm;

False means it won't show on the menu that appears on right-click, true means it will. The "settings" and "about" can not be removed so that is why they aren't there. Simple as that.

3) The menu bar is similar to the popup thing. It is all MCs. Make your menu look how you want. add frames to show the "drop down" potion, tween if you want, add AS to tell it which frame of the MC to go to on click, or on release, or on RollOut, or how ever you see fit. :D