0 Replies Latest reply on Jan 10, 2011 8:07 AM by D_Art

    Is there a way to generate vastDocument directly from XML (string) without using VASTLoadTrait?

    D_Art

      Hi,

      I've been playing around with the VASTSample.as from OSMF 1.5 and have 2 questions.

       

      1. Main one - is there any way to generate vastDocument directly from XML (string) without using VASTLoadTrait? I mean instead of doing it as it's done in the sample:

      var loadTrait:VASTLoadTrait = new VASTLoadTrait(new VASTLoader(), new URLResource(vastURL));

      ...

      var mediaElements:Vector.<MediaElement> = generator.createMediaElements(loadTrait.vastDocument);

       

      do something like this:

       

      var myVastXml:XML = new XML("<vast xml goes here>");

      var vastDocument = new VASTDocument(myVastXml);

       

      There is VASTDocumentProcessor class in the VAST library that can do the job, but it's internal, and I don't want to mess with it.

       

      2. Another problem is that the VASTSample.as is written in pure AS3 and when I'm trying to rewrite it for Flex, I'm loosing clickability of the preroll ad. I assume it's happening because in the example the VASTSample class is extending Sprite and in my case I'm extending UIComponent. Not sure if it's the reason, but I can't find any other explanation.

      Will appreciate any suggestions.