YouTube Player Shockwave Sprite

I am trying to embed FLV from YouTube videos in a member of the distribution Flash and sprite. YouTube has an ActionScript 2 API for their player and I use Director 11 and Flash CS 3.

http://code.Google.com/APIs/YouTube/flash_api_reference.html

I need to shoot from YouTube, I can not download disk and then use them.

I can integrate a film with a component normal FLVplayer and he can play the video on the net. Lingo is not really do something here. The ActionScript code looks like this (CODE SNIPPET 1):

But using the YouTube Player, that I need to use their API, so the code looks like this (CODE SNIPPET 2).

When I test the movie by Shockwave, it loads the reader and ytplayer.isPlayerLoaded returns true, but the video does not play.

Does anyone have ideas, what could be the problem? When I just publish Flash all works. I think I'm close...

Had, it works:

http://www.ourwebhome.com/dig/you/yt1.htm

I used great AS2 API of Shane of:

http://www.lostinactionscript.com/blog/index.php/2007/10/13/Flash-you-tube-API/

The only thing I had to add was a code to initialize the sprite:

property spriteNum
on beginSprite
FS = sprite (spriteNum)
fs.actionsEnabled = TRUE
fs.buttonsEnabled = TRUE
fs.eventPassMode = #passAlways
end

Tags: Director

Similar Questions

  • With regard to the Youtube player

    Hello

    I play on the youtube player BB device, have a question, please help.

    Seems youtube use rtsp Protocol, but I remember the video clips from Youtube are the basic FLV format, how his drive to feed the data format FLV and play on BB?

    Thank you, wtoon.

    Thank you guys for the reply, I found it's rtsp with content in 3gp format.

    Respect,

    Greg

  • BlackBerry Smartphones "BOLD" youtube player problem

    I just bought my BB 1, 9900, in addition to the problem of camera auto focus, i ' m quite disappointed with the preformance of youtube player that the image of the clip a little lag and sometimes the status fast forward.» My Internet is ok. Wat is wrong with it? software problem?

    Should behave the same way, when you use a WiFi connection?

  • videos do not fit youtube player

    No matter what I I find myself with narrow black bands at the top and bottom of my videos. I want that they fill the YouTube Player. (I think it's just better) I tried to adjust the output size and play with the other settings, but not good.

    Here is an example: builders - Booty YouTube

    I just tried this and it works perfectly: wide Youtube 480 p SD preset. No cropping of the Source.

    It turns to custom once a setting is changed as in that case the filling scale. (Jeff was on the right track)

  • Enter an interactive Youtube player on board animate - doesn't work does not correctly!

    Hi people!

    I'm working on a new project that is based on an interactive web video.

    In the edge animate proyect I implemented a player full screen Youtube has interactivity. On the one hand, in the edge project, I've included a JS that contains the definition of the Youtube API reader and all its functions to allow interactivity. On the other side, in the HTML code that creates the edge animate, I've included the div for the player and a few buttons to play and stop the video.

    When I run the Web site using Dashboard animate everything works correctly, but when I open the HTML file without edge animate, the Youtube player is not defined (the player div is empty). I think that the problem may be related to the external JS file in the dashboard project.

    I do not see why this external JS with the functions of Youtube load only when it is started from the edge soft Animation.

    My goal is to load this project as an include file OAM end in Wordpress with the Youtube player and its interactivity.

    Need help for this question! Some know how to fix it?


    Conclusion:

    Animation full screen with Youtube Player as a backdrop with a few buttons in the project file HTML to play and stop the video. YouTube API functions inside an external JS file and included in the project of edge animate. Only works when the animation is launched with edge animate. If the HTML file is opened directly, the Youtube player is empty.

    PD: I am attaching some pictures in order to provide a clearer picture of this problem.

    project1.jpgproject2.jpgproject3.jpgproject4.jpgproject5.jpg


    When you preview of Animate, content is managed from a local server. This security error is thrown on the opening of the file from the file system in the browser.

    If you download these files on a server and open them in the browser, they could still work

  • Spry menu drop down behind youtube player please help

    Hello

    I have a vertical spry menu bar next to a youtube player on my site.  Fire Fox PC and IE the menu cache always behind the player.

    I have the reader in a separate div in the menu.  I tried to give the menu div a higher value of the hierarchy of the three and the reader div 1.

    When I tried to open the page after that I got an error before she would bring the screen to the top.

    I also tried to give the youtube html code a hierarchy within the div tag and once again got the error message.

    I also tried to make the position of 'visible', without success.

    Thank you for your time and help

    Kate Terry

    http://www.romanceinthebackseat.com

    "Wmode" is a setting of the Flash which is short for "window mode". You need to reset "allowScriptAccess" whatever the value was before you changed it to transparent and then add the wmode parameter. Here's how:

    1. In Dreamweaver design view, select the placeholder of the Flash.
    2. If you have Dreamweaver CS4, in the property inspector, change the contextual menu wmode transparent.
    3. For all other versions of Dreamweaver, click the settings button.
      1. In the settings dialog box, click Add (+) to insert another parameter.
      2. In the parameter column, enter wmode and press Tab.
      3. In the value column, enter transparent
      4. Click OK to close the settings dialog box.

    That should do it.

    Best - Joe

    Joseph Lowery

    Author, Dreamweaver CS4 Bible

  • Timer for youtube player?

    Hi, I was wondering if it was possible to display the elapsed time and total time of a video in flash on youtube? I have a reader built chromeless currently on the scene, and it's the only thing missing, thanks!

    Here is a plan of work for her:

    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    import flash.geom.Rectangle;
    import flash.system.Security;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    import flash.utils.Timer;
    
    var loader:Loader;
    var seekBarWidth:Number = 500;
    var timeRE:RegExp = /\d+\d+:\d+\d+\s/;
    var seekBar:Sprite;
    var seekHead:Sprite;
    var progressTimer:Timer;
    var countdown:TextField;
    // This will hold the API player instance once it is initialized.
    var player:Object;
    
    init();
    
    function init():void
    {
              Security.allowInsecureDomain("*");
              Security.allowDomain("*");
              initButtons();
              drawSeekBar();
              drawCountdown();
              initTimer();
              loadVideo();
    }
    
    function loadVideo():void
    {
              loader = new Loader();
              loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit);
              loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
    }
    
    function drawCountdown():void
    {
              countdown = new TextField();
              countdown.defaultTextFormat = new TextFormat("Arial", 10);
              countdown.autoSize = TextFieldAutoSize.LEFT;
              countdown.multiline = countdown.wordWrap = false;
              countdown.text = "00:00 / 00:00";
    }
    
    function initButtons():void
    {
              unMuteBtn.addEventListener(MouseEvent.CLICK, unMuteVideo);
              muteBtn.addEventListener(MouseEvent.CLICK, muteVideo);
              pauseBtn.addEventListener(MouseEvent.CLICK, pauseVideo);
              playBtn.addEventListener(MouseEvent.CLICK, playVideo);
    }
    
    function drawSeekBar():void
    {
              seekBar = new Sprite();
              seekBar.graphics.lineStyle(2);
              seekBar.graphics.moveTo(0, 0);
              seekBar.graphics.lineTo(seekBarWidth, 0);
              drawSeekHead();
    }
    
    function drawSeekHead():void
    {
              seekHead = new Sprite();
              seekHead.graphics.beginFill(0xff0000);
              seekHead.graphics.drawCircle(0, 0, 7);
              seekBar.addChild(seekHead);
              seekHead.mouseEnabled = true;
              seekHead.buttonMode = true;
              seekHead.useHandCursor = true;
              seekHead.addEventListener(MouseEvent.MOUSE_DOWN, startSeek);
    }
    
    function startSeek(e:MouseEvent):void
    {
              stage.addEventListener(MouseEvent.MOUSE_UP, stopSeek);
              stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
              seekHead.startDrag(true, new Rectangle(0, 0, seekBarWidth, 0));
              progressTimer.stop();
    }
    
    function onMouseMove(e:MouseEvent):void
    {
              player.seekTo(player.getDuration() * seekHead.x / seekBarWidth);
              e.updateAfterEvent();
    }
    
    function stopSeek(e:MouseEvent):void
    {
              stage.removeEventListener(MouseEvent.MOUSE_UP, stopSeek);
              stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
              seekHead.stopDrag();
              progressTimer.start();
    }
    
    function initTimer():void
    {
              progressTimer = new Timer(50);
              progressTimer.addEventListener(TimerEvent.TIMER, updateSeekBar);
    }
    
    function updateSeekBar(e:TimerEvent):void
    {
              countdown.text = new Date(player.getCurrentTime() * 1000).toUTCString().match(timeRE)[0] + "/ " + new Date(player.getDuration() * 1000).toUTCString().match(timeRE)[0];
              seekHead.x = seekBarWidth * player.getCurrentTime() / player.getDuration();
              e.updateAfterEvent();
    }
    
    function onLoaderInit(e: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(e:Event):void
    {
              // Event.data contains the event parameter, which is the Player API ID
              // Once this event has been dispatched by the player, we can use
              // cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl
              // to load a particular YouTube video.
              player = loader.content;
              player.cueVideoById("FDbP71p4W4g");
              player.setSize(640, 360);
              player.x = 20;
              player.y = 30;
    
              seekBar.x = player.x;
              seekBar.y = player.y + player.height + 10;
    
              countdown.x = seekBar.x + seekBar.width + 10;
              countdown.y = seekBar.y - seekBar.height * .5;
    
              addChild(seekBar);
              addChild(countdown);
    }
    
    function onPlayerError(e:Event):void
    {
              // Event.data contains the event parameter, which is the error code
              trace("player error:", Object(e).data);
    }
    
    function onPlayerStateChange(e:Event):void
    {
              // Event.data contains the event parameter, which is the new player state
              switch (Object(e).data)
              {
                        case 1:
                                  progressTimer.start();
                                  break;
    
                        case 2:
                        case 0:
                                  progressTimer.stop();
                                  break;
              }
    }
    
    function onVideoPlaybackQualityChange(e:Event):void
    {
              // Event.data contains the event parameter, which is the new video quality
              trace("video quality:", Object(e).data);
    }
    
    function createFeaturedButtons(player:Object, featuredVideos:Array):Array
    {
              var results:Array = [];
              for each (var id:String in featuredVideos)
                        results.push(player.getClickToPlayButton(id));
              return results;
    }
    
    function playVideo(e:MouseEvent):void
    {
              if (player)
                        player.playVideo();
    }
    
    function pauseVideo(e:MouseEvent):void
    {
              if (player)
                        player.pauseVideo();
    }
    
    function muteVideo(e:MouseEvent):void
    {
              if (player)
                        player.mute();
    }
    
    function unMuteVideo(e:MouseEvent):void
    {
              if (player)
                        player.unMute();
    }
    
  • My YouTube Player is only half shown.

    After yet another update of unnecessary provision by Google, my player now half cut Youtube ( http://puu.sh/4LHkl.jpg ). It's extremely embarrassing, that not only I see only half of the video, I can not adjust the size of the player or the quality. All patches, or I have to wait for Google to fix it?

    And google have returned back to the former charted, fixing my problem!
    I hope that they leave it like this.

  • The great Youtube player does not work for Firefox 10.

    Quite simply, nothing happens when I press the button. Screenshot
    I read that youtube has a new automatic resizing player and maybe when I'm on Firefox, he thinks that my screen is not big enough for 480 p.

    Please check if this happens Safe Mode.

    Extensions of the issues

    Test Plugins

    Uninstalling the modules

    Uninstalling toolbars

  • YouTube Player API - disable the link to YouTube

    So I use the API of YouTube AS3Player (https://developers.google.com/youtube/flash_api_reference#Standalone_sample) to embed a YouTube video in my Flash file.

    The problem is that the I have to disable the video from the link to the YouTube page, when you click on the YouTube link at the bottom right of the video.

    I'm sure there could be different soultions for this - in the actionscript, HTML or Javascript, and I'm open to anything. Can someone help me this?

    N ° YouTube reserves this right because you use their APIs, their player and their bandwidth. You need use the media yourself to remove it.

    I think YouTube is great because it is a built-in audience. If you want something brand controlled, broadcast your own server (site5.com is a great unlimited army at low cost). But also to post the video on YouTube. Crosslink them. It's the best of both worlds. Your work on your site seems custom with no logo, on YouTube, it has a logo, but you can include a link to your site.

    You can't really blame YouTube justifying this little gratification for what they do for you.

  • Get the width and height of the youtube player!

    Hello!

    I'm trying to get the size of a responsible player for youtube, but it's not working (it is followed by 0):


    fotoLoader = new MovieClipLoader();
    fotoLoadListener = new Object();
    fotoLoader.addListener (fotoLoadListener);

    fotoLoadListener.onLoadInit = {function (target)}
    trace (target._width);

    }

    fotoLoader.loadClip ("http://www.youtube.com/v/"+"VhRas_qrz5Y", charger ");

    Any tips? ~~~~~~

    It is possible that everything has not yet physically (? digitally) were planted despite having been charged.  Try using a setTimeout to wait a bit before checking the dimensions.

    fotoLoader = new MovieClipLoader();
    fotoLoadListener = new Object();
    fotoLoader.addListener (fotoLoadListener);

    function traceIt() {}
    trace (Loader._width);
    }

    fotoLoadListener.onLoadInit = {function (target)}
    setTimeout (traceIt, 200);
    }

    fotoLoader.loadClip ("http://www.youtube.com/v/"+"VhRas_qrz5Y", charger);

  • Why Flash Player/Shockwave always fails several times a day?

    This is obviously not a quality product. I had this experience of WIN Vista to Win 7. It's a constant whether you use Firefox or Chrome. I think a class action must be taken against Adobe because of people's time spend dealing with this problem of crash. The plugin is obviously not ready for release. If my browser crashed too often your product breaks down, I'll find another browser. Is there an alternative to Flash Player? Yes. LightSpark, Silverlight and more. I invite people to go a different route with Adobe crash problems. Again, I think that the class should decide. Fix or remove the market!

    Silverlight is a good option. Even I feel that your flash of pain will see the effects Yes soon total time, everyone with this product spending to deal with questions is great. Unsuitable product, I would really like that responses instead personal condescendingly Jeromie Clark essentially saying gtfoh. Very little professional to not address a customers concern anyway and respond with a nasty remark.

  • Shockwave Player not working not not on any site

    sites like youtube, or here:
    http://www.Adobe.com/software/Flash/about/
    Work perfectly well (flash player)

    but it's not like here:
    http://www.Adobe.com/Shockwave/welcome/
    or anywhere else with shockwave player (shockwave player)

    I tried to reinstall firefox and the plugin several times, tried MANY different sites in multiple browsers.

    Only, it does not work in firefox, it works in all other browsers I've tried.

    I found the solution for shockwave does not.

    1. go in topic: addons

    2. make sure that "Shockwave for Director" is present

    3. look for "Mozilla ActiveX Control and Support of plugins"

    4 disable

    5. refresh the page

    It worked for me to get shockwave stuff is working again.

  • Graphic bugs in YouTube HTML5 player

    When I played YouTube videos lately, I noticed that a bunch of black boxes have been appearing on the player (the controls under the video) interface while the video is playing. Unfortunately, I can't provide a good screenshot, as the boxes come and go too fast for me to get. This problem always occurs when I restart Firefox in safe mode. In my view, that we started to happen with Firefox 37.

    This problem seems to occur more with the new YouTube Player.

  • YouTube gives me problems when using Firefox. The player gives me no answer is only a black screen with no buffering bar.

    YouTube player does not load and does not answer at all besides. This problem is only occurs on Firefox.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

    Try disabling hardware acceleration in Flash Player.

    See:

    Blink the window "display settings":

Maybe you are looking for

  • Lenovo t540p 32 gb

    Hello I have a lenovo t540p, I was wondering what will happen if I add 32 GB (2 x 16). The laptop will detect the extra 16 GB? Thank you

  • Error code 10 on my CD/DVD in Vista drive

    My CD/DVD drive works perfectly. Today, I tried to load the software for a new printer. When I put the disc in the drive that is nothing past. I tried several other DVD and CD, but no charge. I checked the Device Manager and found a yellow exclamatio

  • The software installation will see printer on network

    I install a Photosmart Premium C410a on a PC brand new win7. The installer can't find the printer on the network. I checked that the software on the disc is the current version. I choose 'Advanced' and enter the IP Address of the printer. I assigned

  • CDFS driver sys disabled in windows 7. activation procedure. running win 7 ultimate

    CDFS driver sys disabled in windows 7.  activation procedure.  running win 7 ultimate.  This happened only a few days ago. now cannot run what whether on cd dvd. does not even recognize a disc in the drive. real mess

  • BlackBerry Smartphones Email icon when there is no new email

    I installed the updated BlackBerry and after that just late, the "new email" icon at the top of my screen telling me that I have two new emails.  I had no email again well, and now the icon won't go away.  Anyone know what I can do to make the icon d