buddyholly
Programmer
I am trying to set up a cfm page which will display images (one at a time - first, then second superimposed on the first etc..) which have been created by looping through a record set. There would be a defined time between the display of each image. My code is below
Problem
Can not manage to have only one image at a time displayed on the page. I get all the images, dispayed one below the other - appearing one after the other with the delay interval between them.
Perhaps I am tyring to do the impossible ?
<!--- start of delaycomponent--->
<cfset thread= CreateObject("java", "java.lang.Thread"
>
<!--- start of loop --->
<cfloop query="recordset1">
<!--- output --->
<table width="922" border="0" cellspacing="3" cellpadding="2">
<!--DWLayoutTable-->
<tr>
<td width="70" height="382"> </td>
<td width="570" valign="top"><img src="<cfoutput>#Recordset1.normal_image#</cfoutput>"></td>
<td width="258"> </td>
</tr>
<tr>
<td height="54"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!---delay component --->
<cfset delay = 500>
<cfflush>
<cfset thread.sleep(#DELAY#)>
<!---end of loop --->
</cfloop>
Problem
Can not manage to have only one image at a time displayed on the page. I get all the images, dispayed one below the other - appearing one after the other with the delay interval between them.
Perhaps I am tyring to do the impossible ?
<!--- start of delaycomponent--->
<cfset thread= CreateObject("java", "java.lang.Thread"
<!--- start of loop --->
<cfloop query="recordset1">
<!--- output --->
<table width="922" border="0" cellspacing="3" cellpadding="2">
<!--DWLayoutTable-->
<tr>
<td width="70" height="382"> </td>
<td width="570" valign="top"><img src="<cfoutput>#Recordset1.normal_image#</cfoutput>"></td>
<td width="258"> </td>
</tr>
<tr>
<td height="54"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!---delay component --->
<cfset delay = 500>
<cfflush>
<cfset thread.sleep(#DELAY#)>
<!---end of loop --->
</cfloop>