Loading Youtube player into AS3

Here’s some demo code of how to get youtube into AS3. Simply put, you load the youtube player into an as2 wrapper swf, then load that swf into your as3 file. A bit of LocalConnection communication between the two and you’re good to go. There’s already a few examples around the internet, but they seem to overcomplicate what is a pretty simple task.
Here i’ve made an as2 class to wrap the youtube player, handle all the loading, state changes etc, and converted it into an open component. This is dropped into an as2 swf with some buttons to show it working. I’ve used Grant Skinners SWFBridge to handle the communcation between the as2 swf and the as3 swf, like the youtube wrapper class i made, it just serves to make it even easier to plumb together.



I’ve made it easy to delete all the controls from the as2 version and shrink the swf size to the size you want the player to be. Then simply load into any as3 swf and copy the SWFBridge code to control the video playback.

Source Code: Can be found here, make sure you check the licensing code for Grants Classes before usage, i can only speak for my own code with regard to license.Roblox HackBigo Live Beans HackYUGIOH DUEL LINKS HACKPokemon Duel HackRoblox HackPixel Gun 3d HackGrowtopia HackClash Royale Hackmy cafe recipes stories hackMobile Legends HackMobile Strike Hack

License – Creative Commons – for any use commercial or personal.

Leave a Reply

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