Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a movie clip in a seperate window

Status
Not open for further replies.

WakePro

Programmer
Oct 27, 2002
23
CA
I have made a movie clip and on the main time line i have a button. I want that button when pressed to open that movie clip in a seperate window. Is there anyway to do this. I have tried GetURL and all the rest of them but the movie clip is part of the SWF of the fla file.

Please help if you can.

Thanks
 
What post? there isnt any post on java script
 
there is but never mind...the easiest way to do this is to save the clip in another swf then call it. this will work for all versions of flash.

attach this code to your button and alter to suit

on (release) {
getURL ("javascript:NewWindow=window.open('whatever.swf','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

if for some reason you dont want to do this there are some components for MX. I would recommend this one for what you want to do

 
That code that you send is giving me a missing ")" error.
how can i fix this?
 
the code is ok..i just checked it...paste the code you have on your button...i guess you must have altered it in some way

 
This is the code i have behind my button!

on (release)
{
getURL ("javascript:NewWindow=window.open('AboutUs.swf','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

It is still giving me an error expected ")"
 
i just copied and pasted your code into an fla ran a check and got no error

what is going on?

publish the file and run it on the web and see what happens
 
Thanks man it worked well once it was published. now is there a way to add a button that closes that new window?

on(press)
{
getURL ("javascript:window.close()");
}

if this is right let me know, or if there is another way could you please let me know

Thanks
 
almost bang on....i'd use this on the close button

getURL("javascript:self.close(); void(0);");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top