PDA

View Full Version : Simple CreatePopup has me Stumped


kicksave_ray
11-22-2005, 03:23 PM
I've ventured into unchartered waters!! I have a flash movie called Main. On the Stage in Main I would like to create a button called 'Glossary' that will launch a modal popup window which is a live glossary, the glossary is an flash movie called Glossary.swf.

I have been trying to get this to work using the createpopup actionscript function but I can't get it to work properly.

Can somebody provide me with the basic actionscript / code and which layer or library item it needs to be attached to.

I know this is quite simple but the help file is missing one or 2 steps.

Thanks for your help.

Paerez
11-22-2005, 07:41 PM
PopUpManager.createPopUp(parent, class, modal [, initobj, outsideEvents])

parent is probably _root
class is the linkage name of the movie clip to pop up
modal is true for you
you probably dont need the initobj or outsideEvents

Gibberish
11-22-2005, 08:21 PM
If you want to create a flash popup inside of flash then do as Paerez stated.


import mx.containers.*
import mx.managers.*

// Open a window component
// be sure to have the window component in your library
var win = PopUpManager.createPopUp(_root, Window, true);
trace (String(win instanceof Window));

Or you can open in up into a new browser window. Be sure to have the object tag that opens your glossary.swf in a html file (I assumed the name would be glossary.html).

getURL ("javascript:NewWindow=window.open('http://www.mysite.com/glossary.html','newWin','width=640,height=480,left =0,top=0, toolbar=No,location=No,scrollbars=Yes,status=No,re sizable=No,fullscreen=No'); NewWindow.focus(); void(0);");