Active Slideshow Pro Support Product Page

This topic was archived

Dynamic Slideshow

Asked 17 Jan 2006 01:49:14
1
has this question
17 Jan 2006 01:49:14 Wim Conix posted:
Hi,

I just purchased Active Slideshow Pro and am trying to create my first dynamic slideshow.
I created a recordset with filename field which points to the images on the server.
This works fine for regular resultpages, but not in the slideshow.
The images are located on a different virtual folder (IIS 6.0) than the site itself.
Filename-field is relative to this virtual folder, e.g. "/ib_img_usr_d/userid/galleryid/image.jpg".
All files are uploaded to the server (asp, swf, xml).

Any idea ??

Thanks,

Wim

My XML-file :

<?xml version="1.0" encoding="iso-8859-1"?>
<slideshow loop="true" stream="true">
<slide url="<%=(Recordset1.Fields.Item("Filename".Value)%>" duration="3" fill="center" background="0x000000">
<transition effect="fade" position="0" easing="Linear" duration="2" />
</slide>
</slideshow>

My ASP-file :

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/conn_photodat_sql.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
*****
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

Replies

Replied 17 Jan 2006 02:20:48
17 Jan 2006 02:20:48 Wim Conix replied:
Hi,

Forgot to give you this :

URL where the images are located :

fbwim.dnsalias.org:1966/ib_img_usr_d/1082500263/1986721521/ibbwls3.jpg

In the filename-field only /ib_img_usr_d/1082500263/1986721521/ibbwls3.jpg

Maybe in the url= in the xml I have to give the serveraddress as well, but what's the correct syntax to do so ?

I tried this, but seems not to work :

<slide url="<%="fbwim.dnsalias.org:1966/" & (Recordset1.Fields.Item("Filename".Value)%>" duration="3" fill="center" background="0x000000">

Thanks for help,

Wim
Replied 18 Jan 2006 00:28:20
18 Jan 2006 00:28:20 George Petrov replied:
Hi Wim,

IN the flashvars parameter of the slideshow flash object there is the name of the xml file, like:
<param name="FlashVars" value="xmlFile=results_all_12.xml...

you should entere there instead of a static xml file - the name of your asp page that generates a dynamic xml output. So enter something like:
<param name="FlashVars" value="xmlFile=results_all_12.asp...

and make sure that when you run this asp file directly it produces a well formatted xml output that also is needed by the slideshow.

You can find out xml format reference in the included extension online help - which is found under the extension dialog help button.

Greetings,
George


--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------
Replied 18 Jan 2006 06:23:37
18 Jan 2006 06:23:37 Andrew Stubblefield replied:
George,

Wim and I have been exchanging email to see if together we could get this figured out.

I have tried creating an .asp page, stunhosting.com/aspxml.asp, copied the page from the browser and inserted it into an xml page, stunhosting.com/from_asp.xml to check the xml formatting, comes back without errors.

Then I changed the FlashVars in the page with the slide show to,
param name="FlashVars" value="xmlFile=aspxml.asp&….

As soon as I try to load the page in IE & FoxFire it locks up there must be something I am missing in formatting the aspxml.asp page.

Any and all help on this would help Wim and me greatly.

Also, can after we get the format of the xmlFile=aspxml.asp correct can it also be dynamic, param name="FlashVars" value="xmlFile=aspxml.asp?ProductsID=<%=(rsPets_test.Fields.Item("ProductsID".Value)%>&….

Drew
Replied 18 Jan 2006 14:50:44
18 Jan 2006 14:50:44 George Petrov replied:
Hi Drew,

I see that the asp page produces a good xml so that is ok.

What I see further is that you have entered extra parameters on the asp page, their separators needs to be encoded (the ? and & so replace the ? with %3F and if you have more parameters then also the & to %26

So:
value="xmlFile=aspxml.asp?ProductsID=<%=(rsPets_test.Fields.Item("ProductsID".Value)%>&var2=haha&preloaderBackColor=....

should become:
value="xmlFile=aspxml.asp%3FProductsID=<%=(rsPets_test.Fields.Item("ProductsID".Value)%>%26var2=haha&preloaderBackColor=....

(note in the example above I just added var2 to illustrate passing more than 1 parameter to the xmlFile url)

also make sure you do the same in the embed tag flashvars attribute.

Hope this is clear - otherwise send me also a live url of the page where the slideshow is on

Greetings,
george

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------
Replied 18 Jan 2006 18:44:39
18 Jan 2006 18:44:39 Andrew Stubblefield replied:
Thanks George,

The asp page looks good, but it still won't work, i found out that we are to start of the page add this line of code

<% response.ContentType = "text/xml" %>, going to www.w3schools.com/xml/xml_server.asp when we do that it does turn to XML, very bad XML, example: stunhosting.com/aspxml_2.asp

I further found out that all the HTML Elements need to be removed from the page, to look something like this, that I found on W3schools site:

<%
response.ContentType = "text/xml"
set conn=Server.CreateObject("ADODB.Connection"
conn.provider="Microsoft.Jet.OLEDB.4.0;"
conn.open server.mappath("/db/database.mdb"
sql="select fname,lname from tblGuestBook"
set rs=Conn.Execute(sql)rs.MoveFirst()response.write("<?xml version='1.0' encoding='ISO-8859-1'?>"
response.write("<guestbook>"
while (not rs.EOF)
response.write("<guest>"
response.write("<fname>" & rs("fname" & "</fname>"
response.write("<lname>" & rs("lname" & "</lname>"
response.write("</guest>"
rs.MoveNext()
wendrs.close()
conn.close()
response.write("</guestbook>"
%>

Now I am more confused than before, but here is what I came up with:

<%
response.ContentType = "text/xml"

Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; Initial
Catalog=BestFriends; User ID=xxxx; Password=xxxxxx"
objConn.Close
Set objConn = Nothing
sql="SELECT ProductType, ProdImage FROM BestFriends.Products"
set rs=Conn.Execute(sql)

rs.MoveFirst()response.write("<?xml version='1.0' encoding='ISO-8859-1'?>"
response.write("<slideshow loop="true" stream="true">"
while (not rs.EOF)
response.write("<slide>"
response.write("<slide url="slide/ & rs("ProdImage" & duration="3" fill="squeeze" background="0x000000">"
response.write("<transition effect="fade" position="0" easing="Linear" duration="2" />"
response.write("<kenburns panstart="9" panend="9" zoomstart="1.3" zoomend="1.3" />"
response.write("</slide>"
rs.MoveNext()
wendrs.close()
conn.close()
response.write("</slideshow>"
%>

Right now an extension that created XML in asp would be great.

Drew
Replied 18 Jan 2006 20:18:09
18 Jan 2006 20:18:09 George Petrov replied:
Hi Drew,

Yes indeed - creating an xml output is easy but you need to follow a few rules.

1. you need to strip all html code out - the page should generate just xml
2. add an xml header, like

response.ContentType="text/xml"
response.Write("<?xml version='1.0' encoding='ISO-8859-1'?>"

and then just response.write your xml tags.

So your last peace of code seems fine to me - only you need to eascape the quotes:
response.write("<slideshow loop="true" stream="true">"

should become:
response.write("<slideshow loop=""true"" stream=""true"">"

or you can wtite the xml just like html tags:

<pre id=code><font face=courier size=2 id=code>
&lt;%
response.ContentType = "text/xml"

Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; Initial
Catalog=BestFriends; User ID=xxxxx; Password=xxxxx"
objConn.Close
Set objConn = Nothing
sql="SELECT ProductType, ProdImage FROM BestFriends.Products"
set rs=Conn.Execute(sql)

rs.MoveFirst()
%&gt;
&lt;?xml version='1.0' encoding='ISO-8859-1'?&gt;
&lt;slideshow loop="true" stream="true"&gt;
&lt;%
while (not rs.EOF)
%&gt;
&lt;slide&gt;
&lt;slide url="slide/&lt;%=rs("ProdImage"%&gt;" duration="3" fill="squeeze" background="0x000000"&gt;
&lt;transition effect="fade" position="0" easing="Linear" duration="2" /&gt;
&lt;kenburns panstart="9" panend="9" zoomstart="1.3" zoomend="1.3" /&gt;
&lt;/slide&gt;
&lt;%
rs.MoveNext()
wendrs.close()
conn.close()
%&gt;
&lt;/slideshow&gt;
</font id=code></pre id=code>

George

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------
Replied 18 Jan 2006 21:05:00
18 Jan 2006 21:05:00 Andrew Stubblefield replied:
George,

I have tried it the pages both ways and end up with the errors:

XML document must have a top level element. Error processing resource 'stunhosting.com/aspxml_4.asp'. (This is code you wrote and I just added it to the page) stunhosting.com/aspxml_4.asp

Invalid at the top level of the document. Error processing resource 'stunhosting.com/aspxml_3.asp'.
(This one is from the following) stunhosting.com/aspxml_3.asp

&lt;%
response.ContentType = "text/xml"

Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; Initial
Catalog=BestFriends; User ID=xxxx; Password=xxxxx"
objConn.Close
Set objConn = Nothing
sql="SELECT ProductType, ProdImage FROM BestFriends.Products"
set rs=Conn.Execute(sql)

rs.MoveFirst()
response.write("&lt;?xml version=""1.0"" encoding=""ISO-8859-1""?&gt;"
response.write("&lt;slideshow loop=""true"" stream=""true""&gt;"
while (not rs.EOF)
response.write("&lt;slide&gt;"
response.write("&lt;slide url=""slide/ & rs(""ProdImage"" &"" duration=""3"" fill=""squeeze"" background=""0x000000v""&gt;"
response.write("&lt;transition effect=""fade"" position=""0"" easing=""Linear"" duration=""2"" /&gt;"
response.write("&lt;kenburns panstart=""9"" panend=""9"" zoomstart=""1.3"" zoomend=""1.3"" /&gt;"
response.write("&lt;/slide&gt;"
rs.MoveNext()
wendrs.close()
conn.close()
response.write("&lt;/slideshow&gt;"
%&gt;

The only thing I know right now is that this is going to be great once it is runnig, right now I am baffeled.

Replied 18 Jan 2006 21:23:35
18 Jan 2006 21:23:35 George Petrov replied:
Hi Drew,

You just have some asp code errors... the wend is stuck together with the next statement...

wendrs.close()

should be:
wend
rs.close()

George


--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------
Replied 18 Jan 2006 21:47:40
18 Jan 2006 21:47:40 Andrew Stubblefield replied:
George, I'm sorry for all this, but I still can't get any thing to show, here is te code from the 2 different pages that we have been discussing, I'll change database name and password after.

stunhosting.com/aspxml_3.asp

&lt;%
response.ContentType = "text/xml"

Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; Initial
Catalog=BestFriends; User ID=xxxxx; Password=xxxx"
objConn.Close
Set objConn = Nothing
sql="SELECT ProductType, ProdImage FROM BestFriends.Products"
set rs=Conn.Execute(sql)

rs.MoveFirst()
response.write("&lt;?xml version=""1.0"" encoding=""ISO-8859-1""?&gt;"
response.write("&lt;slideshow loop=""true"" stream=""true""&gt;"
while (not rs.EOF)
response.write("&lt;slide&gt;"
response.write("&lt;slide url=""slide/ & rs(""ProdImage"" &"" duration=""3"" fill=""squeeze"" background=""0x000000v""&gt;"
response.write("&lt;transition effect=""fade"" position=""0"" easing=""Linear"" duration=""2"" /&gt;"
response.write("&lt;kenburns panstart=""9"" panend=""9"" zoomstart=""1.3"" zoomend=""1.3"" /&gt;"
response.write("&lt;/slide&gt;"
rs.MoveNext()
wend
rs.close()
conn.close()
response.write("&lt;/slideshow&gt;"
%&gt;


stunhosting.com/aspxml_4.asp


&lt;%
response.ContentType = "text/xml"

Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; InitialCatalog=BestFriends; User ID=xxxx; Password=xxxxx"
objConn.Close
Set objConn = Nothingsql="SELECT ProductType, ProdImage FROM BestFriends.Products"
set rs=Conn.Execute(sql)
rs.MoveFirst()
%&gt;
&lt;?xml version='1.0' encoding='ISO-8859-1'?&gt;
&lt;slideshow loop="true" stream="true"&gt;
&lt;%
while (not rs.EOF)
%&gt;
&lt;slide&gt;
&lt;slide url="slide/&lt;%=rs("ProdImage"%&gt;" duration="3" fill="squeeze" background="0x000000"&gt;
&lt;transition effect="fade" position="0" easing="Linear" duration="2" /&gt;
&lt;kenburns panstart="9" panend="9" zoomstart="1.3" zoomend="1.3" /&gt;
&lt;/slide&gt;
&lt;%
rs.MoveNext()
wend
rs.close()
conn.close()
%&gt;
&lt;/slideshow&gt;


Here is the connection string, that I have a connection to the DB:
MM_BestFriends_STRING = "Provider=SQLOLEDB.1;Password=xxxx;User ID=xxxx;Initial Catalog=BestFriends;Data Source=mssql.stunhosting.com"

I keep looking at it and I can't figure out what is wrong, I keep expecting to see an XML page,

I really appericate everthing.

Drew


Replied 19 Jan 2006 00:00:08
19 Jan 2006 00:00:08 George Petrov replied:
Hi Drew,

In the first source code you need to have the connection string as one line, so change:

objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; Initial
Catalog=BestFriends; User ID=xxxx; Password=xxxx"

to
objConn.Open "Provider=SQLOLEDB; Data Source=mssql.stunhosting.com; Initial Catalog=BestFriends; User ID=xxxx; Password=xxxx"

I don't see the error in the second code block but there must be other typo error as well

Seems you really need a simple - hot to generate a xml file in DW tutorial or so.
Actually if you use all the standard DW recordset, repeat region and dynamic data - all this hand coding is totally unnecessary...

George

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------
Replied 19 Jan 2006 01:46:53
19 Jan 2006 01:46:53 Wim Conix replied:
George,

Thanks for all replies, but for newbies to xml like me it's far too difficult.
A simple "step-by-step" tutorial with an example on how to create a first, simple dynamic slideshow would be more than welcome !

Thanks,

Wim
Replied 19 Jan 2006 02:46:32
19 Jan 2006 02:46:32 Andrew Stubblefield replied:
George, do you have a sample page so that I can see how you use the Dreamweaver RecordSet and repete region, everytime I try that and then remove all the html elements it breaks.

If there was just the code, that was set-up Using Dreamweaver RecordSets and Repet Region, that I could copy or download I could then take something that works and work backword engineer the page.

If we had that I would get us off your back on this subject.

Even with the change in the connection string I still cant get the page to display.


Thanks A Lot

Drew

Replied 19 Jan 2006 06:22:24
19 Jan 2006 06:22:24 Andrew Stubblefield replied:
George,

By doggies I got and I sent the instructions to Wim, if he has no problems with files I will send them to you so that you can post them and keep customers like us off your back and you can write me an extension that gets customers to pay on time.

Here are the links to the pages stunhosting.com/aspxml_2.asp & stunhosting.com/slide_test.asp

Thanks for all your time and help,

One last question the Active Photo Viewer pulled can be pulled from a recordset.

Have a great one,

Drew

Edited by - dstubblefield on 19 Jan 2006 06:24:06
Replied 19 Jan 2006 13:02:22
19 Jan 2006 13:02:22 George Petrov replied:
Ok Guys - seems you have trouble with all this, I've made a very easy tutorial about how it should be done.

Check it out at: www.dmxzone.com/go?11468

Let me know if it is all clear now

Greetings,
George

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------
Replied 20 Jan 2006 22:43:49
20 Jan 2006 22:43:49 Andrew Stubblefield replied:
George,

Wim and I were having trouble with displaying the SlideShow with parameters, the pages can be viewed in FireFox but not in IE as we were testing, I have tried this on 4 different PC's and results are the same.

Here links to my test:

stunhosting.com/aspxml_2.asp?ProductType=Drawings (XML)

stunhosting.com/slide_test.asp?ProductType=Drawings (Active Slide Show)

Just looks as if there is a bug with IE, I haven't tried Netscape so on them I don't know. I know Wim had already contacted you, but I just found this out.

Thanks,

Drew
Replied 20 Jan 2006 22:56:00
20 Jan 2006 22:56:00 Wim Conix replied:
Drew, George, everyone,

Just checked Netscape and this works too.
This means that there's a bug with IE only.

Bye,

Wim
Replied 20 Jan 2006 23:45:35
20 Jan 2006 23:45:35 Wim Conix replied:
Hi,

Did a few more tests on different machines and this is the result :

PC : Internet Explorer 6.0 DOESN'T WORK
FireFox & Netscape OK

Mac : Internet Explorer, Netscape, FireFox & Safari OK

Greetz,

Wim
Replied 21 Jan 2006 00:37:55
21 Jan 2006 00:37:55 George Petrov replied:
I think this is a bug in our viewer - it comes only at IE as we append an extra parameter there ...

Will fix it in the next update that will go out next week

George

--------------------------------------------------
George Petrov - Founder of the Dynamic Zones
DMXzone.com, FWzone.net, FLzone.net, CFzone.net,
DNzone.com, FlashFiles.nl
--------------------------------------------------

Reply to this topic