EasyCFM.COM ColdFusion Forums / Flex Development / loading video from database in flex

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: loading video from database in flex

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

zionist
07-29-2008 @ 8:30 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 94
Joined: Feb 2007

hi guyz i have video clips in a folder on my cf server and a column in my access database and i have tried to load the clips dynamically in my flex app when i click on the datagrid but nothing shows up. is it the same as loading images? here is my query that gets data from the db into flex

<cffunction name="getCountries" output="false" access="remote" returntype="query">
     <cfset var countries= "">
     <cfset var result= "">               
          <cfquery name="countries" datasource="info">
               select *          
               FROM country                              
          </cfquery>
          <cfquery dbtype="query" name="results">
          select ctry_name, ctry_id AS data
          FROM countries
          ORDER BY ctry_name
          </cfquery>
          <cfreturn results>
     </cffunction>
     
     <!--- Get Homes --->
     <cffunction name="load" output="false" access="remote" returntype="query">
     <cfargument name="ctry_id" required="true" type="numeric" default="0">
     <cfset var homes= "">
     <cfset var result= "">          
          <cfquery name="homes" datasource="info">
               select      id, ctryid_home, city, location, price, type,
                         square_feet, date_listed, bedrooms, bathrooms, status,
                         pool, backyard, closets, garage, sale,
                         rent, image, latitude, longtitude, description, tour
                         
               FROM             homes
               WHERE          ctryid_home = <cfqueryparam value="#arguments.ctry_id#" cfsqltype="cf_sql_integer" />                                                        
          </cfquery>
          <cfquery dbtype="query" name="results">
          select           id, ctryid_home, city, location, price, type,
                         square_feet, date_listed, bedrooms, bathrooms, status,
                         pool, backyard, closets, garage, sale,
                         rent, image, latitude, longtitude, description, 'http://localhost:8500/iestate/images/video/' + tour AS image
          FROM homes          
          </cfquery>
          <cfreturn results>
     </cffunction>

this is the link that i pass on to the flvplayer to play the clips as someone clicks on tha datagrid

source= "dgrid.selectedItem.image"

kicker
07-29-2008 @ 9:05 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 717
Joined: Oct 2004

I would do some debugging here. Add an alert box right before the value is passed to your flv player. Just to check the url is being passed correctly. So do this:

Alert.show(dgrid.selectedItem.image.toString());

Also you may want to make sure that you have your FLV player set to autoplay.

You may also want to add some event listeners to further debug it to see exactly which stage of the process is messing up. The datagrid click, the load, the play, etc.


Craig


Website Designed and Developed by Pablo Varando.