Garbled/scrambled text with Air for Android & GPU mode

Please excuse the big image! Has anyone come across this? As you can  see the 'U' in 'Nebula' is scrambled and so are the digits below best  time.  It only happens within  the space a character would occupy. The line under 'game' is just a reflection.
I can't work out what's causing it, it's not always the same  characters that do it although the U in Nebula is always scrambled.  Sometimes digits are scrambled and sometimes the same ones are not. It  seems to occur with embedded fonts and with normal ones like Arial. I've  tried using both Classic and TLF text, and changing anti-aliasing  settings. It occurs on both dynamic and static text.
But it only happens  with GPU rendering, not CPU rendering.
I can't find any mention of this at all on Google, starting to wonder if perhaps it's just my phone? (Desire S).
Any input is greatly appreciated!

Thanks for the fast reply! Switching to device fonts does fix the problem, but it means using some horrible default font rather than the one I want to, which I've embedded. I've tried a few more settings and Bitmap Text seems to fix it in some instances but not in others.

Similar Messages

  • Adobe AIR for Android - GPU Mode - Bitmap Auto-Smoothing Issue

    Hi everyone
    I'm having a bit of an issue with the AS3 bitmap object. I'm currently developing an 8-bit style pixel game for AIR for Android.
    This game is being developed at a very low resolution and is being scaled up to maintain the charm of an old retro game.
    One of the methods I'm using is drawing pixels directly to bitmap objects and scaling the object up to create the old look.
    When testing on a mobile device, this works beautifully when you set the rendering method to Direct but when you change
    the render method to GPU the visuals go all blurry and anti-aliased (it's as if the bitmap is being smoothed out). The mini map
    for example is rendered using the setPixel method and then scaled up 9 times. Looks great on my PC but once I export it to my phone
    it looks absolutely awful! This is no good as I want to keep the clean, solid pixel look to maintain the the old 8-bit feel and obviously
    I'd like to stick to GPU mode due to it's speed.
    Like I said, this only happens once you test on a mobile device in GPU mode - it doesn't do it on my main desktop machine or
    in Direct mode. I already have the stage quality set to low and I've tried setting the bitmap's smoothing property to false but
    it does nothing.
    Does anyone have any suggestions as to how I can get around this?

    How about first blit your image to a small bitmapData, then draw it on a large bitmapData (9X larger)?
    Like,
    var small_bmd:BitmapData = new BitmapData(SMALL_WIDTH, SMALL_HEIGHT, false);
    var large_bmd:BitmapData = new BitmapData(SMALL_WIDTH * 9, SMALL_HEIGHT * 9, false);
    var bm:Bitmap = new Bitmap(large_bmd, PixelSnapping.NEVER, false);
    var blitRect:Rectangle = new Rectangle(0, 0, 9, 9);
    var i:uint, j:uint, blitColor:uint;
    small_bmd.draw(SOURCE_IMAGE);
    large_bmd.lock();
    for(j = 0; j < SMALL_HEIGHT; j++){
         for(i = 0; i < SMALL_WIDTH; i++){
              blitColor = small_bmd.getPixel(i, j);
              blitRect.x = i * 9;
              blitRect.y = j * 9;
              large_bmd.fillRect(blitRect, blitColor);
    large_bmd.unlock();
    Not sure if the code works or not, but hopefully this helps.

  • Sound delay with air for android

    Hi,
    I am building a game with air for android, all work just perfect but I have just little problem with the sfx.
    When I play sound I have 500 millisecond delay.
    I tried to use wav format instead of mp3 and its help a bit but still there is a big delay.
    Any ideas?
    Thanks

    First, never use the nativePath property of File.applicationDirectory (as the example does). This isn't supported on Android. You get an empty string. While you could usually bypass the write-restrictions on te application directory using this technique on the desktop, it definitely does not work on Android. Always use URLs rether than native paths to refer to application files.
    What you should do is create the database in the applicationStorage directory. You could do this with SQL, or by coping a "template" database file that you packaged with the application from the application directory o the application storage directory (using the URL not the native path, of course.)

  • Flash cs5.5 FLVplayback Encoding Problems with Air for Android

    Dear All,
    I'm trying to play flv in my air application by using FLV playback in flash cs5.5.
    I can play flv in the pc but not on the samsung galaxy tab andriod platform.
    if anyone out there has tried out FLV playback with either an Air For Android application, where the FLV files are packaged within the app, or either streaming via normal http//:, any help  would be greatly appreciated.
    Thanks!

    First disable autoplay. It gave errors for me. Try to make the movie play with the play() command.
    to embed the movie in your air bundle, just go to publish settings for your flash project. Then in that screen go to the player settings.
    In the first GENERAL tab you'll see a the bottom that you can add files to your project
    Propably there is allready your .swf and an .xml file in there.
    Using the + icon you can add your video.
    Make sure that your video is in the same directory as your . FLA file and you can use it as is (by name)
    If for example your flashfile is in c:\mytest\mytest.fla and the video in c:\mytest\videos\myvideo.flv , then you will have to load your video as "videos/myvideo.flv" with a FORWARD slash, never use \
    Good luck

  • Using Google Play Developer License RSA code with Air for Android App?

    What is the procedure for using Google Play Developer's provided license code (Base64-encoded RSA public key to include in your binary) for an Air for Android app in Flash?
    I see the need to load a p12 file and have gone through the process of creating one for Air for iOS with OpenSSL but the Google provided key is in a different format. To start with it is delivered by copy/paste off a webpage.
    I am using Flash CS5.5. I could switch to CS6 if neccesary.
    Thanks

    Follow this link, see post number 12.
    http://forums.adobe.com/thread/1115438

  • APP created with Air for Android but doesn't work on the emulator for test - Help!

    When I create an application using Flash CS5.5>>> AIR FOR ANDROID.
    After creating a test page I go to publish settings and send the app on Emulator RELEASE ... The APP is loaded correctly but as soon as you start the emulator, give this error "The application XXnameappXX (process air.XXnameappXX) has stopped unexpectedly. Please try again" Help Please!

    Ok i've find this before "Adobe Flash CS5/AIK2.5/runtimes/air/android/emulator/Runtime.apk" and install it on android emulator! Now works all i hope! Thanks for your answer!

  • How to reduce suttering in Air for iOS GPU mode?

    My game currently runs at 60FPS on iPad 2 and has no problem regarding rendering speed but I'm rather annoyed by constant stuttering which causes the game to stop for 0.1-0.5 sec  once in a while. The stuttering behavior is similar to when garbage collector is ran and I supposed it is casued by GPU memory swapping as my game uses lots of bitmapdata.
    Problem is that my game transits one scene to another scene seamlessly without stopping animations in the game screen by letting old game scene sliding out of the screen and new scene sliding in. So there's no time to preload/precache graphics assets used in the new scene. After transitting different scenes a few times, the game starts stuttering when trying to show new images.
    My game works fine without stuttering on old PCs but on iPad2 it is quite obvious. Could anyone tell me some tips to reduce stuttering when using Air for iOS? In the game, all vector graphics are pre-drawn to bitmapdata(so no vector graphics are shown) and the size of graphic assets each scene has is about 2048*1024 pixels. There are about 10 scenes. On top of that, there are common interface graphic assets which are used in all scenes and the size is about 30x 400*400 pixels.
    I know the game uses quite a lot of graphic resources. Making the game preload the assets before transitting to a new scene will eliminate stutter but I'd still like to see if I can keep the seamless scene transition on iOS.
    I'm currently using Air3.5 + Flash CS6.
    * I mean preloading/precaching by actually displaying( addChild and visible=true)  them on stage and make time for GPU to cache. All the actual graphic data are already loaded.

    Some things that might help:
    I've heard that textures are uploaded as square textures on iOS. I'm not certain that really happens, but if it does then having two 1024x1024 textures would be better than one 2048x1024, because that would end up actually taking 2048x2048.
    Bitmaps are sent to the GPU when they first hit the stage, and it takes a significant amount of time for them to get there. If you are timeline animating a transition to the next scene, stagger the graphics that are going to be appearing next. That is, before you start to move on to the next area have the biggest bitmap of the next are already touching the edge of the stage. It can be invisible, or underneath another graphic, it will still get uploaded. But if you tween in all of the graphics exactly when they are needed, they will take a while to upload.
    Dispose of the bitmaps that are no longer in the scene. I think your stuttering is because you're going into a new area that has a lot of new graphics, and the GPU still has the bitmaps from the current scene and the one before that, and so has to spend time freeing up the memory before taking the new bitmaps. If you had already disposed of them the GPU might not need to clear memory for you.
    There is System.gc(). That will force the system to garbage collect, which you could do at moments that there isn't anything animating.

  • AIR for Android monetizing

    I am new to this so forgive me, but i launched a paid version of an AIR for Android App and wanted to launch a free version with ads in an attempt to see how the monetizing of an app goes.  Does anyone have experience doing this with AIR for android?  if so what are my options?
    erik

    After a lot of trouble (account canned on ADMOB ) and research, I have gotten Ads to work in all my Android Apps. This will work on a lot of AD networks, but most will ban you click fraud. Only one network allows this method and they provide support for it too.
    I have over 100 games apps. with this method implemented and working. Here is a link to one of them for you to see how it will look in game. I am using multiple ads in this to force the user to click and make me some money: https://market.android.com/details?id=air.GraffitiCityMarketFree&feature=search_result
    Does LeadBolt offer HTML integration for banner ads?
    LeadBolt does allow banner ads to be integrated into your app using HTML, rather than using our SDK. To create a HTML banner ad after adding an app to the LeadBolt portal, simply click “Add Ad” and select “App Banner (HTML)” from the drop down box. The HTML snippet can then be added directly into your app’s HTML framework.
    So far my eCPM is $6.15
    I have created this guide to show my appreciation:
    Publisher Code:
    STEP I:
    Get an Account: http://leadboltapps.com/web/publishers/signup.php?ref=10022842
    STEP II:
    Click on the “APPS” tab and “Create New APP” to create an AD. Remember to change content unlocker to HTML Banner. While in the process.
    STEP III:
    Get the HTML AD Code and keep it safe. That is all we need from the site. How simple was that?
    AD HTML FILE:
    Create an HTML File and Load it to your site. Remember to replace your HTML Code from above step with where I have put: ****ENTER HTML AD CODE HERE****
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>Untitled Document</title>
    <style type="text/css">
    body,td,th {
         color: #FFF;
    body {
         background-color: #000;
         margin-left: 0px;
         margin-top: 0px;
         margin-right: 0px;
         margin-bottom: 0px;
         text-align: center;
         position: relative;
    </style>
    </head>
    <body>
    ****ENTER HTML AD CODE HERE****
    </body>
    </html>
    Action Script Code:
    STEP I:
    Credit: I found this on another site and would like to give credit to the author of pixelpaton.com
    The only change you need to make is to enter your website html url where you have placed the AD HTML FILE in the space where I have put : "****ENTER COMPLETE HTML URL HERE****". Where ever you want the AD, place the following code:
    // imports
    import flash.events.Event;
    import flash.events.LocationChangeEvent;
    import flash.geom.Rectangle;
    import flash.media.StageWebView;
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    // setup variables
    var _stageWebView:StageWebView;
    var myAdvertURL:String = "****ENTER COMPLETE HTML URL HERE****";
                    // check that _stageWebView doersn't exist
                    if (! _stageWebView) {
                                    _stageWebView = new StageWebView () ;
                                    // set the size of the html 'window'
                                    _stageWebView.viewPort = new Rectangle(0,0, 800, 100);
                                    // add a listener for when the content of the StageWebView changes
                                    _stageWebView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onLocationChange);
                                    // start loading the URL;
                                    _stageWebView.loadURL(myAdvertURL);
                    // show the ad by setting it's stage property;
                    _stageWebView.stage = stage;
    function toggleAd(event:MouseEvent):void {
                    trace("toggling advert",_stageWebView);
                    // check that StageWebView instance exists
                    if (_stageWebView) {
                                    trace("_stageWebView.stage:"+_stageWebView.stage);
                                    if (_stageWebView.stage == null) {
                                                    //show the ad by setting the stage parameter
                                                    _stageWebView.stage = stage;
                                    } else {
                                                    // hide the ad by nulling the stage parameter
                                                    _stageWebView.stage = null;
                    } else {
                                    // ad StageWebView doesn't exist - show create it
    function destroyAd(event:MouseEvent):void {
                    // check that the instace of StageWebView exists
                    if (_stageWebView) {
                                    trace("removing advert");
                                    // destroys the ad
                                    _stageWebView.stage = null;
                                    _stageWebView = null;
    function onLocationChange(event:LocationChangeEvent):void {
                    // check that it's not our ad URL loading
                    if (_stageWebView.location != myAdvertURL) {
                                    // destroy the ad as the user has kindly clicked on my ad
                                    destroyAd(null);
                                    // Launch a normal browser window with the captured  URL;
                                    navigateToURL( new URLRequest( event.location ) );
    // setup button listeners
    Hope this works and helps you. If you have questions, let me know. Enjoy.

  • Issue with Amazon and AIR for Android

    It appears that Flash Pro CS5.5 does not create .apks properly for the Amazon Appstore. The airDownloadURL is incorrect according to Amazon and your app will likely be rejected if you try to submit it to them. In the AIR for Android Settings, when you choose "Get AIR runtime from: Amazon Appstore" in the Deployment tab, the link Flash Pro uses for the airDownloadURL property is:
    http://www.amazon.com/gp/mas/dl/android/com.adobe.air
    when it should be this:
    http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air
    As far as I can tell, there is no way to edit this within Flash CS5.5 so Adobe needs to make the change in a future update. The only way I know of around this is to create your .apk manually through the command line using the AIR SDK. It should look something like this:
    adt -package -target apk -airDownloadURL http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air -storetype pkcs12 -keystore certificate.p12 filename.apk filename-app.xml filename.swf icon36.png icon48.png icon72.png
    If you don't have any experience using the AIR SDK then do some searching online. There are a ton of good resources out there.
    Good luck!
    tomdei

    For me works editing of Markets.xml file at:
    "C:\Program Files\Adobe\Adobe Flash CS5.5\en_US\Configuration\Android\Markets.xml"
    and replacing of Amazon Appstore key to
    <market name="Amazon Appstore" url="http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air"/>
    That's all!

  • Reader 8.1.2 :  garbled / scrambled text when printing

    After upgrading to version 8.1.2 from 7.1, our work place noticed that certain PDF documents will print garbled text if the Reader window is closed prior to the document being completely processed in the Print Queue. (Windows XP) These documents are PDF files that use an active script to import information from the user's log-in to fill in various fields (name, birth date, etc...). For example, if you print a document that is 10 pages and you close the Reader window prior to the 10th page being printed, every page printed after the closed window will be printed with garbled/scrambled text. This issue is not present before version 8. Its as if Adobe 8 maintains a link to spool/stream data from the Reader window to the print queue. Has anybody else experienced this or any suggestions for a fix? (other than rolling back to version 7) thnks

    Hi,
    I am having a similar issue with Ver 8.1.2 running over cirtix with a similar setup to Jans-Peter.
    The difference is that Reader opens fine but when you try to edit preferences it crashes.
    This only happens on an citrix session. If I run reader on the server directly it works OK.
    However after reading above I can replicate the problem on the server by moving or deleting the ADMPlugin.apl file.
    Any further ideas at all?
    Mark

  • Textfield not working in air for android

    Hi,
    I have a weird problem. An input text component that works in air for desktop refuses to work in an air for android application.
    It draws on the screen as it should but i cant input text. Am i missing something fundamental?
    It is kind of hard to log in if i cant enter credentials
    Here is the code:
       idFmt1= new TextFormat("arial",18,0x000000);
       idFmt1.align="left";
       _inputText= new TextField();
       _inputText.defaultTextFormat = idFmt1;
       _inputText.x=150;
       _inputText.height = 35;
       _inputText.width= 150;
       _inputText.type = TextFieldType.INPUT;
       _inputText.background = true;
       _inputText.backgroundColor = 0xa0a0a0;
       _inputText.text = _initText;
       _inputText.tabEnabled = true;
       _inputText.tabIndex = 1;
       _inputText.displayAsPassword = false;
       _inputText.antiAliasType = flash.text.AntiAliasType.ADVANCED;
       _inputText.embedFonts = true;
       _inputText.alwaysShowSelection = true;
       _inputText.mouseEnabled=true;
       addChild(_inputText);

    I can't seem to get anywhere with capturing text input! I set the "type" to TextFieldType.INPUT  but this is still ignored on both the desktop and the device. If I place an input textield on the scene in Flash, that works in so far as it brings up the Android keyboard - but then nothing you type is of any consequence.
    What could I be missing?

  • Adobe Air for Android - caching key event that have "unusual" keycode

    I am developing an application for a platform. The OS of this platform is Android Gingerbread (2.3.4) The platform has some buttons with "unusual" key code: 141, 131 etc.
    Native application that created in ADT can catch and respond to these keyboard events While my Adobe AIR application (created in Flash professional) are Indifferent to them.
    I try both: stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyHandler,false,0,true); NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN,KeyHandler,fa lse,0,true);
    How can I "catch" this event? Maybe a way to add constant to the keyboard class?
    Thanks

    If you are deploying for iPhone it is on the 'general' settings(First setting page opened).
    Just noticed you are making android app but i still added iphone deployment settings for further future
    But if you are using it for flash/android you have to add code into your fla descriptor with XML language(dont worry it is 1 line of code)
    Watch the video on this page about GPU rendering:
    http://blogs.adobe.com/cantrell/archives/2010/10/gpu-rendering-in-adobe-air-for-android.ht ml
    Your app shouldn't lag after these steps but if you have a project that gets bigger and has lots of code it MIGHT lag so that is when external files should help.

  • Air for Android Extremely Slow...

    Hey everybody,
    Hopefully some of you have been trying the prerelease of Air for Android like myself. Its all great and easy peasy to export the apps to my phone but it seems to be ridiculously slow even for seemingly simple scripts.
    This is what i'm trying to run at the moment and the app times out before it gets running (All the apps do get running eventually but only after the time out timer could have run over multiple times).
    import flash.display.Shape;
    import flash.events.Event;
    import flash.sensors.Accelerometer;
    import flash.events.AccelerometerEvent;
    var vx:Number = 0;
    var vy:Number = 0;
    var s:Shape = new Shape;
    s.x = stage.stageWidth/2;
    s.y = stage.stageHeight/2;
    with (s.graphics)
        lineStyle(3,0);
        drawCircle(0,0,5);
    addChild(s);
    var accel:Accelerometer = new Accelerometer();
    addEventListener(Event.ENTER_FRAME, onFrameLoop);
    accel.addEventListener(AccelerometerEvent.UPDATE, onAccelEvent);
    function onAccelEvent (evt:AccelerometerEvent):void
        vx += evt.accelerationX;
        vy += evt.accelerationY;
    function onFrameLoop (evt:Event):void
        s.x = Math.round(s.x + vx);
        s.y = Math.round(s.y + vy);
    From what I can see theres nothing actually wrong with the code from what I can see but it just takes so frickin' long to load. If I make an app with some equally simple animations it loads almost instantly. I am aware that this is only a prerelease version of the software and the documentation does say that hardware acceleration has not been added yet but whenever I watch the videos up on youtube of the Adobe team making amazing apps with obviously buckets of script running smoothly on their phone I get annoyed
    P.S The processor on my phone isn't the problem either (Nexus One Eclair )

    If you are deploying for iPhone it is on the 'general' settings(First setting page opened).
    Just noticed you are making android app but i still added iphone deployment settings for further future
    But if you are using it for flash/android you have to add code into your fla descriptor with XML language(dont worry it is 1 line of code)
    Watch the video on this page about GPU rendering:
    http://blogs.adobe.com/cantrell/archives/2010/10/gpu-rendering-in-adobe-air-for-android.ht ml
    Your app shouldn't lag after these steps but if you have a project that gets bigger and has lots of code it MIGHT lag so that is when external files should help.

  • AIR for Android - best video specs?

    Hello everyone,
    I'm trying to develop a custom video player app using the AIR for Android extension in Flash Pro CS5.
    I tried out an FLV and an MP4 video with the most stripped back code snippet, but the video still seemed a bit jerky on my phone. (Samsung Galaxy S)
    // Code
    var video:Video;
    var connect_nc:NetConnection = new NetConnection();
    connect_nc.connect(null);
    var stream_ns:NetStream = new NetStream(connect_nc);
    stream_ns.client = this;
    video = new Video();
    addChild(video);
    video.attachNetStream(stream_ns);
    stream_ns.play("video.flv");
    Would anyone know what the ideal encoding specs are for non-jerky video? Is it something to do with H.264, or perhaps CPU vs GPU? (I tried that too, with no visible difference.) Even with the app running at the appropriate frames per second (in this case, 24fps), the video seemed less than smooth.
    Any comments would be much appreciated!

    Hi [email protected]
    These should help you:
    http://www.adobe.com/devnet/devices/articles/encoding-guidelines-android.html
    http://www.adobe.com/devnet/devices/articles/video-player-optimization.html
    regards Mike

  • AIR for Android video issue

    On Android, in an app that I’ve developed successfully for iOS, I’m seeing this problem:
    There are 5 videos built-into the app. On Samsung phones (S3 and S4), running Android 4.4.2, at the first attempt to play a video there’s sound but no picture. After returning to the video menu and attempting again, video and sound play normally. If a video is stopped and another one is started, initially a frame of the previous video is displayed (for a fraction of a second), then play resumes normally with the chosen video.
    The sound-but-no-video problem does NOT show up on a Nexus 7 running 4.4.3, although the flash-frame problem does.
    I’m publishing with AIR SDK 15 packaging both with and without captive runtime to try to isolate the source of the problem. I’m using <contains video> true </contains video> in the descriptor.
    This feels like AIR-for-Android buggishness. Any confirmation out there? Similar problems? Workarounds?
    I’ve read somewhere that AIR runtime  v.3.3 may solve some video problems on Android, but not sure where to find an archived Android version of AIR that old.

    Well, as it sometimes happens with me, I have spoken too soon. The answer that I marked as ‘correct’ the other day (Colin, are you there?), seems to be not quite the right answer. At least, it doesn’t solve the video problem that I’m having with some, but not all, Android devices.
    After trying Colin’s suggestion – using  if (stage.stageVideos.length != 0) to make sure that a stageVideoAvailabilityEvent hasn’t already fired when I try to play my first StageVideo instance – and getting perfect results in 10 consecutive tries on my Samsung S4 and S3 phones, I figured that was IT.
    Next day, same devices and same code, it DIDN’T work! I pulled hair, issued profanities, hammered on the table. It didn’t matter—I still got a ‘mis-fire’ on the first play of a video whenever (almost whenever) I opened the app. After the first play everything was good – which is the exact problem that I started with many days ago. When I played Colin’s Sesame Street ‘Let’s Get Ready’ app again – the same first-play-of-video problem shows up there too.
    This problem does not show up on Nexus 7  and the Samsung Galaxy 5 Tab. It is a royal p.i.t.a. on Samsung phones, where I need my app to work.
    I created a bare-bones app to reproduce the problem, code below. Just a single class to play a single video with no controls. A few parameters (path to the video, and viewport stuff) are passed in from the document Class. I run it 10 times on my S4. It fails 7 times and plays well 3 times. The 'initialize2()' function never fires, proving that the stageVideos array already exists by the the time the 'initialize1()' function is called.
    I'm pretty sure that this is not a coding problem (because it works well on some Androids and in iOS), but WHAT is it??
    package vidTestSource
      import flash.desktop.NativeApplication;
      import flash.desktop.SystemIdleMode;
      import flash.display.MovieClip;
      import flash.display.Sprite;
      import flash.display.StageAlign;
      import flash.display.StageScaleMode;
      import flash.events.Event;
      import flash.events.NetStatusEvent;
      import flash.events.StageVideoAvailabilityEvent;
      import flash.geom.Rectangle;
      import flash.media.StageVideo;
      import flash.media.Video;
      import flash.media.StageVideoAvailability;
      import flash.net.NetConnection;
      import flash.net.NetStream;
      public class MobileVideosolo extends MovieClip
          public var stream:NetStream ;
          public var video:StageVideo;
          var xx:Number;
          var yy:Number;
          var ww:Number;
          var hh:Number;
          var mymoov:String;
      public function MobileVideosolo(mymoov,xx,yy,ww,hh)
          this.xx = xx;
          this.yy = yy;
          this.ww = ww;
          this.hh = hh;
          this.mymoov = mymoov;
         addEventListener(Event.ADDED_TO_STAGE, onstage);
    function onstage(e)
        if (stage.stageVideos.length != 0)
           initialize1();
         else
          stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, stageVideoState );
    function stageVideoState(e)
           initialize2();
           stage.removeEventListener (StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, stageVideoState);
    function initialize1()
          var nc:NetConnection = new NetConnection() ;
          nc.connect(null) ;
          stream = new NetStream(nc) ;
          stream.client = this ;
          video = stage.stageVideos[0] ;
          video.viewPort = new Rectangle(xx,yy,ww,hh) ;
          video.attachNetStream(stream) ;
          stream.play (mymoov) ;
          MovieClip(parent).sVtext.text = "Init 1";
          stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
    function initialize2()
        var nc:NetConnection = new NetConnection() ;
         nc.connect(null) ;
         stream = new NetStream(nc) ;
         stream.client = this ;
         video = stage.stageVideos[0] ;
         video.viewPort = new Rectangle(xx,yy,ww,hh) ;
         video.attachNetStream(stream) ;
         stream.play (mymoov) ;
         MovieClip(parent).sVtext.text = "Init 2";
         stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

Maybe you are looking for

  • Install 2008 R2 on Windows Server 2012

    Hi, I am trying to install SQL Server 2008 R2 SP1 on Windows Server 2012 Datacenter. However, I get below warning when running setup.exe: "your version of microsoft sql server (2008 and 2008 r2) isn't compatible with this version of windows" How do I

  • How to add Product User Statuses?

    hi all, I need to add new user status values in the Sales Status list for the Products object. The standard only has 2 statuses : blocked with error, blocked with warning. (see field Status in the Sales data tab of the Commpr01 transaction in CRM gui

  • Selecting certain ical calendars

    Wondering if you can select only certain calendars in ical from a list of calendars on the touch like you can on a Mac? Seems that the only choices are ALL of the calendars or one specific calendar.

  • Spry textarea validation?

    I have a form with a Spry textarea that needs to validate character count. IE6 is not giving the "Maximum characters exceeded" message (although it does work with a textfield). Works like a charm in other browsers. Anyone have a clue?

  • HT201272 hii

    i lost my purchased app in macbook air apple store how i do get it back can anybody help me