Multiple Youtube embedded videos in the same scene

Hi guys,
So, I looked for a AS code in order to embed a Youtube video in a scene. Ok. I found it in the Adobe Forum and it's working like a charm (see bellow). However I have to embed 3 more videos in the same scene.
I copied the code and changed the Youtube ID for the other videos. and of course a conflict came up.
So, Im wondering what should I do to get rid of this conflict. I supose that I have to change some parameters or names; I guess. (Im newbie in AS)
Could anyone help me?
Thanks!
Security.allowDomain("www.youtube.com");
Security.allowDomain("youtube.com");
Security.allowDomain("s.ytimg.com");
Security.allowDomain("i.ytimg.com");
Security.loadPolicyFile("http://i.ytimg.com/crossdomain.xml");
Security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
Security.loadPolicyFile("http://s.ytimg.com/crossdomain.xml")
var player:Object;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
loader.load(new URLRequest("http://www.youtube.com/v/XXXXXXX?version=3"));
function onLoaderInit(event:Event):void {
    addChild(loader);
    loader.content.addEventListener("onReady", onPlayerReady);
    loader.content.addEventListener("onError", onPlayerError);
    loader.content.addEventListener("onStateChange", onPlayerStateChange);
    loader.content.addEventListener("onPlaybackQualityChange",
        onVideoPlaybackQualityChange);
function onPlayerReady(event:Event):void {
         trace("player ready:", Object(event).data);
    player = loader.content;
    player.setSize(365, 265);
    loader.x= 540,95
    loader.y= 264,50
function onPlayerError(event:Event):void {
        trace("player error:", Object(event).data);
function onPlayerStateChange(event:Event):void {
        trace("player state:", Object(event).data);
function onVideoPlaybackQualityChange(event:Event):void {
        trace("video quality:", Object(event).data);

you're missing code.
you need to use 3 different loaders and 3 different players.

Similar Messages

  • Showing video window in the same scene

    Hi there
    I´m doing a project for university and i have a section
    just for videoclips.
    I want to have a menu list on the left of the screen that
    when the user presses each element in the list a video will show up
    in the middle of the screen.
    I was thinking in linking the video to another scene like i
    was doing already but perhaps instead of giving the user another
    level to go i just show the video in the same scene.
    How do i do that?
    Also, is it possible to have control buttons like stop and
    play that stay static in the scene and work in each of the videos
    that open in that screen?

    Yes, you can do that. Just set one sprite channel to hold the
    digital video. Then use your menu to select the video. Set the
    member of the digital video sprite to that member.
    The play and stop controls can work the same way. They will
    play that sprite, regardless of the member that's currently
    occupying the sprite.

  • How can I create multiple versions of a video within the same project?

    OK...this is a probably a very basic question but I'm not sure how to word it clearly.
    How can I create multiple versions of a video within the same project? What I mean is that I have a bout 50 minutes of video and I want to make two DVDs using different clips from this original 50 minutes of footage. It would be a real pain to have to re-import the video AGAIN for the second DVD. I suppose I could drop anything I don't want to burn to DVD back into the clips pane but that would wipe out all my transitions wouldn't it? I want to save each project in their “raw” form so I can burn additional DVDs later otherwise I would just do them one at a time and not care about one of them being destroyed.
    Wow...that was a mess. Does anyone understand what the heck I’m asking? I hope so.

    How can I create multiple versions of a video within the same project?
    You can't. You make separate projects using the same or different clips, segments, transitions, titles, etc. You can even duplicate the first project and then modify/make the desired changes in the duplicated project. Each project can then be burned as a different DVD or as different titles on the same DVD if there is enough room.

  • When im facetiming with someone and im watching a youtube video at the same time, the volume for the youtube video is lowered and the facetime volume stays the same, how can i change that?

    When im facetiming with someone and im watching a youtube video at the same time, the volume for the youtube video is lowered and the facetime volume stays the same, how can i change that?

    Have you ever even used skype on an iphone or ipod?  We tried it and there is no way to type to each other while you are video chatting.  You can do the typing during the video on a COMPUTER, but not on an iphone or ipod.

  • Flash causes pc to freeze when playing 2 youtube videos or flash videos at the same time

    I dont know what has caused this issue but since around january my pc has been freezing to the point where i have to hard reset if i play 2 youtube videos or any flash videos at the same time. the whole pc becomes unresponsive when this happens. all my drivers are up to date so i dont know where this issue is coming from.
    My specs:
    Browser- Firefox 28.0
    OS: Windows 7 home edition 64 bit
    Case: Raidmax Platinum
    Motherboard:ASUS M5A99X EVO AM3
    CPU: AMD fx 8350 (4.6ghz oc)
    Cpu Cooler: ZALMAN CNPS10X Performa 120mm
    GPU: msi GTX 670 power edition
    power Supply: Kingwin Kx 1000w
    RAM:2x4gb(8gb) CORSAIR Vengeance240-Pin DDR3 SDRAM
    HDD: Western Digital Caviar Blue 500gb and 640gb
    Bluray: LG Bluray Drive & Burner

    There's two ways you can go about this Amanda.
    1. Set the length of your images for example 8 seconds each. Offset the photo's like a ladder effect and add the animating keyframes. The red dots in the image below represent the start/finish points of the animation.
    2. The other option is to set the length of all the same, then use keyframes to set the start/ finish of the animation.
    I always use example 1, however example 2 would probably be easier to understand?
    Hope that helps
    Tony

  • Why is scrolling not working with multiple youtube embeds layed out vertically in a stack on one page?

    Why is scrolling not working with multiple youtube embeds layed out in a stack on one page?

    Hi ,  
      This is a sort of performance issue , because your program takes more than the max time set for the program to execute in foreground.
    There are many stuff in program which will hamper your performance.
    I will list down a few
    1. SELECT *
    FROM konp
    INTO CORRESPONDING FIELDS OF TABLE konp_itab
    FOR ALL ENTRIES IN a363_itab
    WHERE knumh EQ a363_itab-knumh
    in this statement you are using for all entries a363_itab , but before this statement you are not checking if the table has any entry or not , please do remember that for all entries has this characterstic , that if you internal table does not contain any record , then all the records are selected from the database table. So in this case if you table a363_itab is empty , so what you want is no data must be seelcted from table konp , but what will happen is all the records in KONP will be seelcted.
    2. While retreiving data you are using seelct * even though you do not require all the fields , an example is
    <b>SELECT *
    FROM mkpf
    INTO CORRESPONDING FIELDS OF TABLE mkpf_itab
    FOR ALL ENTRIES IN mseg_itab
    WHERE mblnr EQ mseg_itab-mblnr.</b>
    in this your internal table contains only 2 fields
    <b>mblnr LIKE mkpf-mblnr, "Number of Material Document
    bldat LIKE mkpf-bldat, "Document Date in Document</b> , but to get these 2 fields you are selecting all the fields of the table.
    3. In select you are using into corresponding fields of table , it is not a good practice., so please avoidd it.
    Please understand that you must try to reduce the access to your database tables and try to keep it minimal , because this same thing may happen becasue data in DEV is very less compared to the volume of data in production , so a program working in DEV will take much more time in PRD if not written properly and may result in timeouts , as in your case.
    Please try to make chanegs to the prorgam and see if it works.
    In case you have more queries , please do revert back.
    Regards
    Arun
    *Reward points if replay is helpful

  • Can multiple libraries be sync to the same iPod?

    As I start upload songs to iTunes library, quite quickly it has increased to 4 GB with the library big enough to use the side scroll bar. I guess we can have multiple libraries in iTunes in the same computer. But can multiple libraries be sync to the same iPod? i.e. Can I see more than one library in the ipod?
    I find it uneasy to see too many entries in the library all the time. There is no way to make it invisible, hence this question.

    If you want to connect and use an iPod with more than one library (or more than one computer) you need to change the update preference in the iPod Summary tab to "Manually manage music and videos" and click Apply. The content of iTunes and the iPod are not syncronised in this mode so the two can be different. You can directly access the content of the iPod and play it through iTunes and you can drag and drop whatever you want to the iPod from either library:
    Using iPod with Multiple computers
    Managing content manually on iPod
    Syncing Music to iPod
    Using multiple iTunes libraries -Mac
    Something else to be aware of when using an iPod in manual mode is that the "Do Not Disconnect" message will remain on the display until you physically eject the device: Safely Disconnect IPod

  • Split audio from video doesn't split video at the same point ?

    When I split the audio from a video in GarageBand I would like the video to be split at the same point (so that I can insert audio in between without everything getting out of sync).
    Is this possible?
    (I don't want to use iMovie since that turns my 150 MB mov file into a 8 GB file..take ages to import)
    The reason I want to insert audio in between video fragments is that I am creating an audio description of a tv series for a blind friend. I watch the video, pause that, and describe. Then continue.
    If I can split both the video and "audio from video" at the same point and drag those to the right, so there's room to record something in between (then in the end I'll just drag it all so that the parts join up, delete the video and merge the audio. I hope.)
    Thanks in advance!!

    I figured out how to reset the Youtube video upon hiding thanks to Heathrowe's answer and FigFrance's contribution to the thread found here:
    https://forums.adobe.com/message/4979969#4979969
    The secret was adding .empty() to my video container.  Here is my functioning button code:
    Show Video:
    //code to embed youtube into symbol
    var youtube = $("<iframe/>");
    sym.$("video").empty().append(youtube);
    youtube.attr('type', 'text/html');
    youtube.attr('width', '640');
    youtube.attr('height', '360');
    youtube.attr('src', 'https://www.youtube.com/embed/MyFv6UKsW70?rel=0');
    youtube.attr('frameborder', '1');
    youtube.attr('allowfullscreen', '0');
    // Show an element
    sym.$("video").show();
    Hide Video:
    sym.$("video").empty();
    // Hide an element
    sym.$("video").hide();
    Brandon

  • Its possible to stream one video at the same time to three appletv2?

    Its possible to stream one video at the same time to three appletv2?

    Welcome to the Apple Community.
    You can't stream a movie to more than one device at a time from iTunes. You can however stream the same (or indeed a different) movie from multiple Apple TVs although they won't necessarily be in sync.

  • How can you keep the highest iphone 4s Video quality the same when exporting it from iMovie.

    How can you keep the highest iphone 4s Video quality the same when exporting it from iMovie.

    InDesign's PDF export engine does not transcode your videos, they are embedded exactly as they were in the original file. The Flash Player runtime which displays video inside PDF files may not show a perfect match to Quicktime etc. because most video playback tools aren't designed for a color-calibrated workflow, but they should be close.
    The playback quality (blocking and aliasing) will be affected if the clip is not playing at 100% (screen pixels != video pixels) and in PDFs with the standard video player widget, that will only ever happen when you use 'floating window' mode. PDF pages have physical dimensions, so viewing them at "100%" does not make them match screen pixels.
    If you don't mind the video clip being smaller than the media annotation in which it's playing, then use my free upgrade to the Acrobat playback widget - VideoPlayerX - which maintains 1:1 pixel scale until the page is zoomed out too far for it to fit. You can install the widget into InDesign so it's used by default when exporting.

  • 2 NTSC clips that shot the same scene but are not syncing

    Another newbie question. I've got something strange here. 2 standard NTSC clips about an hour long. Each, started at different times but filmed the same scene from different angles. I am trying to sync them so that I can do a multi-camera edit switching from one to the next back and forth.
    About 2 minutes into the clips, they start unsyncing! They are the same framerate, 29.97. Please help!
    With much appreciation and thanks,
    Jonathan

    I would do do some investigation of the clips using gspot or similar to see if they are what you think they are. Also, I would inspect them (on the time line) carefully to see if each clip is in sync (video/audio), then try to sort out whether they are gradually going more and more out of sync, or whether it happens at one or more points.

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

  • I have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device?

    i have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device? one is an iphone 6 and the others are ipad mini first gens, each ipad has 64gb and the iphone has 128, need to keep the data seperate as they are not all mine

    Itunes content and pics are NOT part of the backup that itunes performs.
    Backing up, updating, and restoring iPad, iPod touch, and iPhone software
    You should transfer any purchases from iphone regularly:  File>Transfer Purchases  , if they fail to be transferred when you sync.
    You buy one and only one download.  It is your responsibility to move/copy/backup your purchases.
    You can try contacting itunes support and asking for an exception, but they are under no obligation to allow.
    http://www.apple.com/support/itunes

  • HT4865 How can I have multiple icloud email accounts using the same rescue email account.

    I have several Iphones for my business for managers to use.
    I would like to set them up to send me the recovery emails but it seems only one icloud address can do that.
    Is it possible to have multiple icloud email accounts using the same - seperate recovery email address?

    Unfortunately, you cannot change your primary @me.com or @icloud.com email address, you could however create an alias or create a completely new account.

  • Multiple repeating SubForms binding to the same data node

    Having multiple repeating SubForms binding to the same data node : In our documents, many times we need to display information from same table in multiple locations. For example, if document displays information of Insureds on one page and information of drivers on another page, we need to create a LiveCycle document with two SubForms. Each SubForm needs to have a repeating binding to CommonInsured element in XSD.  LiveCycle Designer is not able to handle such case. We cannot have two subforms bound to the same node, ONLY in a case where repeating option is selected for data binding.
    The only way I have found out is the following Javascript
    //Get the data node from XML. You will find the code for this function in //JavaHelperFunctions library.
    // InsuredDataRepeatingSubForm is a second subform.
    //You need to manually add instances to this subform at the
    //runtime and Insured data to each instance.
    var insuArray = JavaHelperFunctions.getInsureds();
        var i=0;
        for( i=0; i<insuArray.length; i++)
           if (i>0)
    var thesubform = this.InsuredDataRepeatingSubForm.instanceManager.addInstance(i);
                  thesubform.InsuredName.rawValue = insuArray[i].fullName.value;
           else
                   this.InsuredDataRepeatingSubForm.InsuredName.rawValue = insuArray[i].fullName.value;
    Is there any way I can achieve directly using bindings since we are trying to minimize javascript that changes the layout of the form?
    Thanks in advance!

    Unfortunately not. I've spent countless hours/days trying to do the same thing. You have to use code. The form consumes all the data it can into the repeating elements until there is none left and it is not reused.
    Here's a function I wrote just for that purpose. Feel free to use it:
    function loadData(source,target){
    target.setInstances(source.count);//set the target's subform instances to match the source's
    for (var a=0;a<source.count;a++){//loop through each subform instance
      var sourceSubform=source.resolveNode(source.name.substr(1)).all.item(a);
      var targetSubform=target.resolveNode(target.name.substr(1)).all.item(a);
      for (var b=0;b<sourceSubform.nodes.length;b++){//loop through the children of each
       if (sourceSubform.nodes.item(b).className=="field" && targetSubform.resolveNode(sourceSubform.nodes.item(b).name)!=null)//check for matching fields
        if (typeof(targetSubform.resolveNode(sourceSubform.nodes.item(b).name).value.exData)=="undefined" ||
         typeof(targetSubform.resolveNode(sourceSubform.nodes.item(b).name).value.exData.body)=="undefined")
         targetSubform.resolveNode(sourceSubform.nodes.item(b).name).rawValue=sourceSubform.nodes.item(b).rawValue;
        else
         targetSubform.resolveNode(sourceSubform.nodes.item(b).name).value.exData.loadXML(sourceSubform.nodes.item(b).value.exData.saveXML(),1,1);
       if (sourceSubform.nodes.item(b).className=="instanceManager" && targetSubform.resolveNode(sourceSubform.nodes.item(b).name)!=null)//check for matching subforms
        loadData(sourceSubform.nodes.item(b),targetSubform.resolveNode(sourceSubform.nodes.item(b).name));
    Just make sure the source and target subform hierarchies are identifal, same name and all. It will recurse down the tree and transfer source fields (rich text and plain) to their sister targets.
    Kyle

Maybe you are looking for

  • Purchase Order and Services

    I'm modifying POs using BAPI_PO_CHANGE and I also have to modify the services in it. The documentation for this bapi indicates that for <i>"Services and limits - Changes to existing items cannot be carried out with the Change method. It is only possi

  • GT70 2OLWS graphics issues.

    I'm having some issues with my workstation and I'm about to toss it to the side and find something else. Hopefully you guys can help me as MSI support has been useless in solving the issues. I was in need of a laptop to run Solidworks on for work so

  • Atv not displaying content

    My ATV2 can connect to the network and to my iPad and iPhone, and the video audio works, but the visual is the title page only, won't play the video/movie, only stays on the title page. I know this isn't a technical question as it is connected proper

  • Pro x64 all in one connection to wireless I am not a IT person

    My wireless is on but I am doing something wrong because it is not connecting to the printer.  I have made several attempts but to no avail.  Probably not looking in the right place as I am an Accountant not computer smart, not dumb but just not to s

  • After updates photo to get new albums that cant be deleted

    in my iphone 4 i have new photo library & Camera Roll how can i move photo from photo library back to camera roll & delete the photo library?