0

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?

tamak
  • 1,541
  • 2
  • 19
  • 39

1 Answers1

2

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

Jiri Tobisek
  • 579
  • 3
  • 5