Running Groupon API through Flash using Actionscript 3

63 views
Skip to first unread message

Matt Pennetti

unread,
Mar 16, 2012, 3:54:07 PM3/16/12
to Groupon API Forum
I am using a package/component built by DoubleClick for Groupon. I am
calling in various variables, but I can't get the 'tags' variable to
work. I am formatting the tags call like this:
trace("tags: " + topDeal.tags[0].name);
Here is the rest of my code:


function dealsLoadedHandler(event:GrouponEvent) {
var topDeal:Deal = grouponLoader.deals[0];
var imageLoader:Loader = new Loader();
var imageUrl:URLRequest = new URLRequest(topDeal.largeImageUrl);

trace("tags: " + topDeal.tags[0].name);
trace("tipped?: " + topDeal.isTipped);
trace("sold: " + topDeal.soldQuantity);
trace("id: " + topDeal.id);
trace("division: " + topDeal.division.name);
trace("announcementTitle: " + topDeal.announcementTitle);
trace("title: " + topDeal.title);
trace("dealUrl: " + topDeal.dealUrl);
trace("largeImageUrl: " + topDeal.largeImageUrl);
trace("price: " + topDeal.options[0].price.formattedAmount.slice(0,
(topDeal.options[0].price.formattedAmount.length-3)));
trace("value: " + topDeal.options[0].value.formattedAmount.slice(0,
(topDeal.options[0].value.formattedAmount.length-3)));
trace("discount: " +
topDeal.options[0].discount.formattedAmount.slice(0,
(topDeal.options[0].discount.formattedAmount.length-3)));

imageLoader.load(imageUrl);

dealId = topDeal.id;

imageDisplay(topDeal.largeImageUrl);
}
Reply all
Reply to author
Forward
0 new messages