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>
|
Showing messages 1 through 1 of 1.
-
Images? Movies?
2003-10-30 01:11:28
xeal
[Reply | View]
"You CANNOT send images/movies/sound via Flash Remoting!"
So your loadMovie thing does NOT make any sense!
Xeal
P.S. I didn't think there can be something worse than VB ... until I saw the first piece of CF "code" :)))