ARRRGGH just worte a massive reply, went to test a close window link I had simplified, and didn’t realise it had opened in the window I was writing my thread in. Closed window. Lost Message. Thumped Wall. Tits…
So, here we go again…
For everyones information, I’m the mystery friend Urbanscrawl refers to earlier.
Basically M8, they are right, as I was trying to explain on the phone the other night (with a pint in my hand… might not have been the best explanation ever…) you need a seperate HTML file for each image.
Create your file in the same folder as the image, and give it the same name. You’ll be grateful later. So, for snug1.jpg , create a file called snug1.htm
The html wants to look like this:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<img src="{file name}.jpg" width="640" height="480">
</body>
</html>
So the file for the first Snug image would be:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<img src="snug1.jpg" width="640" height="480">
</body>
</html>
Then all you have to do is change the URLs in the Action script from .jpg to .htm
You can do all the HTML by cut and paste into a text editor (e.g. Notepad on PC) if you are still a bit daunted by Dreamweaver, or try these instructions to learn a little bit more:
N.B. Instructions are written for PC, but most things are similar on Mac. Mainly, substitute Ctrl+ for Option+ (the apple key) and Right Click for Alt+Click (sorry if I misrecall those…)
Open a new file: File>New Window or Ctrl+N
Immediately save the file with the appropriate filename for the image it will contain in the same folder as the image (see above)
Right Click in main area of window and choose Properties
In Page Properties dialogue:
Delete the #xxxxxx Hex colour codes (you don’t need them in this example, and it will help to keep your html file tiny)
Enter 0 for Left Margin, Right Margin, Margin Height and Margin Height and Margin Width
Click OK
On Common Objects palette click first button for Insert Image
(Window>Objects, and select Common from drop down menu at top of palette if necessary)
Select the image and click OK
SAVE THE FILE!!!
God, that was tough, wasn’t it?
Well that should be one problem fixed, but now to make you cry. There’s another one…
Go to the Artists Protfolio page.
Click one of the buttons to open a popup
View the genius of the artist.
Return to the main window without closing the popup
Click a different button to open another image…
The popup returns to the front (Nice touch, this doesn’t always happen with Java popups) BUT the new image does not load, the old one remains.
Someone else might know how to fix this for you hopefully (or explain why it happens if it is a quirk of my machine)
I do have a bit of a fix, but it’s not foolproof (and there’s a lot of fools out there, mostly called “clients”)
You could try making each portfolio button open a popup that has a different window name (thats the target_winName = “snug1”; line in the action script on your buttons), but this method could leave you with loads of popup windows open.
OR
Try adding a close window link to encourage users to close the popup before opening another. The HTML could look like this:
<html>
<head>
<title>Urban Scrawl - Innovative Outdoor Media</title>
<meta content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<script LANGUAGE="JavaScript1.1" type="text/javascript">
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#CC3300" vlink="#CC3300" alink="#FF6600" bgColor=#000000>
<p align=center>
<img src="snug1.jpg" width="640" height="480">
<br>
<a href="#" onClick="top.close()"><b><font face="Arial, Helvetica, sans-serif" size="2">Close Window</font></b</a></p>
</body>
</html>
Paste this into the Code View in Dreamweaver, or into Notepad, and then open it in Dreamweaver to have a look at what it does if you don’t understand anything, but it’s really very simple, just a link with a teeny bit of Java to close the window ( top.close() )
Hope that does it, please let me know if anyone has questions or suggestions.
Love and Nukes,
crazylegs