Groups | Blog | Home
all groups > flash actionscript > december 2004 >

flash actionscript : open a new window on click


caseypanas
12/23/2004 8:54:25 PM
I have a swf/movie with some buttons/links to other swf/movies. When you click
I want the original swf/mpvie to stay as is in a full window, the new swf/movie
to open in a new window of a specific size and without all the other browser
stuff like scroller, ect.
I have tried...

on(release){
getURL("abc.swf",_blank);
}

...but of course this opens a new browser of any size and with all the other
stuff I don't need. I've also tried javascript...

on(release){
getURL("javascript:window.open('abc.swf','name','height=200,width=200')");
}

this one does the trick but my original window is lost and says "object" and
the adress bar say "javascript:windo.....

can anyone help this rookie??thanks in advance.
juankpro
12/23/2004 9:02:55 PM
to avoid the screen you can call a javascript user defined function that is
being defined on the HTML that contains the original flash:

on(release){
getURL("javascript:myfunction('abc.swf','name','height=200,width=200')");
}

or declare the function and call it from flash;
TinMonkey
12/23/2004 9:10:16 PM
on(release){
getURL("javascript:window.open('abc.swf','name','height=200,width=200')", "_blank");
TinMonkey
12/23/2004 9:12:20 PM
nevermind...didnt work
juankpro
12/23/2004 9:20:05 PM
The problem is that the function window.open returns a value so you have to
call a function that doesn?t returns anything like:

getURL("javascript:myfunction();");

and define you function in the HTML or define the function and call it in
flash like this:

getURL("javascript:function
myfunction(){window.open('abc.swf','name','height=200,width=200')};
myfunction();");

caseypanas
12/24/2004 2:08:58 AM
AddThis Social Bookmark Button