Video playback in AIR application

I'm a purely graphic and video producer who has recently had to take on a touchscreen kiosk project at the very last minute. I have a basic (read pitiful) knowledge of actionscript and html, but no practical experience. I'm using Flash CS5, but also have Flash Builder 4 if that makes any difference at all.
From reference guides and trial and error I have been able to put together a good deal of the project, but a few parts have me quite confused. One is that I need to be able to do two things with HD video in this project;
1. Run a fullscreen looping sequence, which will fade to the menu screen once the screen is touched
2. Place a few video clips onto the stage, to run in sequence with the timeline.
Because of my main experience being video production, I see everything in layers, and I get the feeling that that is part of my issue, because I don't fully understand how the languages interact with objects.
Has anyone ever done something like this, or have any recommendations as to how best to do this? To be perfectly honest I don't even know where to start here.

send me an email via my website:  www.kglad.com

Similar Messages

  • Video playback in ALL applications stutters while using battery only.

    Video playback in ALL applications stutters while using battery only. All OK when running from power adaptor. New battery did not fix. Recently updated iTunes to 11.0.5 and Flash player 11.8.800.94 .

    Thank you again andyBall_uk.
    I have successfully run Apple Hardware Test and it returned the error code...
    4SNS/1/40000001:VPOR
    A  Google search reveals that this is a sensor error. The "V" of VPOR indicates a voltage sensor and the "P" indicates the sensor is on the Power bus. However don't yet know what the "OR" refers to.
    I have had a non operative optical disk drive for a year or more but the fault with the video only developed in the last week or two. Could the "O" in VPOR refer to the Optical drive?
    By the way, I got the impression from the instructions on running the Apple Hardware Test that I had to use the internal dvd drive to run the APT program from the install disk. But this turned out to be not the case. Just put install disk ito an external drive plugged into the usb ports and use system preferences to set this drive as the start up disk.

  • Embedding video codecs in .air applications?

    Hi, just a quick crapshoot here. With the increased
    permission levels given to AIR applications, will it become
    possible to embed video playback codecs in an application?
    Thanks.

    Hi,
    It won't be possible to embed video playback codecs in
    AIR.

  • How to embed and play mp4 video in HTML AIR application?

    Adobe Air HTML / JS application compiled from SDK command line.  I am not using flash pro or flash builder to create the application.
    I was using dreamweaver but the dw air plugin seems to have stopped being developed so I switched to using the command line tools.
    I am creating desktop air application that has embedded mp3 audio and also I want to embed mp4 video.
    Using jQuery and the AIR js plugin I am able to play audio via buttons hooked up via jQuery and the AIR js plugin from the SDK.
    What I am doing is creating proofs for clients in AIR and sending link to the client to download the application.  I embed the media because I do not want to place them on a website where it could possibly be seen by non-clients and get picked up in the SE's.
    I am finding it hard to understand the AIR process for playing video.  I read that it is the same procedure as audio but it does not work.
    If it was hosted on youtube or somewhere embedding the web player would be simple, just copy paste some code and it works.  When actually embedding the video say mp4, f4v, mov, wmv or similar file formats I can't get AIR to play the video.  Audio, not a problem it works great.
    I would like to do the following with video.
    Embed the actual file in the AIR app.  I can do this, it gets embedded.
    Play, pause and stop the video - Can't get this to work
    Get the current stop point and be able to start the video by sending a start point - This is all working with audio I just want to do it with video.
    I have searched the forums, the search engines, youtube and read through the documentation on Air but the video does not work at all.
    I need code samples and direction on how to make an embedded video play inside of a desktop air application using the HTML / JS air model. I am using the command line tools to create the air package and test the air app.
    Please help if you have figured this out.
    Thank you.
    Not sure if this matters but I am using Windows 7 Pro 64bit as my development machine.

    In addition I also can not get html5 video to play in the adobe air app.  Would this issue be tied to the above?

  • Android Video play via AIR application is jerky

    Hi All,
      We are developing an AIR mobile application targetted for Android 2.2 or above. One of the requirement is to play H.264 videos on the mobile from the Assets folder (local file system). We have run in to a show stopper while trying to implement this feature, here are the details -
    1. We are using OSMF that comes bundled with Flex Builder 4.6
    2. Using Adobe AIR 3.1 and Flex SDK 4.6
    When video of quality H.264 MPEG4 1280*720 30FPS with input bit rate 2000 is being played on the mobile device (android), the video frame rate is choppy however on the desktop it plays out fine... StageVideo is something I would like to try however, at this moment I have no access to Android 3.0 which is required for StageVideo...
    What are we missing? Is AIR 3 not capable to play H.264 videos on android, though the Android native video player plays it out just fine?
    Regards
    Baliga

    Hi,
    Video encoding is very important.
    For example, use baseline profile level 3.1 for H264 for mobile
    (and not High profile level 4.1 recommended for desktop).
    For more information, see the MAX session of Fabio Sonnati:
    "Encoding for Performance on Multiple Devices"
    And if you have an Android phone/tablet, there is my AIR application
    to watch Adobe MAX 2011 videos :
    https://market.android.com/details?id=air.fr.inway.maxVideos2011
    Search "Sonnati" for this session's video.
    (For info, i use a video player based on OSMF 1.6)
    The pdf presentation is available on Sonmati's blog:
    http://sonnati.wordpress.com/
    Philippe

  • Video playback in on SonyEricsson phone

    Hi,
    I want to add video playback to my application. To get familar with the J2ME player, I tried the MMADemos in the WTK 2.2. They work on my S700i, but I can`t play videos! I've tried MPEG1, MPEG4 and 3GPP files, but I always get the following error message: 'Cannot create a Player for: at O' (then it's cut off). Audio files and Camera Video Capture work fine though.
    I hope someone can help me..
    Philipp

    Look for the "Video Streaming and Playback" document on the SE developer site for video compatibility information.

  • Adobe AIR Desktop Application - HD Video Playback

    Hello everyone,
    I am new to the forums. Hope I am posting in the correct one.
    I have been doing AS3 development for last 2 years. But recently I had to implement a HD Video playback in windows. I was happy to know that StageVideo helps in that case. So I started coding and created projector (not with Adobe AIR , but to play with Flash StandAlone player). Was working great , playing 3840*1080 video with ease, awesome performance. But the problem came when I had to switch to fullscreen in that program. We were using 2 Monitors with extended desktop to give 3840x1080 resolution. The Flash could switch only to one screen. I leanred a new thing , Flash just can not switch fullscreen on two screens, be it standalone/web.
    Then I came across AIR , saw on some forums that with NativeWindow class you can pretty easily run a AIR app fullscreen on 2 different monitors. I thought awesome ! I installed Flash Develop and got started with AIR 3.7 SDK. when I ported my AS3 code for AIR app , came to know that the stageVideo does not work here (that was completely unexpected!). So Now I am confused which path to take as Flash can not go fullscreen on dual monitors, and AIR can not use stageVideo.
    Any help will be appriciated. Thanks in advance.
    Edit -
    The StageVideo Class seems available , but it returns the stage.stageVideos.length as 0. Attached a StageVideoAvailabiliityEvent to stage but seems it never is available. Any other way to play HD Video ? Native flash.media.Video is not able to handle such big video.
    Message was edited by: amitsarangi

    Hello everyone,
    I am new to the forums. Hope I am posting in the correct one.
    I have been doing AS3 development for last 2 years. But recently I had to implement a HD Video playback in windows. I was happy to know that StageVideo helps in that case. So I started coding and created projector (not with Adobe AIR , but to play with Flash StandAlone player). Was working great , playing 3840*1080 video with ease, awesome performance. But the problem came when I had to switch to fullscreen in that program. We were using 2 Monitors with extended desktop to give 3840x1080 resolution. The Flash could switch only to one screen. I leanred a new thing , Flash just can not switch fullscreen on two screens, be it standalone/web.
    Then I came across AIR , saw on some forums that with NativeWindow class you can pretty easily run a AIR app fullscreen on 2 different monitors. I thought awesome ! I installed Flash Develop and got started with AIR 3.7 SDK. when I ported my AS3 code for AIR app , came to know that the stageVideo does not work here (that was completely unexpected!). So Now I am confused which path to take as Flash can not go fullscreen on dual monitors, and AIR can not use stageVideo.
    Any help will be appriciated. Thanks in advance.
    Edit -
    The StageVideo Class seems available , but it returns the stage.stageVideos.length as 0. Attached a StageVideoAvailabiliityEvent to stage but seems it never is available. Any other way to play HD Video ? Native flash.media.Video is not able to handle such big video.
    Message was edited by: amitsarangi

  • FLV Playback and Seekbar on different native windows in one Air application

    Hello Everyone.  I'm trying to make a simple video playback AIR application that utilizes the initial native window to house a transport control with a seekbar on it.  Once the application launches, it creates a second (new) window on my second screen and places a FLVPlayback instance on that new window.  Everything works just like it want it to except for one thing.  When the seekbar and FLVplayback instance are not located on the same window stage, the seekbar handle sticks to the mouse when trying to scrub through the video.
    I've added both the transport control and the FLVPlayback instance to the original native window as children and I have also added both of them to the new window as children and everything works just fine.  It's only when they are separated and located on different stages that the seekbar acts up.  When they are on the same stage, I can click on a point on the seekbar and the video jumps to that spot and continues to play and I can also scrub the seekbar, the video updates as I scrub, and when I release the mouse, the seekbar handle stays where I released the mouse.  When they on separate stages, the seekbar handle continues to follow the mouse movement without releasing it.  The video updates as the seekbar handle is moved due to it sticking to the mouse, but if I release the mouse, the handle is still moving with the mouse and the video is still being scrubbed.  Like I said, everything works great except for this and I have reached my limit with time spent on this issue.  Does anyone have any insight into this?
    Here's my code for the project.  This is my first AIR application, so I am coding it as I am learning, please be kind.
    import fl.video.*;
    import flash.display.*;
    import flash.desktop.*;
    import flash.events.*;
    import fl.video.MetadataEvent;
    import flash.geom.*;
    import flash.ui.Mouse;
    import flash.text.*;
    GLOBAL SETUP
    var flvControl:FLVPlayback;
    var MasterWindow = stage.nativeWindow;
    var screen1:Screen = Screen.screens[0];
    var screen2:Screen = Screen.screens[1];
    MASTER WINDOW SETUP
    this.loaderInfo.addEventListener(Event.COMPLETE,maximize);
    transControl.playPauseButt2.addEventListener(MouseEvent.CLICK, PlayButton);
    if (Screen.screens.length > 1){
              createVideoBKG();
              createVideoPlayer();
    GENERAL FUNCTIONS
    //Maximize the initial screen
    function maximize(e:Event) {
              MasterWindow.x = screen1.bounds.left
              MasterWindow.maximize();
              MasterWindow.stage.scaleMode = StageScaleMode.EXACT_FIT;
    //Hide Mouse Behind Video Window On Roll-Over
    function MouseRollOver(e:MouseEvent):void
              {          Mouse.hide()          }
    function MouseRollOut(e:MouseEvent):void
              {          Mouse.show()          }
    //Play-Pause Button Control
    function PlayButton(event:MouseEvent):void
                        if(transControl.playPauseButt2.currentFrame==1 ){
                                  transControl.playPauseButt2.gotoAndPlay(2);
                                  flvControl.play();
                        else {
                                  transControl.playPauseButt2.gotoAndPlay(1);
                                  flvControl.pause();
    function CloseWindow(e:MouseEvent):void
                        NativeApplication.nativeApplication.openedWindows[2].close();
    VIDEO BKG SETUP
    function createVideoBKG(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoBKG:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoBKG.x = screen2.bounds.left;
              videoBKG.maximize();
              chromeSetup(videoBKG);
              videoBKG.activate();
    //Video BKG Chrome Setup
    function chromeSetup(currentWindow):void {
              var vidBKG = new video_bkg();
              vidBKG.name = "video_bkg2";
              vidBKG.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              vidBKG.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              currentWindow.stage.addChild(vidBKG);
    VIDEO Player SETUP
    function createVideoPlayer(e:Event = null):void{
              var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
              newOptions.type = NativeWindowType.LIGHTWEIGHT;
              newOptions.systemChrome = NativeWindowSystemChrome.NONE;
              newOptions.transparent = true;
              var videoPlayer:NativeWindow = new NativeWindow(newOptions);
              if (Screen.screens.length > 1){
                        videoPlayer.x = screen2.bounds.left;
                        videoPlayer.y = screen2.bounds.top;
                        videoPlayer.width = screen2.bounds.width;
                        videoPlayer.height = screen2.bounds.height;
                        videoPlayer.stage.scaleMode = StageScaleMode.NO_SCALE;
              videoPlayer.alwaysInFront = true;
              var DVR = new DVR_Player();
              DVR.name = "DVR";
              DVR.x = 0;
              DVR.y = 0;
              DVR.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
              DVR.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
              videoPlayer.stage.addChild(DVR);
                flvControl = DVR.display2;
              flvControl.width = 1280;
              flvControl.height = 720;
              flvControl.skin = null;
              flvControl.autoPlay=false;   
              flvControl.isLive=false;
              flvControl.fullScreenTakeOver = false;
              flvControl.align = VideoAlign.CENTER;
              flvControl.scaleMode = VideoScaleMode.NO_SCALE;
              flvControl.source = "olympics.f4v";
              flvControl.seekBar = transControl.seekbarContainer2.seeker;
              videoPlayer.activate();

    Does anyone have any ideas about this?

  • Video playback issues in Air for Android

    Hello everybody
    I am developing an advertisement application which plays multiple videos. I have faced a very strange problem: nor the simple Video nor the StageVideo are not visible when I run the app on target android device. I can hear the audio but the only way to get the video is to press back button and then get back to app but in this case the video goes over the UI. This happens only on a target device which is a chinese sibo android tablet. It has android 4.1 on board. I have seen a lot of people had the similar issues:
    http://forums.adobe.com/message/5429125
    but the solution mentioned there - adding <containsVideo>true</containsVideo> to the manifest xml doesnt help
    I am using adobe air 4.0 sdk and the air 4.0 runtime on the device.  I have tried to change renderMode to CPU/Direct/Auto but it doesn change anything.
    The other three android devices I have - toshiba thrive tablet(4.0.4)/ eken tablet(4.2.2)/ htc desire c(4.0.3) play all the video content without any problem.
    Any advice will be highly appreciated,
    Max

    Hi, Chris,
    I think this issue: Bug#3832525 - [Android] Video + Stage3D = Video don't work but sound continue playback
    Also there is many critical video playback issues:
    Bug#3759420 - [Platform_Windows] GPU accelerated video stop playing when screen resolution changes after NetStream.Buffe…
    Bug#3810201 - [Android] H.264 video rotating problem
    Bug#3503389 - [Platform_Android]StageVideo attachCamera()
    Bug#3802932 - [iOS] Video stops playing
    Bug#3840986 - [iOS] Simple Video object doesn't work with H.264 (MP4) videos
    Bug#3779843 - StageVideo + NetStream + Starling = R6025 Error
    Bug#3626740 - H.264 playback conflicts with Stage3D (Android)
    Bug#3832327 - [Android] NetStream decodedFrames don't work
    Bug#3832141 - Video is not working if you seek on NetStream.Play.Stop and have a bufferTime
    Bug#3810979 - AIR on iOS: Using StageVideo makes 2D Display objects opaque/black over Stage3D
    Bug#3578045 - new Video() android black screen
    Bug#3703836 - Black screen on Samsung Galaxy S4 and Nexus 7 device
    Bug#3837870 - [iOS] StageVideo + Stage3D = video not displaying but sound playback
    Bug#3840983 - [Android] Returning from Alarm Clock causes black screen when using Video with GPU acceleration
    Bug#3840999 - [iOS] [Android] Turn off screen at NetStream.Buffer.Flush causes video not work or crash with some videos
    Bug#3844059 - [iOS[ Switching between multiple NetStreams not work
    Bug#3773944 - Video view top at android 4.3
    and more
    All of these problems very important for our business. Often we cannot create stable AIR applications when we need to use videos.
    Could you force for faster fixing these issues?

  • Apple TV 2 choppy video playback when mirroring from Macbook Pro (Yosemite) and Macbook Air (Yosemite) but not iOS devices

    Video playback is choppy (cuts out every 30-45 seconds) when air playing from both my MacBook Air 1.3 GHz Intel Core i5 running Yosemite and my husbands new MacBook Pro, but runs perfectly when mirroring from any of our iOS devices (iPhone 6+, iPad mini 3, etc.) We have Apple TV 2. This problem just started a few weeks ago, was working fine around Christmas. The problem seems to have coincidentally started right after our son tried plugging in and setting up his Chromecast on our tv. I disconnected the Chromecast, but we still have the problem. All of our software if up to date and I've tried disconnecting blue tooth, we do not have a microwave and our wifi network has a very strong signal. We have an Airport Extreme base station. Is there a solution to our problem?

    Hi leahmturner,
    I see that you are experiencing an issue with choppiness while AirPlay Mirroring from your computers to your Apple TV. I have an article that contains some helpful troubleshooting steps for you regarding this issue:
    About AirPlay Mirroring in OS X - Apple Support
    http://support.apple.com/en-us/HT201343
    Optimizing image quality
    Resolution matching modes
    You can choose between two desktop resolution matching modes that let you select which display will have the best image. When AirPlay Mirroring is turned on, select an option under "Match Desktop Size To:" in the AirPlay Mirroring menu extra.
    Match Desktop Size To: Apple TV
    AirPlay Mirroring changes the desktop resolution to best match your Apple TV, resulting in a 16:9 image that fills the HDTV screen. This setting often produces the sharpest image on the HDTV. The aspect ratio and/or resolution of the built-in Mac display may change to accommodate the Apple TV.
    Match Desktop Size To: This Mac
    AirPlay Mirroring scales the contents of the desktop to fit on the Apple TV, leaving the resolution of your Mac's display unchanged. Use this setting for the sharpest image on your Mac's display. Depending on your Mac model, the resulting image may not fill the HDTV screen.
    Troubleshooting AirPlay Mirroring
    If you don't see mirroring options
    If your Mac and Apple TV are on the same network, but no AirPlay Mirroring menu appears, your Apple TV may be asleep. Simply press a button on your Apple TV remote to wake it up. After a few seconds, the AirPlay Mirroring menu extra appears. If you still don't see the options you expect, make sure your Apple TV has the current software update installed. Also make sure that you have the "Show mirroring options in the menu bar when available" option selected in the Displays pane of System Preferences.
    If the menu bar or Dock is cropped
    Some HDTVs have bezels that cover a small percentage of the screen. This can result in a slight cropping of a full-resolution HDTV image. Depending on the HDTV model, AirPlay Mirroring may automatically adjust the picture size to prevent cropping.  If you are using OS X Mountain Lion or later, and you see cropping of the menu bar or Dock when using AirPlay Mirroring, toggle the Overscan correction option in Displays preferences.
    Minimize video post-processing
    HDTVs often apply picture quality enhancements intended to improve the look of film and video sources. In some cases, these enhancements can lead to over-sharpening artifacts when displaying your Mac desktop. Some HDTV models have built-in settings to change or disable the enhancements for use with a computer (computer, presentation, or game modes). Otherwise, the controls for sharpness, detail enhancement and noise reduction can be used to optimize the appearance of the Mac desktop. Consult your HDTV’s manual for guidance on the appropriate settings for use with a computer.
    Firewall security settings
    If you use a firewall, make sure the following firewall security options have been set to allow AirPlay Mirroring to work:
    Choose System Preferences from the Apple menu ().
    Click Security & Privacy, then click Firewall.
    Click the lock icon to unlock it if it's locked, then type an administrator name and password.
    Click Firewall Options.
    Deselect (uncheck) the “Block all incoming connections” checkbox.
    Select (check) the “Automatically allow signed software to receive incoming connections” checkbox.
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • How can I get an AIR application to a video output via DeckLink card with alpha channel?

    Hi there!
    Anybody knows how to get an AIR application to a video output via DeckLink card with alpha channel?
    The reason is because we want to develope tv show games with air.
    Thanks.

    See if these have iMac Nvidia drivers:
    http://www.laptopvideo2go.com/drivers/

  • Flv video not playing in AIR application

    Hi everybody,
    i'm building a tutorial with flash catalyst and since the 20 states limit i've split it up in different swf files that I import and show in different states.
    One of these swf (which i built with Catalyst as well) is supposed to play a flv video, and it actually plays it if i run it alone.
    The problem comes when i build the overall tutorial: it works perfectly with the "run project" command in Catalyst and with the run-local version but the video won't play if i try the AIR application.
    Does anyone have any suggestion?
    NB: the "asset" directory created with the AIR application installer does contain the flv file (i didn't have to put it there manually)
    Thanks in advance for your help,
    Giuseppe

    Hi Giuseppe,
    what I do is:
    1. create a file using Captivate
    2. i place a .flv video in this file
    3. save the file as .swf
    4. then i go to dreamweaver and put the swf on a html page.
    Now:
    when viewed in a browser, everything runs fine.
    when i pack this page into an air application (in dreamweaver) the video does not appear,
    instead I get this "Connection Error"
    I do not know a console or log file.
    However, I learned that there is a .xml file located in the same AIR folder that you publish in.
    In this .xml file there is a setting :transparency. in order to playt a .flv file this must not be be "transparent"!
    (i read this somewhere in the net)
    hope that helps
    I will talk to a professional programmer, if I have any news, i will let you know
    Claus

  • Has anybody been sucessful in integrating other  Video encoders (on2 Flix, Mainconcept) with  Adobe AIR applications

    Has anybody been sucessful in integrating other Video
    encoders (on2 Flix, Mainconcept, or any other commercially
    available video encoder) with Adobe AIR live video streaming
    applications ?
    Most of the companies provide SDK's
    Is it possible at all to integrate them with Adobe Air
    applications built using Flex/ Actionscript?

    With the use of a little Alchemy magic, you can turn a C/C++ library into actionscript accessable classes!

  • Problem in full screen mode air application

    Hi All
    I am facing some problem in creating an air application. I used fullscreenmode .FULL_SCREEN_INTERACTIVE to maximize the window on load the application was succeeded in some extent. But there is one problem one bottom bar is coming just under the window. can anybody please help me. I am attaching the preview with this.
    Thanks and regards

    Hi M*A*S*H 4077 thanks agan for your reply sending you the total code i used in my project.As I am a new coder my codes are not in abc please try to understand.please have a look and if u want to see my componentcode then also i can send code.component i only used in the video part.
    thank you
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:components="components.*"
        verticalAlign="top"
        backgroundColor="white"
        borderStyle="none"
        borderThickness="0"
        creationComplete="init();"
        baseline="0"
        paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"      
        initialize="service.send()"               
        applicationComplete="fullscreenmode()"
        backgroundGradientAlphas="[1.0, 1.0]"
        backgroundGradientColors="[#CCCCCC, #090909]"
        backgroundImage="@Embed(source='assets/background/background.jpg')"
        >
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import flash.display.Sprite;
                import flash.display.StageAlign;
                import flash.display.StageScaleMode;
                import mx.rpc.events.ResultEvent;
                import mx.effects.Iris;
                import mx.effects.easing.*;
                import flash.utils.Timer;
                [Bindable]
                public var secondsTillDue:int=100;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
                public var bol:Boolean;
                [Bindable]
                private var images:ArrayCollection;
                [Bindable]
                private var centerpoint:Number;
                [Bindable]
                private var currentIndex : Number = 0;
                public var myTimer:Timer;
                [Bindable]
                private var mainwidth:Number;
                [Bindable]
                private var mainheight:Number;
       private function init():void {
                myTimer=new Timer(1000);
                myTimer.addEventListener(TimerEvent.TIMER,warnIfClose);
                myTimer.start();
                // Initialize the uldr variable which will be used to load the external
                // playlist XML file.
                uldr = new URLLoader();
                uldr.addEventListener(Event.COMPLETE, xmlCompleteHandler);
                uldr.load(new URLRequest(PLAYLIST_XML_URL));
            /* function setFullScreenDisplayState():void{
                 stage.displayState=stageDisplayState.FULL_SCREEN_INTERACTIVE;
          public function warnIfClose(event:TimerEvent):void{
            secondsTillDue=secondsTillDue-1;
            if(secondsTillDue==90){   
             lab1.setStyle("hideEffect", fade);
             lab1.visible=false;
             clockpan.visible=false;
             clockpan.includeInLayout=false        
             clock1.setStyle("hideEffect", fade);
             clock1.visible=false;        
            else if(secondsTillDue==88){
                mainbox
                imagePart.setStyle("showEffect",fade);
                imagePart.visible=true;
                imagePart.includeInLayout=false;
             else if(secondsTillDue==83){
                 imagePart.visible=false;            
                 imagePart.setStyle("hideEffect",fade)        
                 videoContainer.visible=true;
                 playVideo();    
                private function fullscreenmode():void{
                stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
                mainwidth=stage.width;
                mainheight=stage.height;
                centerpoint=stage.height/2;
                private function serviceHandler(event:ResultEvent):void{           
                    images = event.result.gallery.img;
                    var timer:Timer = new Timer(15000);
                    timer.addEventListener(TimerEvent.TIMER,nextImage);
                    timer.start();
                private function nextImage(event:TimerEvent):void{
                        if (currentIndex < images.length - 1){
                            currentIndex++;
                        else {
                            currentIndex = 0;
            import mx.controls.ProgressBarMode;
                 * The amount of time between calls to update the playhead timer, in
                 * milliseconds.
                private const PLAYHEAD_UPDATE_INTERVAL_MS:uint = 10;
                 * The path to the XML file containing the video playlist.
                private const PLAYLIST_XML_URL:String = "playlist.xml";
                 * The client object to use for the NetStream object.
                private var client:Object;
                 * The index of the currently playing video.
                [Bindable]
                private var idx:uint = 0;
                 * A copy of the current video's metadata object.
                private var meta:Object;
                private var nc:NetConnection;
                private var ns:NetStream;
                private var playlist:XML;
                private var t:Timer;
                private var uldr:URLLoader;
                private var vid:Video;
                private var videosXML:XMLList;
                 * The SoundTransform object used to set the volume for the NetStream.
                private var volumeTransform:SoundTransform;
                 * Constructor
                private function initApp():void {
                    // Initialize the uldr variable which will be used to load the external
                    // playlist XML file.
                    uldr = new URLLoader();
                    uldr.addEventListener(Event.COMPLETE, xmlCompleteHandler);
                    uldr.load(new URLRequest(PLAYLIST_XML_URL));
                 * Once the XML file has loaded, parse the file contents into an XML object,
                 * and create an XMList for the video nodes in the XML.
                private function xmlCompleteHandler(event:Event):void {
                    playlist = XML(event.target.data);
                    videosXML = playlist.video;
                    main();
                 * The main application.
                private function main():void {
                    volumeTransform = new SoundTransform();
                    // Create the client object for the NetStream, and set up a callback
                    // handler for the onMetaData event.
                    client = new Object();
                    client.onMetaData = metadataHandler;
                    nc = new NetConnection();
                    nc.connect(null);
                    // Initialize the NetSteam object, add a listener for the netStatus
                    // event, and set the client for the NetStream.
                    ns = new NetStream(nc);
                    ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ns.client = client;
                    // Initialize the Video object, attach the NetStram, and add the Video
                    // object to the display list.
                    vid = new Video();
                    vid.x = 0;
                    vid.y = 0;
                    vid.attachNetStream(ns);
                    videoContainer.addChild(vid);
                    // Begin playback of the first video.
                    //playVideo();
                     //play video code goes here
                    // Initialize the Timer object and set the delay to
                    // PLAYHEAD_UPDATE_INTERVAL_MS milliseconds.
                    t = new Timer(PLAYHEAD_UPDATE_INTERVAL_MS);
                    t.addEventListener(TimerEvent.TIMER, timerHandler);
                    // Configure the positionBar ProgressBar instance and set the mode to
                    // MANUAL. Progress  bar values will be explicitly set using the
                    // setProgress() method.
                    //positionBar.mode = ProgressBarMode.MANUAL;
                    // Configure the volumeSlider Slider component instance. The maximum
                    // value is set to 1 because the volume in the SoundTransform object
                    // is set to a number between 0 and 1. The snapInterval and tickInterval
                    // properties are set to 0.1 which allows users to set the volume to
                    // 0, 0.1 - 0.9, 1.0 which allows users to increment or decrement the
                    // volume by 10%.
                    //volumeSlider.value = volumeTransform.volume;
                    //volumeSlider.minimum = 0;
                    //volumeSlider.maximum = 1;
                    //volumeSlider.snapInterval = 0.1;
                    //volumeSlider.tickInterval = volumeSlider.snapInterval;
                    // Setting the liveDragging property to true causes the Slider
                    // instance's change event to be dispatched whenever the slider is
                    // moved, rather than when the user releases the slider thumb.
                    //volumeSlider.liveDragging = true;
                    //volumeSlider.addEventListener(Event.CHANGE, volumeChangeHandler);
                    // Configure the various Button instances. Each Button instance uses
                    // the same click handler.
                    //playButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //pauseButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //stopButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //backButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                    //forwardButton.addEventListener(MouseEvent.CLICK, buttonClickHandler);
                 * Event listener for the volumeSlider instance. Called when the user
                 * changes the value of the volume slider.
                private function volumeChangeHandler():void {
                    // Set the volumeTransform's volume property to the current value of the
                    // Slider and set the NetStream object's soundTransform property.
                    //volumeTransform.volume = volumeSlider.value;
                    ns.soundTransform = volumeTransform;
                 * Event listener for the ns object. Called when the net stream's status
                 * changes.
                private function netStatusHandler(event:NetStatusEvent):void {
                    try {
                        switch (event.info.code) {
                            case "NetStream.Play.Start" :
                                // If the current code is Start, start the timer object.
                                t.start();
                                break;
                            case "NetStream.Play.StreamNotFound" :
                            case "NetStream.Play.Stop" :
                                // If the current code is Stop or StreamNotFound, stop
                                // the timer object and play the next video in the playlist.
                                t.stop();
                                playNextVideo();
                                break;
                    } catch (error:TypeError) {
                        // Ignore any errors.
                 * Event listener for the ns object's client property. This method is called
                 * when the net stream object receives metadata information for a video.
                private function metadataHandler(metadataObj:Object):void {
                    // Store the metadata information in the meta object.
                    meta = metadataObj;
                    // Resize the Video instance on the display list with the video's width
                    // and height from the metadata object.
                    vid.width = mainwidth;
                    vid.height = mainheight;
                    // Reposition and resize the positionBar progress bar based on the
                    // current video's dimensions.
                    //positionBar.move(vid.x, vid.y + vid.height);
                    //positionBar.width = vid.width;
                 * Retrieve the current video from the playlist XML object.
                private function getVideo():String {
                    return videosXML[idx].@url;
                 * Play the currently selected video.
                private function playVideo():void {
                    var url:String = getVideo();
                    ns.play(url);
                 * Decrease the current video index and begin playback of the video.
                private function playPreviousVideo():void {
                    if (idx > 0) {
                        idx--;
                        playVideo();
                        // Make sure the positionBar progress bar is visible.
                        //positionBar.visible = true;
                 * Increase the current video index and begin playback of the video.
                 [Bindable]
                 private var newTime:Number;
                private function playNextVideo():void{
                    if (idx < (videosXML.length() - 1)) {
                        // If this is not the last video in the playlist increase the
                        // video index and play the next video.
                        idx++;
                        playVideo();
                        // Make sure the positionBar progress bar is visible.
                        //positionBar.visible = true;
                    } else {
                        // If this is the last video in the playlist increase the video
                        // index, clear the contents of the Video object and hide the
                        // positionBar progress bar. The video index is increased so that
                        // when the video ends, clicking the backButton will play the
                        // correct video.
                        idx++;
                        vid.clear();
                        init();
                        //Alert.show("video end")
                        //positionBar.visible = false;
                private function timerHandler(event:TimerEvent):void {
                    try {
                    } catch (error:Error) {
            ]]>
        </mx:Script>
    <mx:XML id="imagesXML" source="data/images.xml" />
        <mx:Zoom id="zoom" />
        <mx:Fade id="fadein" duration="1000" alphaFrom="100" alphaTo="0" />
        <mx:Fade id="fade" />
        <mx:Rotate id="rotate"
                angleFrom="-180"
                angleTo="0"
                easingFunction="Elastic.easeInOut"
                duration="2000" />
    <mx:VBox  id="mainbox" horizontalAlign="left" width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                <mx:Panel borderStyle="none"
               borderAlpha="0"
               cornerRadius= "0"
               headerHeight= "0"
               backgroundAlpha= "0"
               borderThickness="0"
               verticalAlign="middle"
               top="100"
               height="500"
               paddingLeft="0"
               paddingRight="0"
               paddingBottom="0"
               verticalScrollPolicy="off"
               horizontalScrollPolicy="off"
               horizontalAlign="center"          
               width="{mainwidth-100}"           
               id="clockpan"
               >       
                    <mx:Label text="Current Time : " fontFamily="arial" fontWeight="bold" fontSize="15" id="lab1" color="#FFFFFF"/>
                    <components:MyWatch formatString="DD/MM/YYYY KK:NN:SS " themeColor="#0D424C" id="clock1"/>
                </mx:Panel> 
        <!--image part start-->     
        <mx:Panel horizontalAlign="left" id="imagePart" visible="false" includeInLayout="false" borderStyle="none"
               borderAlpha="0"
               cornerRadius= "0"
               headerHeight= "0"
               borderThickness="0"
               verticalScrollPolicy="off"
               paddingLeft="0" paddingBottom="0" paddingRight="0" paddingTop="0"
               horizontalScrollPolicy="off"
               backgroundAlpha= "0" width="100%" height="100%">       
                <mx:Image source="assets/images/{images.getItemAt(currentIndex).file}"
                    showBusyCursor="true" id="imagefile" width="{mainwidth}" maxHeight="{mainheight}" minHeight="{mainheight}" maxWidth="{mainwidth}" minWidth="{mainwidth}" height="{mainheight}" hideEffect="{fadein}"  x="0" y="0" maintainAspectRatio="false"/>
                <mx:Text text="{images.getItemAt(currentIndex).title}" styleName="title" color="#ffffff" x="0" y="30"/>
         </mx:Panel>
        <!--image part end-->
        <!--image part start-->      
        <mx:Panel borderStyle="none"
               borderAlpha="0"
               cornerRadius= "0"
               borderThickness="0"
               headerHeight= "0" top="0" left="0"
               backgroundAlpha= "0" verticalAlign="middle"
               verticalScrollPolicy="off"
               horizontalScrollPolicy="off"
               x="0"
               >
             <mx:VideoDisplay borderStyle="none" borderThickness="0" visible="false" id="videoContainer"
                  maintainAspectRatio="false"           
                  />
        </mx:Panel>
        <!--image part end-->
         <!--<mx:Button label="fullscreen" click="stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;"/>-->
         </mx:VBox>   
        <mx:HTTPService id="service" url="data.xml" result="serviceHandler(event)"/>
    </mx:WindowedApplication>

  • Choppy video playback via Airplay Mirroring

    I have an early/mid 2011 15" MBP with a quad-core i7 and Mountain Lion installed.  When I use Airplay to stream video from my MBP through my AppleTV 2 to my TV set, the video is very choppy and laggy sometimes.  I use either Quicktime or VLC.  Everything is running via wifi from my ISP modem/router through an Apple Time Capsule.  If anyone could help me out, that would be great, thanks!

    FIx choppy video playback apple tv from macbook air mid 2011
    For Linksys router:
    1) Open your web browser.
    2) In the Address Box at the top of the browser window, type  http://192.168.1.1  and then click on Go, or press the Enter key on the keyboard. A window should appear in the center of the screen asking for your User Name and Password.
    3) Leave the User Name box blank. Type admin in the Password box, then click on OK, or press the Enter key on the keyboard.
    4) The Linksys Wireless Router Setup page should appear.
    5) Click Applications and Gaming Tab
    6) Click QoS
    7) For WMM Select disabled
    8) save

Maybe you are looking for