Youtube Data API AS3 – YouTubeClient functions & associated events.

7 actionscript,as3,webservices,work,youtube  |   February 20, 2008  |     335

Hi Everyone,

Before I begin, these are past posts on the same subject:

and the API can be found here: http://code.google.com/p/as3-youtube-data-api/

Today I will describe what events are associated with each YouTubeClient function call. I will also describe which Feed / Data Object is passed inside the said event. Please note that :

  • Events are in the ca.newcommerce.youtube.events package
  • Feeds are in the ca.newcommerce.youtube.feeds package
  • Data Obects are in ca.newcommerce.youtube.data package

YouTubeClient.getStandardFeed(…)

  • Event: StandardVideoFeedEvent.STANDARD_VIDEO_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getVideos(…)

  • Event: VideoFeedEvent.VIDEO_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getUserProfile(…)

  • Event: ProfileEvent.PROFILE_DATA_RECEIVED
  • .profile: ProfileData

YouTubeClient.getUserFavorites(…)

  • Event: VideoFeedEvent.USER_FAVORITES_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getUserSubscriptions(…)

  • Event: SubscriptionFeedEvent.SUBSCRIPTION_DATA_RECEIVED
  • .feed: SubscriptionFeed

YouTubeClient.getUserPlaylists(…)

  • Event: PlaylistFeedEvent.PLAYLIST_DATA_RECEIVED
  • .feed: PlaylistFeed

YouTubeClient.getUserContacts(…)

  • Event: ContactFeedEvent.USER_DATA_RECEIVED
  • .feed: ContactFeed

YouTubeClient.getRelatedVideos(…)

  • Event: VideoFeedEvent.RELATED_VIDEOS_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getVideoComments(…)

  • Event: CommentFeedEvent.COMMENT_DATA_RECEIVED
  • .feed: CommentFeed

YouTubeClient.getVideoResponses(…)

  • Event: ResponseFeedEvent.RESPONSES_DATA_RECEIVED
  • .feed: VideoFeed

YouTubeClient.getPlaylist(…)

  • Event: VideoFeedEvent.VIDEO_PLAYLIST_DATA_RECEIVED
  • .feed: VideoFeed

Ok I think that’s it.. I will do another tutorial in a few days. :)

Cheers,

Martin

Comments
  • November 5, 2008 at 3:19 pm

    yolo

    Hello

    I am using this AS3 class library load youtube thumbnail images into my flash interface. Now everything is working fine If I am running this on my computer locally but once I upload it to a live webserver it doesnot load the thumbnail images.

    Any idea of why this is not working is this something to do with AS3 security sandbox or other security related isseues?

    Thanks for your help in advance

  • February 16, 2009 at 11:52 pm

    jeff (YouTubeic)

    Thank you for such a great video. I have learned a lot by reading on this website and great information.

  • July 20, 2009 at 10:17 pm

    robbie

    Hey, Is there a function to get a specific users Channel? thanks

  • September 14, 2009 at 11:38 am

    André

    Any plans to extend the library to handle adding videos to YouTube via upload? Is this even possible from Flash/Flex?

  • February 8, 2010 at 6:58 am

    Daniele

    Hi,
    i’m tring to use your as3 library, and in general works fine.
    But i can’t use getUserProfile method. I recive this error

    ReferenceError: Error #1069: Impossibile trovare la proprietà $t su Number e nessun valore predefinito presente.
    at ca.newcommerce.youtube.data::AbstractData/fromObj()
    at ca.newcommerce.youtube.data::FeedLinkData/get countHint()
    at ca.newcommerce.youtube::DataTracer$/traceFeedLink()
    at ca.newcommerce.youtube::DataTracer$/traceFeedLinks()
    at ca.newcommerce.youtube::DataTracer$/traceProfile()
    at ca.newcommerce.youtube::Test/doProfileReady()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at ca.newcommerce.youtube.webservice::YouTubeFeedClient/doProfileLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    I’m not very skilled in as3 like you and a don’t understand what is $t property.
    Can you halp me?
    Thanks a lot.

  • January 19, 2011 at 12:54 pm

    Patrick Matte

    Great job with the API. One question, how can I get a user’s videos? Seems like there should be a method called getUserVideos() no?

  • January 31, 2012 at 5:56 am

    Nimisha

    Hi Martin,

    First of all I would like to thanks a ton to you for this extremely creative project of youtube as3 data api library which is actually making us capable of developing the app using the youtube data api . I am an app developer from India and I am trying to build an app ( basically for testing)which uses this youtube as3 data api library . What I am doing in app is that making user log-in with the gmail id and password and then app is trying to fetch the user ‘s profile,
    favorites and playlist but for all these functions getUserPlaylists , getUserFavorites and getUserProfile , you have to provide the “username” and there is no function in the library by which I can retrieve the username by providing the gmail id of the user and hence my app is failing . Can you please help me with this so that I can retrieve the username or can you tell me another workaround for this ?

    I would be grateful if you can help

    Thanks in advance!

Leave a Reply