Copy link to clipboard
Copied
Hi, I'm struggling to embed youtube videos into my flash file with actionscript 3, I've spent hours trying to find a working tutorial and looking at the api provided by google but I'm still lost. Could anyone help me get this off the ground? I ideally want to watch videos in a playlist as it will be showcasing a musician's live performances. Any help would be greatly appreciated!
Thanks
Copy link to clipboard
Copied
They give you full example code and and a downloadable sample project you can basically copy and paste over to your own project, doesn't get much easier. Anything else said here would just be repeating what's found already at this link:
https://developers.google.com/youtube/flash_api_reference#Examples
Copy link to clipboard
Copied
Hi. I tried to add in this code in my movieclip layer but it returns me this error:
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
at test4_fla::video_5/frame1()[test4_fla.video_5::frame1:4]
at flash.display::MovieClip/gotoAndStop()
at test4_fla::MainTimeline/goVideo()[test4_fla.MainTimeline::frame1:20]
Cannot display source code at this location.
What should I do?
Copy link to clipboard
Copied
Sorry for the late reply, last minute summer camping trips..
Anyhow the answer most certainly is contained here:
Adobe Flash Platform * Security sandboxes
The most common thing to misunderstand is sandboxes, which are a fun term for restricting content for security purposes. For example if your domain name is "mysite.com" and you attempt to load content from any other domain other than "mysite.com", similar to JavaScript, ActionScript will throw you errors.
A few things to assure you have in place are 1) setting the publish settings to have network access (not local file) in order to access content on another server. This is a drop-down at the bottom of .SWF settings. 3) If loading off a different domain, be sure to use Security.allowDomain() to include that domain so the SWF will allow the connection. Finally a server crossdomain.xml file may be needed on your sources server that grants your SWF permission to load from them. This is so you don't hijack someone elses content (images/video/audio/etc) without their permission.
All it takes is one of these 3 things to be incorrect and you will get errors (properly) as you are. So be sure you have everything correct.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now