02-03-2004, 04:05 PM
|
#1
|
|
|
Popup Tutorial Question
Hey,
I read the popup and tutorial and it's great!
But i have one question to it.
How can i tell the window to open on a certain part of the monitor?
I know there's something like "screenX/screenY = .. " but can somebody tell me how i can build that into my script?
Thx!
Kapo
|
|
|
02-03-2004, 04:30 PM
|
#5
|
|
|
In the on(press) for the button add 2 more variables in there.. one called top... and have it equal how many pixels from the top of the screen you want it to be at. And add another variable called left and set that value to how many pixels from the left you want the window to be at.
Then in the function call you will want to change these things....
1) In the function you have to specify the correct arguments, so change...
ActionScript Code:
_global.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable)
to
ActionScript Code:
_global.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable, top, left)
Notice how we added top and left to the end of the arguments list.
2) Find this line...
ActionScript Code:
top='+((screen.height/2)-("+h/2+"))+',left='+((screen.width/2)-("+w/2+"))+'"+"')
and change it to
ActionScript Code:
top='+top+',left='+left+'"+"')
Now the script is set up to accept the specified top and left values instead of the centered window values.
I think this should work.
|
|
|
02-03-2004, 04:51 PM
|
#6
|
|
|
ok thx man..
and do u think u can help me with the other prob too?
When i open the window, and close it, i can't open it or another window anymore without havin to refresh the swf
is there somethin that can slove this problem?
maybe i have to close the windo with javascript?
Kapo
|
|
|
02-03-2004, 04:58 PM
|
#8
|
|
|
nope, i used the code from the tutorial.. everything works, just not this funktion
here is the link to my page i'm building:
http://web62.multimediastudios.de/Index2.htm
Go to: "memberz" ( The buttons for Kapone & D.Chesron are the ones with the scripts till now)
|
|
|
02-03-2004, 05:01 PM
|
#10
|
|
|
could it be because of the "stop" action on the last frame?
would be strange if it was becuz of that
[edit]
I have just put the script of the actions layer after the stop.
But now (i have put scripts on all buttons now) only 2 buttons - the second and the last - work?
:confused:
Last edited by Kapo; 02-03-2004 at 05:05 PM..
|
|
|
02-03-2004, 05:09 PM
|
#12
|
|
|
I have given every button a different value name (from kirupa to kirupa4) ..
darn.. i don't understand why those 2 buttons work and the others don't
Last edited by Kapo; 02-03-2004 at 05:17 PM..
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:14 PM.
|
|