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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exact popup window

Status
Not open for further replies.

bruto

Programmer
Jan 31, 2002
3
SE
Hi all!!!

I have this problem.
I´ve got a flash movie with a galleri of pics and when i klick them i whant them to open in a exact popup window. The last script i tried onley opened one popup at a time. I want it to work with multiple popups.

Thanx
Bruto
 
just have the actions in your button call multiple functions at the same time, and have all of those functions set in your html as you did the first..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
in your javascript (I assume you are calling a javascript function to do the pop-ups) make each window pop with a unique name by adding a counter-type thing to the window name:

windowCount = 1;
function popWin(myLocation,myWidth,myHeight){
windowCount++;
newWinName = "aWindow" + windowCount;
window.open(newWinName,'poppedWin', "'resizable=no,toolbar=no,scrollbars=no,directories=no,menubar=no,status=no,width=" + myWidth + ",height=" + myHeight + "'");
newWinName.location = myLocation;

}

This creates javascript windows with new names so they don't overlap. At least in theory. =)

HTH,
-vedder
-- like what you see? I need a job =)
 
I mabe posed the question wrong.
In the flash movie there are several pics sliding from left to right.I would like the user to be able to click on any one of the pics and thereby opening a seperate popup window.
 
like i said define each one of the functions in the javascript as you did for the one pop up..giving each seperate pic a different fucntion name..placing them all in the same html code as you did for the one that you got to work..something like this:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
function pic1()
{
window.open(&quot;yourfolder/yourpic.jpg&quot;,&quot;_blank&quot;,&quot;directories=0,menubar=0,scrollbars=1,toolbars=0,location=0,width=700,height=400,left=15,top=15&quot;);
}
function pic2()
{
window.open(&quot;yourfolder/yourpic2.jpg&quot;,&quot;_blank&quot;,&quot;directories=0,menubar=0,scrollbars=1,toolbars=0,location=0,width=750,height=500,left=100,top=100&quot;);
}
function pic3()
{
window.open(&quot;yourfolder/yourpic3.jpg&quot;,&quot;_blank&quot;,&quot;directories=0,menubar=0,scrollbars=1,toolbars=0,location=0,width=750,height=500,left=15,top=15&quot;);
}
//-->
</SCRIPT>

and so on..make sure you adjust the size of the windows to the size of the pics..

each one of you buttons would hold the actions:

on (press) {
getURL (&quot;javascript:pic1()&quot;);
}

and so on for each button...

logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Carl...
This could allways be done using one generic function, rather than writing several.
You can pass any number of parameters when calling a javascript function from within Flash.

Thus if your getURL was something like:
Code:
on (press) {
    getURL (&quot;javascript:picture_display('yourfolder/yourpic3.jpg', 750, 500)&quot;);
}
The one generic function in the html, passing on the picture identification, width, height... etc., would look something like this:
Code:
function picture_diplay(url,w,h)
{
window.open(url,&quot;&quot;,&quot;directories=0,menubar=0,scrollbars=1,toolbars=0,location=0,width=w,height=h,left=15,top=15&quot;);
}
This would permit you to avoid writing several functions, which basicly do the same thing.

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top