ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Ten Tips for Building a Flash Remoting Application
Subject:   Images? Movies?
Date:   2003-10-25 10:16:20
From:   anonymous2
Response to: Images? Movies?

Just use LoadMovie. That works with images. If your images are stored in a database, use a server-side page to pass the image:


this.createEmptyMovieClip("myImage",4);
myImage.loadMovie("myImagePage.cfm?id=" + someId);


In CF:


<cfparam name="url.id" default="0" type="number">
<CFTRY>
<CFQUERY NAME="rs" DATASOURCE="myimages">
SELECT imagename FROM mytable WHERE imageid = #url.id#
</CFQUERY>
<!--- ///////////////////////////////////////////////////// --->
<!--- // Force the browser to download the image file. //--->
<!--- ///////////////////////////////////////////////////// --->
<CFCONTENT TYPE="image/gif" FILE="d:\webroot\images\#rs.imagename#"><cfabort>
<CFCATCH>
<CFCONTENT TYPE="image/gif" FILE="d:\webroot\images\blank.gif"><cfabort>
</CFCATCH>
</CFTRY>


1 to 1 of 1
1 to 1 of 1