How to open up a new windows with size specificed, and etc...

I have created a flash, there are some buttons in the movie, I know I can use flash to open up a new windwos when the button clicked. But how do I make that "just open up" windows in the size that I want it to be? For example, a button from the movie called "About me", and what I want is when I clicked on it, it will pops up a new windows with no location bar, no file menu, no status bar, and have the size of 600X400? Thanks for help !!

P.s. I know it might use javascript to do so, if so how?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try using this in the URL field of the Get URL action:

javascript:open("aboutme.html", "AboutWindow", "scrollbars=no, width=640, height=480, status=no, location=no")

Problem is, you cannot create a java-opened window without first opening a regular browser window (Homey just won't play dat). And, furthermore, Java seems to be the best, if not only way, to manipulate window features.

I hope this helps,

clo1Author Commented:
Please tell me more detail. Like the window option in Flash should be choose _blank, _parent, _top or _bottom?? And I have encountered a problem, when I click on the About me button, it does open a new window fine, but my index page just go blank and have a word "[Object]" on it. What's happen? Please help again. Thanks in advance
Try selecting _blank in the target field to correct this =)

The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

clo1Author Commented:
Same, it just leave my index page open, and the about me page is open fine under a new window, but a extra blank page has been opened and written "[Object Window]"..
This is because Flash cannot open a java window without opening a regular browser window first.
clo1Author Commented:
But I did open a new windows from Flash using the _blank action already. Any other way to make it work?? Please re-post your answer. Thanks !
If you use the FS-Command then you can write a java function, in the html of the page on which the movie is placed, to open the window.

Make sure that you set the Publish settings for HTML to use a template that supports FS-Command.

This generates HTML text that has a place holder for the function.  You can create an if block so that you can have multiple functionality, and you can pass arguments so that you can open any page at any size.

Once you've written the java on the page, simply add an action to the button to use the FS-Command and pass the appropriate arguments.
and that would look like this:

FSCommand command name would be "createwnd"

the arguments would be "_blank" or whatever window name you wanna specify...

and then on your button click do this in JS:

if(command == "createwnd") {
open("aboutme.html", args, "width=800, height=600, scrollbars=no");

and fill in the rest of the JS info about the window as shown above.

clo1Author Commented:
Hi guys. Can you guys give me more details on how to do it. Because I have tried several times and still couldn't bring out anything. What I did was:

1) Created a button, and set it  
   propertities's action as:

   On (Release)
      FS Command ("createwnd", "About
   End On
   published as test.html, and already
   set the html template as "Flash with
   FS command".

2) Added the following statement to
   this test.html page:

   <SCRIPT LANGUAGE=Javascript>
   if(command == "createwnd") {
   args, "width=800, height=600,

Everything seems correct. But when I clicked on the button, it has nothing to happen. Please help me. Thanks !!!

Please send me answer detaily. Thanks again!!

Try open("aboutme.html", "WindowName," "scrollbars=no");

clo1Author Commented:
It's very confusing right now. Could you please tell me the detail like where to add, and what stuffs like that. Thanks
Hi Guys,
try this, taking you right from the beginning (apologies if you know this bit already!)

Go to the file menu and select Publish Settings.
Click the HTML tab in the dialogue box and pull down the Drop down list for Template.
Choose - Flash with FSCommand.
Publish the Movie and then look at the HTML generated - it should look something like this....

<BODY bgcolor="#FFFFFF">
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function Movie2_DoFSCommand(command, args) {
  var Movie2Obj = InternetExplorer ? Movie2 : document.Movie2;
  // Place your code here...
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
        navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
      document.write('<SCRIPT LANGUAGE=VBScript\> \n');
      document.write('on error resume next \n');
      document.write('Sub Movie2_FSCommand(ByVal command, ByVal args)\n');
      document.write('  call Movie2_DoFSCommand(command, args)\n');
      document.write('end sub\n');
      document.write('</SCRIPT\> \n');
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 ID=Movie2 WIDTH=550 HEIGHT=400>
 <PARAM NAME=movie VALUE="Movie2.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="Movie2.swf" quality=high bgcolor=#FFFFFF  WIDTH=550 HEIGHT=400      swLiveConnect=true
 TYPE="application/x-shockwave-flash" PLUGINSPAGE=""></EMBED>

Where the code says "place your code here" simply put in the relevant java script.

ie to open another browser window with a URL passed from Flash then do something like this . . .

if (command == "openURL") {

On the button in the Flash movie use the FS-Command action and type the name of your function in the Command field with the URL in the Argument field.

For multiple functions, simply expand the IF block to allow for each function.

In the header of yur HTML place a function to open the URL in the way you want - for instance . . .

function MyFunction(page) {
windowprops = "height=160,width=350,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes";, "Popup", windowprops);

Note how to turn off/on the various properties of the browser window.

Good luck - and keep me posted!
clo1Author Commented:
I have found another more easier and better method. Thanks for your help.

What is that easier & better method??


Ullas P.A.
Place this in the <head> tags of your html file that contains the main flash file:

<script language="JavaScript">
function AboutMe() {'me.html','mainwindow','toolbar=no,status=yes,scrollbars=no,resizable=yes,width=600,height=479')}
// -->

In the flash file, use the following for the action of the button:

Get URL(javascript:AboutMe()")

Just copy and paste the Javascript for each button and change the settings. Remember that the function name (i.e. AboutMe) needs to be different for each set if you want different settings.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.