Youtube Data API AS3 – YouTubeClient functions & associated events.

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

6 comments on “Youtube Data API AS3 – YouTubeClient functions & associated events.

  1. 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

  2. jeff (YouTubeic) on said:

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

  3. robbie on said:

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

  4. André on said:

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

  5. Daniele on said:

    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.

  6. Patrick Matte on said:

    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?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

38,429 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">