
It's critical to understand that from here, everything that the YouTubeLoader does within the flash file, is controlled via the JavaScript functions. Your Flash/Flex source file will create a instance of the YouTubeLoader ActionScript class your XHTML page embeds the flash file and registers it with the functions within the youTubeLoader JavaScript file. The ActionScript 3.0 Wrapper consists of essentially two interconnected parts, the ActionScript 3.0 class files located in src/choppingblock/video/ (Figure 2), and the 'youTubeLoader.js' JavaScript file located in deploy/_assets/js/ (Figure 3).


This is further complicated because the swf file coming from YourTube's servers is loading a video into itself. While it's easy to load the ActionScript 2.0 players into an ActionScript 3.0 swf, you can not directly communicate or pass any functional calls into the loaded player. YouTube's Flash API and embedded players are written in, and work quite well with ActionScript 2.0 if your project is ActionScript 3.0 however, seamless integration becomes a bit more complex. This approach is ideal for small projects on fixed budgets that don't allow for hosting video, as well as large scale projects for clients wanting a custom end-user experience without distancing themselves from their YouYube audience.įigure 1: ActionScript 3.0 Wrapper Screenshot

Google's YouTube Player Tools and Chromeless Player have empowered designers/developers to quickly and easily integrate the power of YouTube into their online projects. The wrapper leverages ActionScript's ExternalInterface class and YouTube's JavaScript API.

In this article, I will present and briefly outline a reliable ActionScript 3.0 Wrapper for the Chromeless YouTube Player.
