PDA

View Full Version : [FMX]Help!New Window Pop Up ActionScript



eNaRDe
September 18th, 2003, 01:50 PM
:hangover:
This is the code I have....

on (release) {
getURL ("javascript:NewWindow=window.open('http://www.enarde.com/popups/3D/3DRed.htm','newWin1','width=511,height=448,left=0, top=0,toolbar=No,location=No,scrollbars=No,status= Yes,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}


Everything works, its fine...in my flash movie you would click on a icon to see the pic in a new window...okay that works...but i want the user to be able to click on another pic and have the last window they open resize to the size of the pic...
Its not doing that...it does open the pic in the same window but not resized...it stays the same size as the first pic they clicked on...what i have done was for every pic i would change newWin1 to newWin2 and so on...but that just opens it in another window...thats not cool...

So is there a way that i can make it so when i click on a pic it resizes the first window that was open?

I hope that made some kind of sense :alien:
Oh yeah heres the site...http://www.enarde.com
Just incase you dont understand what i mean...im talking about the 3D section.

j0se
September 18th, 2003, 03:13 PM
you're specifying the size of the window in your js:

...'width=511,height=448...

so if you re-open it it's always going to be that size

1 you could make all your pics the same size

2 you could set up variables for each pic and store each image's size, then pass that to the js

e.g.

pic1.url = "Image1";
pic1.height = "450";
pic1.width = "240";

then in the js, pass those vars i your js:

on (release) {
getURL ("about :NewWindow=window.open('+pic1.url+','newWin1','wid th=+pic1.width+,height=+pic1.height+ ,left=0,top=0,toolbar=No,location=No,scrollbars=No ,status=Yes,re
sizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

eNaRDe
September 18th, 2003, 04:31 PM
Thanks alot....ill try that