Full_Screen_Interactive problem

Hi there,
I am creating an Air app that contains an HTML component that loads a web page that contains a flash graph. I am wanting to run the app in fullscreen, but when I enter fullscreen, the flash graph on the web page goes blank. The flash graph on the web page loads perfectly when the app is not in fullscreen, however.
Is this a known bug, or is it my problem?
Here is the code for the basics of the HTML part of the app:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="load();" layout="absolute" xmlns:html="flash.html.*">
     <mx:Script>
          <![CDATA[
               public var urlReq:URLRequest = new URLRequest("http://www.adobe.com/");
               private function load():void{
                    html.htmlLoader.load(urlReq);
                    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
          ]]>
     </mx:Script>
          <mx:HTML id="html" width="100%" height="100%"/>
</mx:WindowedApplication>

Hi Chris,
Thanks for the sample project. After a bit more experimentation I have found it seems to be that I was loading a module at the same time as going to full screen interactive. If I wait till the module has loaded and then go full screen it works fine.
Thanks
James

Similar Messages

  • In some pc ActionScript not working even after running the .SWF or .EXE, what may be the problem ?

    In my flash project i am using ActionScript to get FULLScreen and mouse hide action. I hv already used the AS3 in Adobe Flash CC and AS2 in Adobe Flash CS6.  All my files are working well, both .SWF and .EXE (projector..) . But the client is saying in his pc the Full SCREEN and Mouse hide is not working. I instructed to update the flash player plugins, still they are getting the same issue. What is the matter pls any one guide us. My code is in the first frame of Flash file which is mention below.
    /*AS2 code*/
    fscommand("fullscreen","true");
    Mouse.hide();
    /*AS3 code*/
    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    stage.scaleMode = StageScaleMode.SHOW_ALL;
    Mouse.hide();

    Hi all, few days ago the client told , one of the project file (.SWF and .EXE) showing full screen. Again day before yesterday the client again said, all the project files working Full Screen and Mouse hide action. Still i do know such happens ? if any technical issue is behind its problem than anyone pls inform me. However it is running well in their PC now.

  • AIR app crashes when using FULL_SCREEN_INTERACTIVE on nativeWindow

    App is running on desktop and packaged as Signed native installer with AIR 14
    My app opens and closes native windows and adds externally loaded SWFs to them. I'm activating the windows with a FULL_SCREEN_INTERACTIVE displayState. Without fail, after 5 or 10 windows opened and closed, the app crashes upon opening the next native window.
    If I don't use FULL_SCREEN_INTERACTIVE, the app never crashes, I've tested on Mac OS and Windows, same problem.
    This code opens the window :
    var options:NativeWindowInitOptions = new NativeWindowInitOptions();
    options.transparent = false;
    options.systemChrome = NativeWindowSystemChrome.STANDARD;
    options.type = NativeWindowType.NORMAL;
    options.resizable = false;
    options.renderMode = NativeWindowRenderMode.DIRECT;  
    myWindow = new NativeWindow(options);
    myWindow.title = "Title";
    myWindow.width = 1024;
    myWindow.height= 768;
    myWindow.stage.align = StageAlign.TOP_LEFT;
    myWindow.stage.scaleMode = StageScaleMode.NO_SCALE;
    myWindow.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    myWindow.activate();
    // add content to window
    var loader:Loader = new Loader();
    var AD:ApplicationDomain = new ApplicationDomain();
    var context:LoaderContext = new LoaderContext( false, AD );
    context.allowLoadBytesCodeExecution = true;
    // urlloader has loaded a local SWF file
    loader.loadBytes( urlloader.data, context );
    myWindow.stage.addChild(loader);
    This is the crash report from Mac OS :
    Process:  adl [29243]
    Path:   /Applications/Adobe Flash Builder 4.7/*/adl
    Identifier: adl
    Version: ???
    Code Type: X86 (Native)
    Parent Process: Adobe Flash Builder 4.7 [72735]
    Responsible: Adobe Flash Builder 4.7 [72735]
    User ID: 501
    Date/Time: 2014-08-29 15:53:57.344 -0400
    OS Version: Mac OS X 10.9.4 (13E28)
    Report Version: 11
    Anonymous UUID: 8F57FABC-FE5A-30AB-3E90-2F97052D4975
    Sleep/Wake UUID: 577E4E3E-84CF-4446-96E4-0D5FF83DB6B5
    Crashed Thread: 0 Dispatch queue: com.apple.main-thread
    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x000000003f800008
    VM Regions Near 0x3f800008:
      CG backing stores 0000000017577000-0000000017e41000 [ 9000K] rw-/rw- SM=SHM 
    -->
      __TEXT 0000000040000000-000000004035c000 [ 3440K] r-x/rwx SM=COW /System/Library/Extensions/AppleIntelHDGraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHDGraphicsGLDriver
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0 com.adobe.AIR 0x02913e50 0x2800000 + 1130064
    1 com.adobe.AIR 0x02945d81 0x2800000 + 1334657
    2 com.adobe.AIR 0x029389fe 0x2800000 + 1280510
    3 com.adobe.AIR 0x02a0ae85 0x2800000 + 2141829
    4 com.adobe.AIR 0x02a037af 0x2800000 + 2111407
    5 com.adobe.AIR 0x02a03c2f 0x2800000 + 2112559
    6 com.adobe.AIR 0x02a0228d 0x2800000 + 2105997
    7 com.adobe.AIR 0x02a01d8d 0x2800000 + 2104717
    8 com.adobe.AIR 0x02a08be1 0x2800000 + 2132961
    9 com.adobe.AIR 0x02a014e6 0x2800000 + 2102502
    10 com.adobe.AIR 0x02e3287f 0x2800000 + 6498431
    11 com.adobe.AIR 0x02ce2d17 0x2800000 + 5123351
    12 com.apple.Foundation 0x9283727c __NSFireDelayedPerform + 422
    13 com.apple.CoreFoundation 0x90195ea6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
    14 com.apple.CoreFoundation 0x90195863 __CFRunLoopDoTimer + 1395
    15 com.apple.CoreFoundation 0x9021006d __CFRunLoopDoTimers + 349
    16 com.apple.CoreFoundation 0x9014d353 __CFRunLoopRun + 1779
    17 com.apple.CoreFoundation 0x9014c9ea CFRunLoopRunSpecific + 394
    18 com.apple.CoreFoundation 0x9014c84b CFRunLoopRunInMode + 123
    19 com.apple.HIToolbox 0x9a10eb5d RunCurrentEventLoopInMode + 259
    20 com.apple.HIToolbox 0x9a10e777 ReceiveNextEventCommon + 163
    21 com.apple.HIToolbox 0x9a10e6bd _BlockUntilNextEventMatchingListInModeWithFilter + 92
    22 com.apple.AppKit 0x9848e349 _DPSNextEvent + 1602
    23 com.apple.AppKit 0x9848d870 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
    24 com.apple.AppKit 0x9848015c -[NSApplication run] + 727
    25 com.adobe.AIR 0x0280228c 0x2800000 + 8844
    26 com.adobe.AIR 0x02802438 0x2800000 + 9272
    27 libobjc.A.dylib 0x96e672af -[NSObject performSelector:withObject:] + 70
    28 adl 0x00002d7e RuntimeMain(char const*, int) + 256
    29 adl 0x00002e0e main + 34
    30 adl 0x000026dd start + 53
    Any help would be much appreciated.

    This is from a tester describing what happens on a Mac:
    No the program does not launch properly on the Mac
    What happens is this.
    I open my applications folder
    I open the App Folder and see another folder labeled Program V2.1
    I open that folder and see the Program blue icon which click to launch
    The folder disappears and the blue Program icon appears in my dock along side other applications looking ready for launching.
    This is where the problem starts
    If I click on the blue Program icon which is in my dock along side all of my other application icons they all drop off the screen. like the screen resolution changed suddenly or something,
    The menu along the top of the screen also moves off the screen . in the same manner
    so my desktop which usually has a visible dock at the bottom and a menu bar on the top now doesn't show either of those elements.
    I do have a couple of document icons on my desktop , you know text files or what ever they never move
    If I now click my mouse anywhere on the screen all of the icons return including the blue Program icon still sitting in by dock, if I click it again same sequence of actions.
    I deleted and reinstalled the latest version of Adobe Air and got the same result
    I also want to mention
    The top menu on the mac tells me what application is active, you know "finder" "Open office" "Firefox" what ever is program is running and active shows there
    Program has never show up as being active in the top menu so I'm guessing never fully launched

  • FULL_SCREEN_INTERACTIVE causes app to crash

    Hi,
    I developed an app that opens up new native windows and adds loaded SWFs to it's stage once opened. When I set the displayState of the new windows to FULL_SCREEN_INTERACTIVE the app crashes upon closing the new window.
    I'm pretty sure the the display state is causing this bug because when I set it to NORMAL, the app works fine.
    The problem report from MacOS gives me :
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x000000003f800001
    I'm using AIR 14.
    Has anyone had issues with this before.
    Thanks.

    I am in the same situation except I am still using just the OS supplied version of Quick time and interestingly I also had to have the graphics card / logic board replaced about a year ago on my late 2008 macbook pro.
    In any case while doing a series of screen recordings everthing is fine for a while 3,4,5, recordings of aprox 2 1/2 minute to 51/2 min. recordings..... then all of sudden it quits recording and is totally frozen, cant exit QT cant force quit have to manually force a shutdown and reboot the computer.
    Then exactly as the above post, what ever portion of the recording prior to freeze pops up on start up and plays fine
    Also I did run the hardware check  and it said everthing was fine so I supect  it is actually a QT software glitch in Maverics  perhaps only with   the (applestore replaced) logic boards done at the time
    Please sombody from apple respond  thanks Kevin

  • Problem in making air application in full screen on load

    Hi all
      I am new in flex developing. The problem I m facing in making a air application is that I want to make the application window in full screen view without the top toolbar.
    The code i got is like:
    <mx:Button label="fullscreen" click="stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;"/>it is working on click the button.
    But I want this on starting the application. Without any user interface.
    Thanks and Regards

    Extensions require both native code and ActionScript code and are packed by the native extension compiler by Adobe to an ANE file. Check this tutorial: http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html
    After compiling the extension, you can put the extensionId into your <extensions> branch in the application.xml and add the .ane as an excluded library into your AS3 project. Then you can use the extension like any other external library (swc file).
    It's also helpful to download and play around with extisting ANEs. There are some nice open source libraries here: https://github.com/freshplanet

  • Mac OS X 10.7 issue StageDisplayState.FULL_SCREEN_INTERACTIVE

    There seems to be a problem with StageDisplayState.FULL_SCREEN_INTERACTIVE on Mac OS X 10.7. When full screen is toggled the bounding box of the original window is left on top of your application. If you click on the app behind this bounding box goes away.
    Has anyone else noticed this?

    Hi Chris,
    Thanks for the sample project. After a bit more experimentation I have found it seems to be that I was loading a module at the same time as going to full screen interactive. If I wait till the module has loaded and then go full screen it works fine.
    Thanks
    James

  • StageDisplayState.FULL_SCREEN_INTERACTIVE failing

    I'm having some issues with the fullscreen mode in AIR and hopefully you guys can point me in the right direction. Our application is a pure actionscript project that's published as an AIR file. When the app starts it should jump into full screen mode so I have a listener for added to stage and when I hear that I set the display state to FULL_SCREEN_INTERACTIVE. If I start a totally fresh Air project this workflow works just fine but the problem that I'm seeing is that after a while of sharing the project amongst our team, eventually the full screen stuff just stops working. I'm working with another developer and we're on different systems (I'm on a Mac running Lion, he's on a PC running Win7). I'm wondering if something OS specific is getting in there and screwing things up..? Also we're using Stage3D and Away3D 4 so we're on Flex SDK 4.6 and (I believe) Air 3.0. I'd be happy to send along a zip of the project to anyone at Adobe. We just started last week so there's not much code at all and it's very easy to see the problem. Thanks!
    - rob

    I figured out the solution. In the application's xml file we had explicitly set width, height, x, y, minHeight and maxHeight. Commenting all of these out gave us fullscreen support again.

  • Stretched text and image with FULL_SCREEN_INTERACTIVE after Air player update

    One of my Air applications uses StageDisplayState.FULL_SCREEN_INTERACTIVE to switch to full screen during the presentation of some sheets.
    Everything worked fine untill some users reported a streching of texts and images in the sheets.
    It turns out that the problem occurs after an update from the Adobe Air Player to 3.1 from  2.7.
    The first screen shots shows the text as it should be, the second screen shot shows the text after the update of the Air Player.
    The code used to go into the Full Screen mode is:
        public function setFullScreenInteractive(fullScreenWidth:int = Constants.INT_SCREEN_WIDTH_SMALL, fullScreenHeight:int = Constants.INT_SCREEN_HEIGHT_SMALL):void
                             s.fullScreenSourceRect = new Rectangle(          0, 0, fullScreenWidth, fullScreenHeight);
            s.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    with  Constants.INT_SCREEN_WIDTH_SMALL = 800 and  Constants.INT_SCREEN_HEIGHT_SMALL = 600.
    I can reproduce the problem on a couple of computers with Windows Xp but it's not happening on all the computers I've tested.
    Any idea how to fix this (without telling my users to Uninstall the current Air Player and reinstall the Air Player 2.7)?
    Regards,
    Bart

    Hi Bart,
    Unfortunately the correct screenshot link appears to broken.  Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.  It would also help if we had a sample project/application that we can reproduce this issue with.  If you'd like to keep this private, please feel free to send it to me directly at [email protected]
    Thanks,
    Chris

  • 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>

  • MAC OS X + stage.fullScreenSourceRect + renderMode set to GPU = problem with mouse position

    When setting stage.fullScreenSourceRect, stage.displayState to StageDisplayState.FULL_SCREEN_INTERACTIVE; and renderMode to GPU, mouse position is read incorrectly. This is not only for mouseX and mouseY position, but also all the mouse interactions with Sprites, Buttons etc are not working correctly.
    Anybody know a solution for this issue?
    Here is the bug reported, but there is no response yet.
    https://bugbase.adobe.com/index.cfm?event=bug&id=3486120
    Greg.

    Bump up.
    Anybody has the same problem and have an idea how to fix it? Or please just check if you have the same problem.. I'm going to submit my game "Amelia and Terror of the Night" (successfully added to iOS store) to MAC App Store but can't do it while this problem appears.
    I am disappointed nobody  even verified the bugs I submitted at  the bugbase.adobe.com for AIR 3.5 and 3.6
    thanks
    Greg

  • Probleme with FULL_SCREEN

    Hi I have a probleme with full screnn I put this ligne stage.displayState= StageDisplayState.FULL_SCREEN; 
    in my code as3 of my project, I run my app with ctrl+enter I don't have any probleme and TLF Text are modifiable I can wirte a text, but when i run from swf or exe it run on full screen but i can't modify a text of TLF text, and i declare it modifiable!! .   resolution of my project 1280 x 720

    Use FULL_SCREEN_INTERACTIVE instead of just FULL_SCREEN

  • Problems, PopUp y Text fields disabled

    hello,
    I have a PopUp, that inside is a report of two columns ID,DESCRIPTION. the column DESCRIPTION      
    jascript is or Link to a URL that calls one, that it gives back to the values of the report to text fields to me.
    The problem is that one of text fields this disabled by the Conditions and the Javascript does not let to me stick the value that I bring.
    Somebody has some idea, or suggestion Thanks!
    Juan Pablo

    JaimeRJ wrote:
    Hi, I'm having problems with text fields in full screen.
    I'm aware of the security restriction but Adobe says text fields are disabled only when running in a browser, text fields should be OK when in standalone player or AIR.
    Not the case.
    I'm exporting a .exe file and text fields become immediately disabled when I go to Full Screen. I can't develop the thing in AIR (to use  FULL_SCREEN_INTERACTIVE ) due to company restrictions on installing software. So the standalone exe is the right solution to me, this should be working, but it isn't, please help.
    Hey there,
    The documentation you're referring to says the following:
    "These restrictions are not present for SWF content running in the stand-alone Flash Player or in AIR. AIR supports an interactive full-screen mode that allows keyboard input."
    It mentions nothing about running full screen in a projector executable file which is what you are trying to do. The stand alone flash player is usually an executable file in the flash development environment that is used for testing and debugging flash content for the developer. For distributing your app I would think that there would be good reason to prevent text input in full screen projector files for the security reasons. You should probably look at distributing your intended content some other way or ask for special permission to do AIR. I can't confirm this, but maybe this might be an option: http://www.flashjester.com/?section=tricks_jugglor3
    Hope that helps.

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • A problem with Threads and MMapi

    I am tring to execute a class based on Game canvas.
    The problem begin when I try to Play both a MIDI tone and to run an infinit Thread loop.
    The MIDI tone "Stammers".
    How to over come the problem?
    Thanks in advance
    Kobi
    See Code example below:
    import java.io.IOException;
    import java.io.InputStream;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    public class MainScreenCanvas extends GameCanvas implements Runnable {
         private MainMIDlet parent;
         private boolean mTrucking = false;
         Image imgBackgound = null;
         int imgBackgoundX = 0, imgBackgoundY = 0;
         Player player;
         public MainScreenCanvas(MainMIDlet parent)
              super(true);
              this.parent = parent;
              try
                   imgBackgound = Image.createImage("/images/area03_bkg0.png");
                   imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
                   imgBackgoundY = this.getHeight() - imgBackgound.getHeight();
              catch(Exception e)
                   System.out.println(e.getMessage());
          * starts thread
         public void start()
              mTrucking = true;
              Thread t = new Thread(this);
              t.start();
          * stops thread
         public void stop()
              mTrucking = false;
         public void play()
              try
                   InputStream is = getClass().getResourceAsStream("/sounds/scale.mid");
                   player = Manager.createPlayer(is, "audio/midi");
                   player.setLoopCount(-1);
                   player.prefetch();
                   player.start();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void run()
              Graphics g = getGraphics();
              play();
              while (true)
                   tick();
                   input();
                   render(g);
          * responsible for object movements
         private void tick()
          * response to key input
         private void input()
              int keyStates = getKeyStates();
              if ((keyStates & LEFT_PRESSED) != 0)
                   imgBackgoundX++;
                   if (imgBackgoundX > 0)
                        imgBackgoundX = 0;
              if ((keyStates & RIGHT_PRESSED) != 0)
                   imgBackgoundX--;
                   if (imgBackgoundX < this.getWidth() - imgBackgound.getWidth())
                        imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
          * Responsible for the drawing
          * @param g
         private void render(Graphics g)
              g.drawImage(imgBackgound, imgBackgoundX, imgBackgoundY, Graphics.TOP | Graphics.LEFT);
              this.flushGraphics();
    }

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • J2ME problem with threads

    Hi all,
    I would like to ask you for a help. I need to write a small program at my university. I started to write a midlet which function would be to countdown time for sports activities. I woul like to start a new thread - the one that counts down - and at the same time make the main thread sleep. After the "countdown" thread finishes, the main thread wakes up and waits for user input. The problem is that when the "countdown" thread finishes his work, I've got Uncaught exception java/lang/NullPointerException. error and the midlet halts.
    Below you can find the code
    import java.lang.*;
    import java.util.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class intervals extends MIDlet implements CommandListener
    public Display ekran;
    private SweepCanvas sweeper;
    private Form rundy;
    private TextField round0, round1, round2, round3, round4, round5, round6, round7, round8;
    private long czas,x;
    private Command exitCommand;
    private Command addRound;
    private Command delRound;
    private Command start;
    private TextField repeat;
    private Form odliczanie;
    private Alert ostrz;
    Licznik thread;
    String test;
    StringItem test1;
    int parz,i,j,k;
    static int l;
    int ilrund;
    int ilpowt;
    Item sec;
    long sec1;
    public intervals()
        rundy = new Form("Interwa&#322;y sportowe");
        exitCommand = new Command("Wyj&#347;cie", Command.EXIT, 2);
        addRound = new Command("Dodaj","Dodaj rund&#281;", Command.ITEM,1);
        delRound = new Command("Usu&#324;","Usu&#324; ostatni&#261; rund&#281;", Command.ITEM,1);
        start = new Command("Start", Command.ITEM,1);
        odliczanie = new Form("Odliczanie");
        TextField dodaj(TextField kolej)
            kolej=new TextField("Podaj czas (s) rundy "+parz,null, 4, TextField.NUMERIC);//stworzenie nowej instancji do wybierania czasu trwania rundy
            if(rundy.size()==0)
                rundy.insert(rundy.size(),kolej);
                else
                    rundy.insert(rundy.size()-1, kolej);
            return kolej;
        void odliczanie(TextField round)
            monitor m=new monitor();
            k=Integer.parseInt(round.getString());
            ekran.setCurrent(odliczanie);
            thread=new Licznik(k,odliczanie);
            thread.start();
            ekran.setCurrent(rundy);
    public void startApp()// throws MIDletStateChangeException
        rundy.deleteAll();
        repeat = new TextField("Podaj ilo&#347;&#263; powtórze&#324;",null,1,TextField.NUMERIC);
        rundy.addCommand(addRound);
        rundy.addCommand(exitCommand);
        rundy.setCommandListener(this);
        Canvas obrazek = new MyCanvas();
        ekran = Display.getDisplay(this);
        ekran.setCurrent(obrazek);
        czas=System.currentTimeMillis();
        while (System.currentTimeMillis()<czas+1000)
            continue;
        ekran.setCurrent(rundy);
    public void pauseApp()
    public void destroyApp(boolean unconditional)
        notifyDestroyed();
    public void commandAction(Command c, Displayable s)
        if (c == exitCommand)
            destroyApp(false);
            notifyDestroyed();
        else if(c==addRound)
            if(rundy.size()==0)//Sprawdzenie ilo&#347;ci elementów w celu poprawnego wy&#347;wietlania liczby rund w formie
                parz=1;
                else
                parz=rundy.size();
            switch(parz)
                case 1:
                    round0=dodaj(round0);break;
                case 2:
                    round1=dodaj(round1);break;
                case 3:
                   round2= dodaj(round2);break;
                case 4:
                    round3=dodaj(round3);break;
                case 5:
                    round4=dodaj(round4);break;
                default:
                    ostrz=new Alert("Uwaga","Maksymalna liczba rund wynosi 9", null, AlertType.INFO);
                    ostrz.setTimeout(3000);
                    ekran.setCurrent(ostrz);
            if(rundy.size()==1)
                rundy.append(repeat);
                rundy.addCommand(start);
            rundy.addCommand(delRound);
        else if(c==delRound)
            if(rundy.size()!=0)
                rundy.delete(rundy.size()-2);
                if (rundy.size()==1)
                    rundy.deleteAll();
                if(rundy.size()==0)
                    rundy.removeCommand(delRound);
                    rundy.removeCommand(start);
        else if(c==start)
            ilrund=rundy.size()-1;
            if(this.repeat.size()>0)
                ilpowt=Integer.parseInt(this.repeat.getString());
            ekran = Display.getDisplay(this);
            for (i=1; i<=ilpowt;i++)
                odliczanie= new Form("Odliczanie");
                 for (j=0;j<ilrund;j++)
                    switch(j)
                         case 0:
                             odliczanie(round0);
                             break;
                         case 1:
                             odliczanie(round1);
                             break;
                         case 2:
                             odliczanie(round2);
                             break;
                         case 3:
                             odliczanie(round3);
                             break;
                         case 4:
                             odliczanie(round4);
                             break;
                         case 5:
                             odliczanie(round5);
                             break;
                         case 6:
                             odliczanie(round6);
                             break;
                         case 7:
                             odliczanie(round7);
                             break;
                         case 8:
                             odliczanie(round8);
                             break;
    class Licznik extends Thread
        int czas1,k;
        Form forma;
        monitor m;
        public Licznik(int k,Form formap)
            czas1=k;
            forma=formap;
        public synchronized void run()
            while(czas1>0)
                forma.deleteAll();
                forma.append("Czas pozosta&#322;y (s): "+czas1);
                try{Thread.sleep(1000);} catch(InterruptedException e){e.printStackTrace();}
                czas1--;
            if(czas1<=0)
                m.put();
        }and monitor class
    public class monitor
    boolean busy=false;
    synchronized void get()
        if(!busy)
            try
                wait();
            }catch(InterruptedException e){e.printStackTrace();}
        notify();
    synchronized void put()
        if(busy)
            try
            wait();
            }catch(InterruptedException e){e.printStackTrace();}
        busy=true;
        notify();
    }Can anybody help me with this?

    Groovemaker,
    Your Licznik class has a member m of type monitor, which has not been instantiated (in other words is null) hence, when calling m.put() you get NullPointerException. Please also mind, that using Thread.sleep(1000) is not an accurate way of measuring time.
    If I may, please use recommended for Java class naming conventions - some of your names use lower case, while other don't which is confusing to the reader.
    Daniel

Maybe you are looking for

  • In Purchase order history is not showing the Reversal of goods price

    Hello friends, I have created a PO , for that i have done the GR and invoice. Now i want to reverse the goods using MType-102, for that i have created the credit memo . I have done the reverse GR ,But in Purchase order history the For the GR reversed

  • This item is free in the store

    hi I have problem downloading One of the apps i paid for, "WhatsApp" I had problem last night i changed my pin code and forgot the code, so i went and erased the content and restored from iCloud, everything went perfectly, but I have noticed that the

  • 011 not seen in new iMessage

    Hola! There is a bug in the current version of iOS 6 In order to iMessage Mexico from the USA, one needs to include the North American dialing code of 011 and then the country number- 52 (81). The bug comes in that when I create a new iMessage and se

  • I have all the requirements;os x 10.6.8,2gb ram...(imac)

    bought,uploaded and install mt. lion for several times but unfortunately got this message:"INSTALL FAILED";OS X COULD NOT BE INSTALLED ON YOUR COMPUTER;OS X CAN'T BE INSTALLED ON THE DISK MACINTOSH HD,BECAUSE A RECOVERY SYSTEM CAN'T BE CREATED.please

  • I can not open iphoto or download pictures...

    I have to force quit every single time.  I have tried to reboot the computer etc....nothing has worked.