Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Embedding youtube videos with actionscript 3 help!

New Here ,
Jul 30, 2013 Jul 30, 2013

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

TOPICS
ActionScript
3.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 31, 2013 Jul 31, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2015 Aug 18, 2015

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 20, 2015 Aug 20, 2015
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines