Figured out how to display Flash swf's:
edited farcry_core/tags/farcry/download.cfm
Here are the edits so future struggles with this are painless:
<!--- work out file type --->
<cfif stFile.typeName eq "dmImage">
<cfset pos = find(".", stFile.imageFile)>
<cfset suffix = removeChars(stFile.imageFile, 1, pos)>
<cfelseif stFile.typeName eq "dmFlash">
<cfset pos = find(".", stFile.flashMovie)>
<cfset suffix = removeChars(stFile.flashMovie, 1, pos)>
<cfelse>
<cfset pos = find(".", stFile.filename)>
<cfset suffix = removeChars(stFile.filename, 1, pos)>
</cfif>
<!--- pick a mime type (if required) --->
<cfswitch expression="#lCase(suffix)#">
<cfcase value="swf">
<cfset mime = "application/x-shockwave-flash">
</cfcase>
<!--- rest of this section code --->
<!--- in the download section add this cfelseif--->
<cfelseif stFile.typeName eq "dmFlash">
<cfheader name="content-disposition" VALUE="inline;
filename=#stFile.flashMovie#">
<cfheader name="cache-control" value="">
<cfheader name="pragma" value="">
<cftry>
<cfcontent type="#mime#"
file="#application.path.defaultfilepath#/#stFile.flashMovie#"
deletefile="No" reset="Yes">
<cfcatch><!--- prevent unnecessary log entries when user cancels
download whilst it is in progress ---></cfcatch>
</cftry>
The displayDefault.cfm inside webskin/dmFlash folder can be simple (i
didn't want ny header above the swf so it does not destroy the Flash
impact):
<cfsetting enablecfoutputonly="Yes">
<cflocation
url="#application.url.webroot#/download.cfm?DownloadFile=#stobj.objectid#"
addtoken="no">
<cfmodule
template="/farcry/#application.applicationname#/webskin/includes/dmFooter.cfm">
<cfsetting enablecfoutputonly="No">
So, 2 problems remain:
1. what should I do to make the display method editable during the
include setup?
2. only the Flash swf shows in the browser, no footer. I tried all
availabe Flash swf parameters (such as scale="noscale") yet it fills up
the entire window and scales with it leaving no space for headers or
footers. Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---