• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0

Need help with lightbox2 HTML code for my website.

0 posts in this topic

Hi all,

I am currently building a website in Dreamweaver MX 2004, and because I am a print-designer, not a web-designer, I am having a lot of difficulty getting my head around some of it. Given that alot of the people on this site are scripters/coders/wizards, I thought I'd try my luck and post what I've got so far up here to see if anyone can help me out.

I am attempting to use a [url="http://lokeshdhakar.com/projects/lightbox2/"]lightbox2[/url] image gallery on my website, but am having difficulty coding it in to what I already have.

Basically, my website, when completed will consist of four buttons; "Graphics", "Illustration", "Photography" and "About Me/Contact".

The last button ("About Me/Contact") will simply link to another page with the relevant info on it - but the former three buttons will be connected to lightbox galleries. Clicking "Graphics" will bring up images from my graphic design portfolio in a lightbox window so that they can be flipped through. Clicking "Illustration" will display images from my illustration portfolio and so on...

If you look at the example below, you can see the clump of text within the[i] table [/i]HTML tags, those are the images that constitute the buttons, the first one "Graphics" already brings up a lightbox view of "Graphics/Workexample1.jpg" but I can only figure out how to get one image to show up within that link, instead of a collection that you can flip through. I would also like to achieve the same with the other image links ("Illustration" and "Photography").

If you look just above the closing [i]head[/i] tag - you can see four or so lines of [i]script[/i] tags that I copied and pasted directly from the lightbox website (see the link above). From my basic understanding of all of this - those bits of HTML are what make the files that come with the lightbox download (which you include in your website's root folder) do their magic.

Can anyone help with this, I'd be extremely grateful as I have been staring blankly at this for hours?

Also, my sincerest apologies if this is posted in the wrong place, I didn't want to post in any programming or coding specific forums as this is not strictly game-design related.

Many thanks,

Texas Jack.

(P.S. - The images that act as the buttons which link to my lightbox galleries are themselves roll-over images. Just to make the HTML a little more crowded for you!)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
&lt;script language="JavaScript" type="text/JavaScript">
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&amp;amp;&amp;amp;i<a.length&amp;amp;&amp;amp;(x=a[i])&amp;amp;&amp;amp;x.oSrc;i++) x.src=x.oSrc;
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&amp;amp;&amp;amp;parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&amp;amp;&amp;amp;d.all) x=d.all[n]; for (i=0;!x&amp;amp;&amp;amp;i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&amp;amp;&amp;amp;d.layers&amp;amp;&amp;amp;i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x &amp;amp;&amp;amp; d.getElementById) x=d.getElementById(n); return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
<link href="css/lightbox.css" rel="stylesheet" />
&lt;script src="js/jquery-1.7.2.min.js"></script>
&lt;script src="js/lightbox.js"></script>
<body onLoad="MM_preloadImages('Layout/Graphics_Down.jpg','Layout/Illustration_Down.jpg','Layout/Photography_Down.jpg','Layout/About_Contact_Down.jpg')">
<table width="428" height="175" border="0" align="center" cellpadding="0" cellspacing="0">
<td height="27" colspan="7"><img src="Layout/Title.jpg" width="428" height="27"></td>
<td width="73"><a href="Graphics/Workexample1.jpg" rel="lightbox"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Graphics','','Layout/Graphics_Down.jpg',1)"><img src="Layout/Graphics.jpg" alt="Graphics" name="Graphics" width="73" height="148" border="0"></a></td>
<td width="7"><img src="Layout/Semicolon_Left.jpg" width="7" height="148"></td>
<td width="105"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Illustration','','Layout/Illustration_Down.jpg',1)"><img src="Layout/Illustration.jpg" alt="Illustration" name="Illustration" width="105" height="148" border="0"></a></td>
<td width="7"><img src="Layout/Semicolon_Middle.jpg" width="7" height="148"></td>
<td width="109"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Photography','','Layout/Photography_Down.jpg',1)"><img src="Layout/Photography.jpg" alt="Photography" name="Photography" width="109" height="148" border="0"></a></td>
<td width="6"><img src="Layout/Semicolon_Right.jpg" width="6" height="148"></td>
<td width="121"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About','','Layout/About_Contact_Down.jpg',1)"><img src="Layout/About_Contact.jpg" alt="About &amp; Contact" name="About" width="121" height="148" border="0"></a></td>
[/CODE] Edited by TexasJack

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0