Popup Window Variable to Browser?

I have created a picture gallery within Flash with 20 or so small pictures. When I click on a picture, I would like to open a page called “picture.html” with attributes. Ive got it working, sort-of, with the following code I found here on this site (thanks! by the way)

in my button I have:

on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “picture.html”;
target_winName = “kirupa”;
width = 800;
height = 500;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}

…and in a Actions layer, I have:

_global.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL(“javascript:window.open(’”+url+"’,’"+winName+"’,’"+“width=”+w+",height="+h+",toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",top=’+((screen.height/2)-("+h/2+"))+’,left=’+((screen.width/2)-("+w/2+"))+’"+"’);void(0);");
};

Anyway, its working fine, except I would like to know if its possible to have only 1 “picture.html” file for all my 20 pictures in the photo gallery.

I know that somewhere within picture.html, I need to open an image.jpg. I would like to pass the big picture’s file name to the picture.html page from the flash button. So, how would I pass “picture1.jpg” to “picture.html”, and within “picture.html” how would I open an image from a variable?

Thanks in advance!

You need server side scripting for that.

In PHP it would look something like:


<img src="<? print $picurl; ?>">

now pass the variable picurl via the get string to picture.php

[AS]
address = “picture.php?picurl=picture1.jpg”;
[/AS]

Thanks for your help. Now how do I set up the server side scripting? or how would I know if its already there?

Rich

To test if PHP is running on the server upload a file named ‘test.php’ and put <? phpinfo(); ?> in it.
When you open that file through the server it should show a lot of information about PHP and which version the server is running and whatnot. If you see nothing - bad luck :hair:

To run PHP locally (on your computer) you’ll need to install an apache server and php, which can be quite tricky. :h:

There’s a package called phpdev, try googling for it, it installs and configures apache + php ( + mySQL) pretty nicely.

Thanks!