Question

Im using youtube api (via flash builder / AS3) and loading video data (title, description, id, etc.) successfully using the following:

thistitle = myJSONdata.feed.entry[thiscount].title.$t;
thisdesc = myJSONdata.feed.entry[thiscount].media$group.media$description.$t;
thislink = myJSONdata.feed.entry[thiscount].id.$t;
thisimg = myJSONdata.feed.entry[thiscount].id.$t;

but when it comes to loading the thumbnail image which is at:

feed
 - entry
   - entry
     - media$group
        -media$thumbnail
          - 0
            -url

I've tried virtually everything I can think of and searches yield no results for json speciifically... heres what I tried last:

thisimg = myJSONdata.feed.entry[thiscount].media$group.media$thumbnail.Object(0).url;

how do I access this particular element of the json data with actionscript and flash builder?

Was it helpful?

Solution

thisimg = myJSONdata.feed.entry[thiscount].media$group.media$thumbnail[0].url;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top