I am using Flash 8 and am using Flash Remoting to call a component from
Coldfusion MX7 to display my news articles.
I'm trying to display a list of news articles. I have the list displaying
but can't seem to figure out the actionscript to get rid of the GMT time in
my date field. I am calling the record "newsdate" and putting it in the
textfield called prodPrice. Right now it displays as Fri Jan 20 00:00:00
GMT-0600 2006 and I would like it to just display as Jan 20, 2006.
I'm not really strong on the actionscript so any help anyone could give me
would be very much appreciated!
Here's the function from coldfusion:
<!- get all records associated with the selected product ID ->
<cffunction name="getProductsDetails" access="remote" returnType="query"
output="true">
<cfargument name="newsID" type="numeric">
<cfquery name="productDetailQuery" datasource="MASEnews">
SELECT * FROM news WHERE newsID = #newsID#
</cfquery>
<cfreturn productDetailQuery >
</cffunction>
Here's the actionscript calling the function:
function getProductsDetails (newsID)
{
var productsDetails_pc : PendingCall =
unleashedService.getProductsDetails (newsID); productsDetails_pc.responder =
new RelayResponder (this, "getProductsDetails_Result",
"getProductsDetails_Fault");
}
function getProductsDetails_Result (re : ResultEvent)
{
this.prodTitle.text = re.result.items[0].title;
this.prodPrice.text = re.result.items[0].newsdate;
this.prodDesc.text = re.result.items[0].article;
// var myImage:String = "images/" + re.result.items[0].prodImage +
".jpg";
// this.imageHolder.contentPath = myImage;
}
function getProductsDetails_Fault (fault:FaultEvent):Void
{
trace ("error");
}
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com