0 Replies Latest reply on Jun 12, 2008 8:12 AM by kdennis4

    Displaying images from an RO call

    kdennis4 Level 1
      Hello All,

      Basically I have an RO call like this:

      <cffunction name="thisDisplayOfImages" access="remote">
      <cfargument name="thisProjectImage" type="string" required="yes">

      <cfquery name="getProjectImage" datasource="#ds#">
      Select projectImage
      From projectsImage
      Where projectReqName = '#arguments.thisProjectImage#'
      </cfquery>

      <cfset imageCFC = ListFirst(getProjectImage.projectImage)>
      <cfset img1 = "C:\\www\thisDirectory\images\projectImages\#imageCFC#">

      <cfreturn img1>
      </cffunction>

      Within my ActionScript I have a function like this:

      private function retreiveImageDisplay(event:ResultEvent):void{
      currentImageDisplay = event.result as Image;
      imageDisplay.visible = true;
      }

      Where I want it to display I have this:

      <mx:DataGrid x="23" y="191" width="663" height="50" id="projectImageList" dataProvider="{viewImageArray}" click="viewProjectImages(event);">
      <mx:columns>
      <mx:DataGridColumn headerText="Image List" dataField="projectImage"/>
      </mx:columns>
      </mx:DataGrid>
      <mx:Image x="23" y="305" width="227" height="166" id="imageDisplay" source="{currentImageDisplay}" visible="false"/>

      I am just trying to output the first image to get it to work... then I will display all. Any suggestion or examples would be greatly appreciated! Thanks!