Displaying a .SWF from an MS Access database in Classic ASP

I want to display a .swf file on a web page using an access database, this holds the swf file name and path. The images swf and flv are held in a directory.

For some reason swf files do not  show using a recordset, jpgs and gifs are OK but the swf shows nothing on the page, not even a red X

I am using DW CS3
Any Ideas please?
Thanks
John
johnhardyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineNo oneCommented:
Hi John,

You need to echo the value from the recordset in the javascript call to AC_RunActiveContent.  It can be a little tricky to do this depending on how the path is stored in the Access file.

What you should do is embed the file normally and look to see how DW writes the call to the video file.  If your path in the database is different from what DW expects, you need to alter the database.  Then, just replace the static path and filename with the recordset value.
0
johnhardyAuthor Commented:
Thanks Jason
Will come back on this one soon
0
johnhardyAuthor Commented:
Hi Jason
At last I have managed to have a look at this method.

I dragged the .swf file on to the page which give me the code that follows:
I can see four references to the image in the recordset ImagesUpload/IMGP1208_384K


<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','320','height','240','src','ImagesUpload/IMGP1208_384K','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','ImagesUpload/IMGP1208_384K' ); //end AC code
</script>

<noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="320" height="240">
          <param name="movie" value="ImagesUpload/IMGP1208_384K.swf" />
          <param name="quality" value="high" />
          <embed src="ImagesUpload/IMGP1208_384K.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="320" height="240"></embed>
        </object></noscript



If I substitute the first image ref with <%=(rs.Fields.Item("MyImage1Dir").Value)%> the vidoe shows OK.
If I substitute the second image reference with <%=(rs.Fields.Item("MyImage1Dir").Value)%> the video does not show.

Am I on the right track?
Thanks
John
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

johnhardyAuthor Commented:
Hi
I further noticed that I could change reference to the images Numbers 1, 3 and 4 but if I change

'movie','ImagesUpload/IMGP1208_384K'

 to 'movie','<%=(rs.Fields.Item("MyImage1Dir").Value)%>' the image does not show
0
Jason C. LevineNo oneCommented:
Okay, let me work backwards a little bit.

This part of the code:

noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="320" height="240">
          <param name="movie" value="ImagesUpload/IMGP1208_384K.swf" />
          <param name="quality" value="high" />
          <embed src="ImagesUpload/IMGP1208_384K.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="320" height="240"></embed>
        </object></noscript>

Can actually be removed.  The noscript section is used for browsers with the javascript turned off and doesn't affect 99% of your visitors.  Removing it simplifies the debugging.

So that leaves us with this code:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','320','height','240','src','ImagesUpload/IMGP1208_384K','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','ImagesUpload/IMGP1208_384K' ); //end AC code
</script>

Where the critical part is:

'src','ImagesUpload/IMGP1208_384K'

In theory, all you need to do is replace the 'ImagesUpload/IMGP1208_384K' with '<%=(rs.Fields.Item("MyImage1Dir").Value)%>' and when the page loads, the ASP evaluates and puts the correct call to the Flash file in there.

Remember, the value in the DB needs to match what DW printed initially.  You need:

IMGP1208_384K

not

IMGP1208_384K.swf

J
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason C. LevineNo oneCommented:
Ah, and also you need to replace:

'movie','ImagesUpload/IMGP1208_384K'

with

'movie','<%=(rs.Fields.Item("MyImage1Dir").Value)%>'
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Graphics Software

From novice to tech pro — start learning today.