getting a datagrid to display data with CF & remoting

View: New views
10 Messages — Rating Filter:   Alert me  

getting a datagrid to display data with CF & remoting

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,
I finally got flash a ColdFusion to talk to each other, and now I am trying to query a database and display those results in a AS 3 datagrid in flash.

Can somebody help me out with this, or if you know a blog or tutorial that might help me I would really appreciate it. I found some using php, but I am using cfcs.

Thanks,
John

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:288
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: getting a datagrid to display data with CF & remoting

by Chris Velevitch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Do a search for "flash remoting coldfusion tutorials" on the Adobe
Developer Connection website [1].

[1] http://www.adobe.com/devnet



Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
April meeting: Mate Application Framework
Date: Mon 27th April 6pm for 6:30 start
Details and RSVP on http://groups.adobe.com/posts/353d7bc050

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:289
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: getting a datagrid to display data with CF & remoting

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Chris,
Thanks for getting back to me.
I have searched adobe, as well as google and blogs that I know, but I can't find anything related to AS 3.
All the resources on Adobe is for AS 2.

Thanks,
John

 




________________________________
From: Chris Velevitch <chris.velevitch@...>
To: cf-flash <cf-flash@...>
Sent: Friday, April 3, 2009 6:11:44 PM
Subject: Re: getting a datagrid to display data with CF & remoting


Do a search for "flash remoting coldfusion tutorials" on the Adobe
Developer Connection website [1].

[1] http://www.adobe.com/devnet



Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
April meeting: Mate Application Framework
Date: Mon 27th April 6pm for 6:30 start
Details and RSVP on http://groups.adobe.com/posts/353d7bc050



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:290
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: getting a datagrid to display data with CF & remoting

by Chris Velevitch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


For AS3 look at flash.net.NetConnection and any articles around it.


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
April meeting: Mate Application Framework
Date: Mon 27th April 6pm for 6:30 start
Details and RSVP on http://groups.adobe.com/posts/353d7bc050

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:291
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Parent Message unknown Re: getting a datagrid to display data with CF & remoting

by Tyron Foston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


In as2, you could pass a recordset back to the flash but in as3, the recordset object is only for adobe air. So when you pass a recordset back into as3, it comes into the flash player as an object instead of a recordset, so you'll have to loop through the object to get the data


--- On Fri, 4/3/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Friday, April 3, 2009, 10:38 PM


Hi,
I finally got flash a ColdFusion to talk to each other, and now I am trying to query a database and display those results in a AS 3 datagrid in flash.

Can somebody help me out with this, or if you know a blog or tutorial that might help me I would really appreciate it. I found some using php, but I am using cfcs.

Thanks,
John



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:292
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: getting a datagrid to display data with CF & remoting

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Chris,
thanks`-`

 




________________________________
From: Chris Velevitch <chris.velevitch@...>
To: cf-flash <cf-flash@...>
Sent: Friday, April 3, 2009 9:27:28 PM
Subject: Re: getting a datagrid to display data with CF & remoting


For AS3 look at flash.net.NetConnection and any articles around it.


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
April meeting: Mate Application Framework
Date: Mon 27th April 6pm for 6:30 start
Details and RSVP on http://groups.adobe.com/posts/353d7bc050



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:293
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: getting a datagrid to display data with CF & remoting

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Tyron,
thanks so much for your help`-`
I found an example on flash-db. Seems like there is an error in there code, as I get "TypeError: Error #1034: Type Coercion failed: cannot convert Object@d7fe101 to flash.events.Event."

Is this because of not looping through the object to get the data?
Thanks again for your help,
John


 




________________________________
From: Tyron Foston <tfoston@...>
To: cf-flash <cf-flash@...>
Sent: Saturday, April 4, 2009 4:21:02 AM
Subject: Re: getting a datagrid to display data with CF & remoting


In as2, you could pass a recordset back to the flash but in as3, the recordset object is only for adobe air. So when you pass a recordset back into as3, it comes into the flash player as an object instead of a recordset, so you'll have to loop through the object to get the data


--- On Fri, 4/3/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Friday, April 3, 2009, 10:38 PM


Hi,
I finally got flash a ColdFusion to talk to each other, and now I am trying to query a database and display those results in a AS 3 datagrid in flash.

Can somebody help me out with this, or if you know a blog or tutorial that might help me I would really appreciate it. I found some using php, but I am using cfcs.

Thanks,
John





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:294
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Parent Message unknown Re: getting a datagrid to display data with CF & remoting

by Tyron Foston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


How To Use the AS3 FlashRemoting Class

1) Create an instance of the FlashRemoting class
   -The constructor takes the location of the flash
   remoting servcie as its only parameter

2) Set a "onLoad" handler to handle the results coming
   from the server

3) Use the "load" function to send a flash remtoing call
   to the coldfusion server. This takes 2 parameters
   a) the cfc and function you want to call
   b) parameter. This only takes 1 parameter. If you want
      to pass multiple variables, place then into an object
      and pass the object

4) There is a function called "toQuery" that takes a recordset
   from coldfusion and turns it into an object with index arrays
  


Working Example
---------------------------------------------------------------
//Create an indexed array with values, this will be the parameters passed to the coldfusion server
var array = new Array()
array[0] = 'car'
array[1] = 'boat'
array[2] = 'ship'

//Create new instance of the FlashRemoting Class
var fr:FlashRemoting = new FlashRemoting('http://www.mydomain.com/flashservices/gateway')

//Set the onLoad handler for when the flash gets the server response
fr.onLoad = function(obj){
   
    //I'm expecting a query, so use the "toQuery" function
    var myQuery = this.toQuery(obj)
   
}

//Call the method on the remoting cfc (relative to the gateway url)
fr.load('nameOfCFC.nameOfFunction', array)

--- On Sat, 4/4/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: Re: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Saturday, April 4, 2009, 10:37 PM


Hi Tyron,
thanks so much for your help`-`
I found an example on flash-db. Seems like there is an error in there code, as I get "TypeError: Error #1034: Type Coercion failed: cannot convert Object@d7fe101 to flash.events.Event."

Is this because of not looping through the object to get the data?
Thanks again for your help,
John


 




________________________________
From: Tyron Foston <tfoston@...>
To: cf-flash <cf-flash@...>
Sent: Saturday, April 4, 2009 4:21:02 AM
Subject: Re: getting a datagrid to display data with CF & remoting


In as2, you could pass a recordset back to the flash but in as3, the recordset object is only for adobe air. So when you pass a recordset back into as3, it comes into the flash player as an object instead of a recordset, so you'll have to loop through the object to get the data


--- On Fri, 4/3/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Friday, April 3, 2009, 10:38 PM


Hi,
I finally got flash a ColdFusion to talk to each other, and now I am trying to query a database and display those results in a AS 3 datagrid in flash.

Can somebody help me out with this, or if you know a blog or tutorial that might help me I would really appreciate it. I found some using php, but I am using cfcs.

Thanks,
John







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:295
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Parent Message unknown Re: getting a datagrid to display data with CF & remoting

by Tyron Foston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Attached is the link to the flashremoting script if you didn't get the attachment in the email

http://test.skyxl.com/actionscript/flashremoting.zip

I hope this provides some benefit to someone!

--- On Sat, 4/4/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: Re: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Saturday, April 4, 2009, 10:37 PM


Hi Tyron,
thanks so much for your help`-`
I found an example on flash-db. Seems like there is an error in there code, as I get "TypeError: Error #1034: Type Coercion failed: cannot convert Object@d7fe101 to flash.events.Event."

Is this because of not looping through the object to get the data?
Thanks again for your help,
John


 




________________________________
From: Tyron Foston <tfoston@...>
To: cf-flash <cf-flash@...>
Sent: Saturday, April 4, 2009 4:21:02 AM
Subject: Re: getting a datagrid to display data with CF & remoting


In as2, you could pass a recordset back to the flash but in as3, the recordset object is only for adobe air. So when you pass a recordset back into as3, it comes into the flash player as an object instead of a recordset, so you'll have to loop through the object to get the data


--- On Fri, 4/3/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Friday, April 3, 2009, 10:38 PM


Hi,
I finally got flash a ColdFusion to talk to each other, and now I am trying to query a database and display those results in a AS 3 datagrid in flash.

Can somebody help me out with this, or if you know a blog or tutorial that might help me I would really appreciate it. I found some using php, but I am using cfcs.

Thanks,
John







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:296
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: getting a datagrid to display data with CF & remoting

by John Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Tyron,
Thank you so much I finally got a chance to go over this tonight.
I get a undefined in the output window. i will be playing with this tonight, as I really want to start getting into flash remoting with AS 3!

I will post a blog about this so you see the error I get with my cfc to see if I am really missing something.
http://blog.meleana.info/?p=361

(if you don't want this on my blog I will remove it)

By the way, Could I get you to put together a flash remoting with coldfusion presentation for my flash user group here in Hawaii?
by group:
http://groups.adobe.com/groups/f2c9628980/summary

Thanks so much,
John

 




________________________________
From: Tyron Foston <tfoston@...>
To: cf-flash <cf-flash@...>
Sent: Monday, April 6, 2009 1:10:43 PM
Subject: Re: getting a datagrid to display data with CF & remoting


Attached is the link to the flashremoting script if you didn't get the attachment in the email

http://test.skyxl.com/actionscript/flashremoting.zip

I hope this provides some benefit to someone!

--- On Sat, 4/4/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: Re: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Saturday, April 4, 2009, 10:37 PM


Hi Tyron,
thanks so much for your help`-`
I found an example on flash-db. Seems like there is an error in there code, as I get "TypeError: Error #1034: Type Coercion failed: cannot convert Object@d7fe101 to flash.events.Event."

Is this because of not looping through the object to get the data?
Thanks again for your help,
John







________________________________
From: Tyron Foston <tfoston@...>
To: cf-flash <cf-flash@...>
Sent: Saturday, April 4, 2009 4:21:02 AM
Subject: Re: getting a datagrid to display data with CF & remoting


In as2, you could pass a recordset back to the flash but in as3, the recordset object is only for adobe air. So when you pass a recordset back into as3, it comes into the flash player as an object instead of a recordset, so you'll have to loop through the object to get the data


--- On Fri, 4/3/09, John Barrett <barrjohnm@...> wrote:

From: John Barrett <barrjohnm@...>
Subject: getting a datagrid to display data with CF & remoting
To: "cf-flash" <cf-flash@...>
Date: Friday, April 3, 2009, 10:38 PM


Hi,
I finally got flash a ColdFusion to talk to each other, and now I am trying to query a database and display those results in a AS 3 datagrid in flash.

Can somebody help me out with this, or if you know a blog or tutorial that might help me I would really appreciate it. I found some using php, but I am using cfcs.

Thanks,
John









~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/cf-flash/message.cfm/messageid:297
Subscription: http://www.houseoffusion.com/groups/cf-flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30