Skip to main content
Participant
January 3, 2009
Question

Recall SWF file

  • January 3, 2009
  • 2 replies
  • 756 views
Hi all,

I am really fresh to the coldfusion community. I have very primitive knowledge of this wonderful new language.

I don't know if it is a db issue, anyway, here goes.

I am trying to set up a simple ecommerce site.

I have attached some code which does not allow me to retrieve SWF content.

It has however been getting image [jpeg] successfully.

The SWF files do upload, as i can see them in file menu.

I could really do with some input from the coldfusion faithful.

Thanks in advance for your help, and thanks for looking.
Adam
*Please note I have attached the results page code, and the searchAction for your perusal
This topic has been closed for replies.

2 replies

Inspiring
January 4, 2009
The big thing I noticed is that there is no visible use of the appropriate HTML to display a SWF (<object> and/or <embed> tags), nor is there any use of the alternate JavaScript libraries for displaying a SWF. Such libraries (e.g., SWFObject or ActiveContent) can, and probably should, be used to output SWFs over HTML markup as they get around Internet Explorer's useless and pain in the a$$ 'security' model.

Was the correct markup for displaying a SWF in the page left out of this code sample? If not, that should be what is causing valid SWF file references not to display (SWFs won't display in an <img> tag).

One thing to note from your code sample is that, if your SWFs are in the same database column as your JPEGs, you will need to check the file type (using a file extension is easiest but not always reliable) and output the appropriate markup or JavaScript for displaying SWFs on a web page.

<cfif isswf >
<object ...>
<embed.../>
</object>
(OR JavaScript to load SWF)
<cfelse>
<img src="..." />
</cfif>
Inspiring
January 4, 2009
That's a lot of code. Where is the part where you are trying to do something with the swf? What are you expecting to happen? What is actually happening?