mercredi 30 septembre 2015

Flash VPAID AdParameters error: "Error parsing the creative data JSON -> [object Object]"

I am using this tag to a VAST xml for a test video advertisement: http://ift.tt/1N27vBi

When I put this in a VAST validator (for example this one: http://ift.tt/1WyVNzL) it works fine.

But now I am using actionscript 3 to load the swf and start it playing according to the VPAID api.

I am parsing out the AdParameters value and saving it:

var paramsXml:XML = childXml.valueOf()
var creativeData:Object = { 'AdParameters': paramsXml };
_main.creativeData = String(creativeData);

I've also tried making paramsXml a String and other types but nothing works for me. I then go to put this in the initAd() function of the VPAID ad.

_vpaidWrapper.initAd(_main.adWidth, _main.adHeight, _main._viewMode, _main._desiredBitrate, _main._creativeData, _main._environmentVars);

But every time I get this error: "Error parsing the creative data JSON -> [object Object]"

Can anyone see what I'm doing wrong and how I can correctly pass the AdParameters to the VPAID ad?

Thanks.

1 commentaire:

  1. Dude. what the hell. I posted this on stack overflow a week ago. I now see it copied all over the web but still nobody has an answer!!

    RépondreSupprimer