Forums

This topic is locked

images in layers within a repeated region

Posted 23 Aug 2001 11:00:42
1
has voted
23 Aug 2001 11:00:42 Mark Spencer posted:
does anyone know how to dispay images in layers in a repeat region i.e to display an image gallery but not in sequential lines, eg images in a circle ? any help or pointers appreciated.

Replies

Replied 23 Aug 2001 15:55:39
23 Aug 2001 15:55:39 Joel Martinez replied:
that would take some serious coding... programming circles is somewhat of an art (one that I'm not even that good at) knowledge of math is essential for this...

but if you know the algorithms it would take to get the x,y coords, then the programming would be something along this line:
<pre id=code><font face=courier size=2 id=code>&lt;%do while not recordset1.eof
'your math calcs would go here
dim xCoord
dim yCoord
%&gt;
&lt;div style="position:absolute;top:&lt;%=yCoord%&gt;;left:&lt;%=xCoord%&gt;;"&gt;
&lt;%=recordset1.fields("imageURL".value%&gt;
&lt;/div&gt;
&lt;%recorset1.movenext
loop%&gt;</font id=code></pre id=code>Hopefully that helped you out a bit...

Joel Martinez [ ]
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
'2nd place is just 1st Loser
Replied 29 Aug 2001 07:53:08
29 Aug 2001 07:53:08 Jean-Marie Bonnar replied:
Hi Mark,

In the book "Sams Teach Yourself Dreamweaver UltraDev 4 in 21 Days" by John Ray, there is a chapter ("Day 10" in the book) that addresses creating database-driven screens, and on pg. 296 has a section called "Dynamic Attributes and Complex Displays." It also has a tutorial on doing the very thing you ask, except it lays the images out in a pentagon shape instead of a circle. As Joel has said, an approach setting up a repeating recordset that uses field data for the positioning and a few other attributes of the layers can accomplish this. To add a new layer to the page, you just add a record to the database.
The book's tutorial explains in detail how to do this, and the tutorial and the dynamic database driven complex layout principles alone make the book a worthwhile purchase for UltraDev users, but there are many more gems in the book as well and I heartily recommend it as I think it would be especially helpful to you with the creative and dynamic database driven layout you are trying to accomplish.

Best regards,

Jean-Marie

Edited by - Jean-Marie on 08/29/2001 08:46:46

Reply to this topic