Disable Auto Orientation only in a specific frame!

Hi there! 
I appreciate if you please guide me with your experience in Mobile App design.
My App contains 5 frames of data (movieclips), that each frame has 2 designs:
1- Stand mode design    (portrait)
2- Wide mode design     (landscape)
So far it works great and I have published my App both on Google Play and Apple Store.
Frames structure is as follows:
frame   1            Loads External Data
frames 2-6         Each frame contains 1 MovieClip designed based on mobile "Stand mode"
frames 22-26     Each frame contains 1 MovieClip designed based on mobile "Wide mode"
(Example: contents of frame 2 and 22 are the same, also 3 & 23 ... 6 & 26)
(frame 2 is STAND design, 22 is WIDE design, and so on)
In "Air Setting Dialoge", I have selected aspect ratio "Auto" and "Auto orientation".
And I have this code in Frame 1 to do the rotation trick:
stage.addEventListener(Event.RESIZE, resizeLayout);
function resizeLayout(e:Event):void
               setPosition();
function setPosition():void
        //Phone turned from "Wide" to "Stand"
               if (stage.stageWidth < stage.stageHeight)
                              //App is now in "Wide" mode - means between frame 22 to 26
                              if (currentFrame>20) 
                                             //go to the same position of App but in "Stand" mode
                                             gotoAndStop(currentFrame - 20);
               else
                              //Phone turned from "Stand" to "Wide"
                              if (currentFrame<20)
                    //go to the same position of App but in "Wide" mode 
                     gotoAndStop(currentFrame + 20);
Well, and finally my question:
1- Is this way I have programed my App to rotate, a proper approach?!
      (in this way I can easily arrange objects on screen and also position them based on math calculations)
2- If I want to disable auto rotation only when app reaches specific frames, what should I do??
   (for example I want the app Not to auto oriente in Frame 6 and 26., but it rotates in other frames)
Hope it was not confusing and I cant wait to check out your valuable guidance!
All the best and thanks a lot for your time.

Hi there all!!
Still I have no answer for my question No1, BUT I could find my answer to the 2nd question and here it is for your kind notice:
Special thanks to Daniel Dura
http://www.adobe.com/devnet/flash/articles/screen_orientation_apis.html
I just added this code to my first Frame:
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, onOrientationChanging);
function onOrientationChanging(event:StageOrientationEvent ):void
          if (currentFrame == 6 || currentFrame == 26)
                    event.preventDefault();

Similar Messages

  • Photo: disable auto orientation?

    Is there a way to tag jpeg files so that ipod touch won't auto orient them?
    The default behavior is when viewing a landscape photo, I turn the ipod touch to landscape orientation and then wait for it to rotate the photo to landscape mode. Although this takes less than a second, it is still annoying.
    I would like all photos to be displayed in the orientation that maximizes display size and let me turn the ipod touch if I want to (or I can just tilt my head).

    i often think this would be a useful feature (not just for photos, personally i never use the landscape/coverflow mode when playing music - mostly because of the lack of control you have over what is playing - it's irritating if it switches by accident)
    tell apple you would like it: http://www.apple.com/feedback/ipodtouch.html

  • Auto orientation only in landscape modes, text centering when typing

    Hi,
    I have two problems:
    1. I don't want to rotate my app when device is in portrait position, only flip it horizontal when it is rotated to another landscape position
    2. Text is not centered when typing into input textfield with centered text (but it is ok after confirming).
    Any help would be very appreciated!
    Thanks!

    I've had to solve this problem (#1), and there are many aspects and difficulties to it. I wrote up a long email about the problem, which I'll paste here. Hope you can follow along!:
    I’ve wanted to do autorotate landscape only, and thought that I only had the choice of either autorotate to all four orientations, or no autorotate at all, but I just looked into it, and through reading three different topics here, I managed to do achieve everything I wanted. So I’ll write it up here in case someone else doesn’t have as much luck searching through the old messages.
    In my particular case I have two reasons to want to be landscape: 1. The design is a landscape one, and not one that can easily be rearranged into a portrait mode. 2. We have gameplay that involves tilting the device, and although it’s fine tuned to work in a narrow range of tilting, people keep on tilting so much that the portrait mode kicks in. With the right kind of game, you could really lose your marbles when that happens!
    Those problems can be solved by not autorotating, and finding a way to force landscape. But then that runs into another issue. If it worked that way, an iPad version would be rejected by Apple.
    There are several problems to solve (which I think also apply to Android):
    Autorotate without allowing normal or upside down portrait.
    Make it be landscape from the start even if the user is holding it in portrait as they open the app (setting that in publishing doesn’t achieve the goal).
    Allow someone to change their mind about which landscape they want to use.
    Here’s the way to solve the first issue:
    stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);
    function orientationChangeListener(e:StageOrientationEvent) {
    if (e.afterOrientation=="default"||e.afterOrientation=="upsideDown") {
    e.preventDefault();
    Once you’re in normal landscape, you can only be in normal landscape or upside down landscape. The Portraits are prevented from happening, because StageOrientationEvent.ORIENTATION_CHANGING happens before the autorotate kicks in.
    Making it be landscape from the start can be done like this:
    stage.setOrientation(StageOrientation.ROTATED_RIGHT);
    but that would only work well for the majority. People who like to hold the device in the upside down landscape would be frustrated. So that can be taken care of by looking at which way the device is at the time the app is opened. Also, as it may initially be in Portrait (because the user doesn’t yet know that your app is landscape designed), you have to decide with landscape to give them. I reason that giving them the normal landscape would be the safer bet. That all comes out as these lines:
    var startOrientation:String=stage.orientation;
    if (startOrientation=="default"||startOrientation=="upsideDown") {
    stage.setOrientation(StageOrientation.ROTATED_RIGHT);
    } else {
    stage.setOrientation(startOrientation);
    That’s nearly all the problems solved, but there’s one last one, which I’ll log a bug about (once there is an iPhone beta again). If you open the app in rotatedright and then change your mind to want to use it as rotatedleft, the autorotate works wonderfully. Unfortunately, if you start in rotatedleft and then want to use rotatedright, the autorotate does not work, no matter how many contortions you do. You have to quit the app and hold it in portrait or rotateright from the start.
    This turns out to be easily worked around, by doing the counterintuitive step of setting Portrait in publishing settings. Then when you tell it to be one of the landscapes by doing stage.setOrientation, the app can tell that going from rotatedleft to rotateright is a change of rotation, because it already got kick started with a change away from the default setting of Portrait.

  • Is it possible to disable auto reloading, permanently, for one specific URL?

    msnbc.com is supposed to auto-reload its home page every however often, 30 minutes I think. But the reload never stops, probably because of my AdBlock settings for the site. I want to permanently stop msnbc.com from reloading. I've searched thoroughly with many keywords, and though I've found many extensions that will reload pages or set auto-reload intervals, I can't find anything that *stops* auto-reload. I'd appreciate any help.

    Mike,
    Not sure if I completely understand your dilema.  I don't know of any way to pause a FMR, however, I may be able to help with plan B.  I have a widget called Repo Playbar that allows you to reposition the playbar AND show/hide any playbar buttons, including the play/pause button.  Have a look here.
    HTH,
    Jim Leichliter

  • StageOrientation without device auto-orientation

    There are lots of docs and posts online about being able to use StageOrientation without a device orientation itself having to change (disabling auto-orientation). I have tried autoOrients set to false and the alternative event.preventDefault ... but nothing works. Adobe Flash always changes the device orientation when I get StageOrientation.
    Is there a sample I can download? I have tried every publishing and Actionscript 3 setting/combination and it just isn't working. Auto orientation seems to be the only way to use StageOrientation.
    I am using latest Adobe Flash CC 2014 and can get the app to either auto orientate and show me the StageOrientation value, or lock the orientation and get not StageOrientation value. I tried this on a few ios devices and cannot get this working right. Please help.

    The docs say "In some cases you may want to disable auto-orientation to ... handle resizing the stage and rotating objects yourself. You can accomplish this with ... autoOrients property and set it to false. While you will still receive the ORIENTATION_CHANGE and ORIENTATION_CHANGING events when the actual device orientation changes, the stage will not update to try and match that orientation."
    This does not work in practice however (keeping in mind I have used various combinations of true and false autoOrients and preventDefault - nothing works as described, until setting autoOrients to true, but then the orientation changes, even when I use preventDefault as described in the docs!?):
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    stage.autoOrients = false;
    main.appOrientation.text = 'Loading...';
    // we can control which orientations we want to allow with the following code
    stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, onOrientationChanging );
    function onOrientationChanging( event:StageOrientationEvent ):void {
        main.appOrientation.text = StageOrientation;  
        // If the stage is about to move to an orientation we don't support, let's prevent it
        // from changing to that stage orientation.
        if(event.afterOrientation == StageOrientation.ROTATED_LEFT || event.afterOrientation == StageOrientation.ROTATED_RIGHT){
            //main.appOrientation.text = 'Change';
            event.preventDefault();

  • Motion 3 Crashing at specific frame - only in Best Quality setting!

    Hello everyone,
    I've got several Motion projects that show the same problem:
    The project behaves and exports fine as long as I don't set the Render Quality to "Best". When I set the Quality to "Best", Motion will always crash at a specific frame (not the same frame in different projects, but always the same frame for a specific project). E.g. Motion exports the clip fine (Image Sequence or Quicktime movie) up to the problematic frame. When it reaches that frame it simply crashes. If I check that frame in Motion, Motion crashes instantly if I have the Render Quality set to Best. If I set it to anything else, it shows the frame without problems.
    This behaviour is the same on my MacBookPro 2 GHz, 2 GB Ram as on a G5 Dual 2 GHz, 3 GB Ram.
    I hope anyone has an idea how to fix this, I need to render those clips!
    Thanks in advance!
    Bjoern

    No one at all?
    That's too bad. I can't imagine that I'm the only one having this problem.
    I sure hope that Apple releases an update to Motion that fixes the numerous bugs.

  • Can I disable photo stream only on specific WIFI connection?

    Hi,
    I just purchased a mobile router with a data limit 50MB/day for my old iPhone 4.
    This iPhone 4 only connects to WIFI network.
    I like photo stream and want to keep using it with my unlimited family WIFI network, but, the problem is when I connect it to my mobile route through WIFI, the photo stream won't stop working.   That cause my 50M/day plan runs out in a minute.
    So, is there a way to disable photo stream only on specific WIFI connection?
    I tried iPhone Configuration Utility and it seems not have a function like that.
    Thanks in advance!

    Welcome to the Apple Community Katie.
    It is the purpose of photo stream to sync all photos to all devices, the only way to remove the photos from the computer without affecting other devices is to turn photo stream off.

  • How can I disable auto-switching desktops?

    I've long appreciated the spaces/mission control feature of OS X. However, it seems more oriented to organizing desktops by application rather than by project.
    Like many users, I suspect, I use different desktops for different projects, each of which requires a variety of applications (finder, word docs, spreadsheets, etc). When I'm working on project 1 in desktop 1, I never want to be whisked away to desktop 2. In fact, I never want to be switched to a different desktop automatically. If I click on an application, I want it to open a new window for that application. If a new iteration of an app can't be opened (ie, Mail), I'd like it to pull Mail to me rather than send me off to it. Aren't apps supposed to come when we call, not the other way around?
    I have unchecked "...switch to a space with open windows of that application" in System Prefences, but my desktop continues to auto-switch, especially with Finder.
    In short: is there a way disable auto-switching entirely? I'd like to be able to assign windows and navigate manually without being constantly pulled away from the project I'm working on.
    Thanks for the help; I really appreciate people spending their time helping others on forums like this one.

    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode.  Shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About
    General information.
    Isolating issues in Mac OS X
    Troubleshooting Permission Issues
    Step by Step to Fix Your Mac

  • Removing a Button Event Listener on a Specific Frame and Reactivating it on Next Frame

    Hi , i am trying to develop a Slideshow where Next Button needs to behave in a certain way on a specific Frame , lets say a Specific Condition is met only then Next Button would work , I have been able to achieve that but problem is the Button Retains its Event Listener even on the next Frame , whereas  i have already included removeEventListener on the next frame with a new Function for the button , but its doesnt take it like that.
    Can anyone help please ?

    Hello Ned,
    I have fixed the issue with few Frame , but where we have the conditions to be met on two consecutive frames , I am not able to achieve that.
    here is the Code on my first Frame.
    FRAME1
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    mc_prog.width = 0;
    //LIBRARIES TO BE IMPORTED ///////////////////////////////////////////////////////////
    import flash.events.MouseEvent;
    //VARIALBLES INITIATED
    var score:Number = 0;
    var questions:Number = 0;
    var qtotal:Number = 11;
    var attempt:Number = 0;
    var indexframe:int;
    indexframe = this.totalFrames - 1;
    var notes:Array = new Array();
    var count:int;
    count = 0;
    var backcounter:int;
    backcounter = 0;
    var count2:int;
    count2 = 0;
    var backcounter2:int;
    backcounter2 = 0;
    var count3:int;
    count3 = 0;
    var backcounter3:int;
    backcounter3 = 0;
    // MOVIE CLIPS INITITATED ////////////////////////////////////////////////////////////////
    var volbutton1:volcontrol;//VOLUME BUTTON ROLLOVER MOVIE CLIP
    volbutton1 = new volcontrol();
    var clist:courselist;//VOLUME COURSE LIST ROLLOVER MOVIE CLIP
    clist = new courselist();
    var pop1:Mc_slide9 = new Mc_slide9;
    pop1 = new Mc_slide9;
    var pop2:Mc_slide13 = new Mc_slide13;
    pop2 = new Mc_slide13;
    var pop3:Mc_slide17 = new Mc_slide17;
    pop3 = new Mc_slide17;
    //BUTTONS INITIATED
    btn_nxt.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame);//NEXT SLIDE BUTTON
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);//BACK BUTTON
    btn_loc.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage); //LIST OF COURSES BUTTON
    btn_notice1.addEventListener(MouseEvent.CLICK, loadnotice1);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    btn_notice2.addEventListener(MouseEvent.CLICK, loadnotice2);
    pop2.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn2);
    btn_notice3.addEventListener(MouseEvent.CLICK, loadnotice3);
    pop3.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn3);
    //VOLUME BUTTON ROLL OVER FUNCTION EVENT LISTENERS ///////////////////////////////////////
    btn_vol.addEventListener(MouseEvent.ROLL_OVER,vol);
    btn_vol.addEventListener(MouseEvent.ROLL_OUT,volout);
    btn_loc.addEventListener(MouseEvent.ROLL_OVER,coursel);
    btn_loc.addEventListener(MouseEvent.ROLL_OUT,corlist);
    // FUNCTIONS INITIATED /////////////////////////////////////////////////////////////////
    function fl_ClickToGoToNextFrame(event: MouseEvent): void
      nextFrame();
    function backbtn(event:MouseEvent):void{
       prevFrame();
    function fl_ClickToGoToWebPage(event: MouseEvent): void {
      navigateToURL(new URLRequest("https://www.onlineinduction.com/fmgl/courselist.php?ist=2&type=Vendor Employee Inductions"), "_self");
    //VOLUME BUTTON ROLLOVER EFFECT FUNCTION
    function vol(e:MouseEvent):void
      addChild(volbutton1);
      //popup_instance.width = 675;
      //popup_instance.height = 300;
       if(this.currentFrame == 2)
        volbutton1.x = 150;
        volbutton1.y = 528;
       else{
        volbutton1.x = 278;
        volbutton1.y = 528;
      function volout (e:MouseEvent):void {
        removeChild(volbutton1);
       function coursel(e:MouseEvent):void {
       addChild(clist);
        if(this.currentFrame == 2)
         clist.x = 85;
         clist.y = 532;
        else if(this.currentFrame == 5){
         clist.x = 115;
         clist.y = 325;
        else{
         clist.x = 175;
         clist.y = 532;
      function corlist (e:MouseEvent):void {
        removeChild(clist);
    function loadnotice1(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count == 1 && stage.contains(pop1))
       removeChild(pop1);
        if(count == 1)
         nextFrame();
        else
         addChild(pop1);
         pop1.x = 40;
         pop1.y = 120;
         count = 1;
      trace("Counter Value:" + count);
    function loadnotice2(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count2 == 1 && stage.contains(pop2))
       removeChild(pop2);
        if(count == 2)
         nextFrame();
        else
         addChild(pop2);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
      trace("Counter Value:" + count);
    function loadnotice3(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count3 == 1 && stage.contains(pop3))
       removeChild(pop3);
        if(count == 3)
         nextFrame();
        else
         addChild(pop3);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
      trace("Counter Value:" + count);
    function nextframe9(event: MouseEvent): void
        if(count == 1 && stage.contains(pop1) )
           removeChild(pop1);
        if(count == 1)
         nextFrame();
        else
         addChild(pop1);
         pop1.x = 40;
         pop1.y = 120;
         count = 1;
    function nextframe13(event: MouseEvent): void
        if(count2 == 1 && stage.contains(pop2) )
           removeChild(pop2);
        if(count2 == 1)
         nextFrame();
        else
         addChild(pop2);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
    function nextframe17(event: MouseEvent): void
        if(count3 == 1 && stage.contains(pop3) )
           removeChild(pop3);
        if(count3 == 1)
         nextFrame();
        else
         addChild(pop3);
         pop3.x = 40;
         pop3.y = 120;
         count3 = 1;
    function backbtnscript1(event:MouseEvent):void
       if(stage.contains(pop1) )
          removeChild(pop1);
          backcounter = 1;
          trace("back" + backcounter);
          prevFrame();
    function unloadbtn1 (e:MouseEvent):void {
      removeChild(pop1);
    function backbtnscript2(event:MouseEvent):void
       if(stage.contains(pop2) )
          removeChild(pop2);
          backcounter2 = 1;
          trace("back" + backcounter2);
          prevFrame();
    function unloadbtn2 (e:MouseEvent):void {
      removeChild(pop2);
    function backbtnscript3(event:MouseEvent):void
       if(stage.contains(pop3) )
          removeChild(pop3);
          backcounter3 = 1;
          trace("back" + backcounter3);
          prevFrame();
    function unloadbtn3 (e:MouseEvent):void {
      removeChild(pop3);
    //SLIDE COUNTER
    and here is the Code on all the Frames where I need to call in specific Listeners
    FOR EXAMPLE ON FRAME 8,9,10,
    Here Is the Code ,
    FRAME 8
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    count = 0;
    backcounter = 0;
    btn_nxt.addEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.removeEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.removeEventListener(MouseEvent.CLICK , nextframe9);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    //btn_notice1.addEventListener(MouseEvent.CLICK , loadnotice1);
    FRAME 9
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    //POPUP FUNCTION
    count = 0;
    btn_nxt.removeEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.removeEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.addEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.addEventListener(MouseEvent.CLICK , nextframe9);
    btn_notice1.addEventListener(MouseEvent.CLICK , loadnotice1);
    FRAME 10
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    count = 0;
    backcounter = 0;
    btn_nxt.addEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.removeEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.removeEventListener(MouseEvent.CLICK , nextframe9);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    I am repeating this Pattern on each frame set where I need these Listeners ,
    Problem is with the next one where I have two consecutive frames have different conditions to meet, any ideas how would I disable and enable listeners respectively on these frames ?
    I hope I am not confusing this very much ?;(

  • Disable Auto-Mounting

    Hi Everyone,
    I have been searching forum after forum trying to find an answer to my question but am not having any luck. I have found one option but there has to be a better way. As I am taking a Computer Forensics major I need to disable auto-mounting of USB drives so I can manually mount the device with read-only options so I do not destroy evidence on drive I need to investigate.
    About 3 versions ago in Ubuntu I was able to just uncheck a box in the system settings so it would not auto-mount. Then they decided to get rid of that option because it was not compatible with changes they made to other parts of the system. So to get around the auto-mounting I found that I could shutdown hal, plug the drive in, issue my mount command, then finally restart hal so network manager and other services that needed it could run right. This seems kind of pointless to have to shut down hal and break things just so I can mount a drive. Since I recently left Ubuntu behind and converted to Arch I thought I would see if you guys had any ideas.
    I know I can add options to fstab but since I will get a different drive for every investigation this doesn't seem to be an option either.
    Any help you guys could offer would be highly appreciated.
    Thanks,
    Timn
    Last edited by Timn (2009-11-17 01:18:33)

    It is probably your window manager that does the auto-mounting, not arch. If it's gnome, there is a key in the gconf "/apps/nautilus/preferences/media_autorun" which you would need to disable. I do use FluxBox as a WM which does not do any mounting. These are the only window managers for which I can provide specific inforamtion. But no matte what you use, KDE, XFCE or something else, there should be a configuration that allows you to disable it.
    If that didn't help, please provide more specific information about your setup.

  • How to disable auto-sort for AdvancedDataGrid

    Hello,
    I am using Flex 4, ActionScript 3.
    I want to disable auto-sort. Meaning I want the sort to be executed only when the user clicks the column header, not when new rows are added to the binded collection or when values are changed.
    So far, I've found only this on the Internet:
    http://]http://tomek.me/disable-sort-on-datagrid-edit-update/
    I'd like to avoid doing that if possible.
    Many months ago, I found a solution that involved using event.preventDefault() placed somewhere. I thought I wouldn't have a problem finding it again, but I am.
    Can someone please help? Thanks!
    Bon :-D

    Hi,
    I have created SSCCE. I do not like that jComboBox spread over the whole display. I would like that the jComboBox width is only about 2 inches (5cm). If you run example below you will see that jComboBox width auto resize.
    Regards,
    Primoz
    import java.awt.*;
    import javax.swing.*;
    public class PrimozComboBox extends JPanel {
        JLabel picture;
        public PrimozComboBox() {
            String[] petStrings = { "Bird", "Cat", "Dog", "Rabbit", "Pig" };
            String[] cityStrings = { "New York", "Ljubljana", "Chicago" };
            JComboBox petList = new JComboBox(petStrings);
            petList.addItem("This is very long pet name, which could spread over many lines");
            add(petList);
            JComboBox cityList = new JComboBox(cityStrings);     
            cityList.addItem("This is very long city name, which could spread over many lines");
            add(cityList);
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("ComboBoxDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new PrimozComboBox();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • Adobe air 3.4 + auto orient

    I'm having trouble with getting the app I'm creating (using Flash professional CS6) to auto orient reliably.  if the app is moved from portrait to landscape, it works fine.  when moved back from landscape to portrait, then the screen items do not move to the desired spots.  within each of the "if" statements I also have commands for setting where screen items within the milApp movie clip are to appear.  Any help is greatly appreciated.
    //function to set the stage orientation for the app;
    function orientMilApp(event:Event):void
        var device_width:int = appStage.stageWidth;
        var device_height:int = appStage.stageHeight;
        if (device_width > device_height)
            milApp.gotoAndStop("landscape");
            //set the height, width, and position of the cheat sheet;
            milApp.cheatSheet_mc.x = 0;
            milApp.cheatSheet_mc.y = 100;
            milApp.cheatSheet_mc.height = 1657.25;
            milApp.cheatSheet_mc.width = 1280;
            milApp.closeButton_btn.x = 1200;
            milApp.closeButton_btn.y = 101;
            //set the dimensions and position of screen items for the driver manual
            //set the dimensions and position of screen items for the reference manual
          } else {
            milApp.gotoAndStop("portrait");
            milApp.closeButton_btn.x = 720;
            milApp.closeButton_btn.y = 101;
            //set the height, width, and position of the cheat sheet;
            milApp.cheatSheet_mc.x = 0;
            milApp.cheatSheet_mc.y = 100;
            milApp.cheatSheet_mc.width = 800;
            milApp.cheatSheet_mc.height = 1035.80;
            //set the dimensions and screen items of the driver manual
            //set the dimensions and screen items of the reference manual
    appStage.addEventListener (StageOrientationEvent.ORIENTATION_CHANGE, orientMilApp);

    Having not known the devices you want this to be on, I'd go back to simply measuring the devices resolution width versus height and translate that into landscape or portrait. All you calculations should be based on the returned resolutions for placement of items. It will require somewhat of a layout engine and for you to clearly mark what device resolutions you support.
    For instance it's pretty easy to handle Apple because you're really only dealing with 1024x768 or 2046x1536 and portrait is DEFAULT. However if you're just measuring device width and height, you'll still get the same result, portrait, from your measurements.
    Android is really rough but gives you more granular control over the minimum and maximum size and resolution of the device. You can clearly mark in your apps android settings that you only support say, 7"-10" devices with a resolution of a certain size (marked as ldpi, mdpi, hdpi, xhdpi). For more info and what all those settings mean, read here: http://developer.android.com/guide/practices/screens_support.html
    xlarge screens are at least 960dp x 720dp
    large screens are at least 640dp x 480dp
    normal screens are at least 470dp x 320dp
    small screens are at least 426dp x 320dp
    Staying inside xlarge keeps you in the 7-10" safe range for a larger tablet like the Galaxy.

  • Disable auto-updates/Adobe Application Manager

    there is no forum for this - I use Illustrator and Photoshop CS6 non-CC on macbook pro running 10.8.5 or 10.9.2. I would like to not have AAM search for updates in the background, but initiate the **search** for updates manually. The reason is that I live a bit off the grid and pay quite a lot per minute, and AAM kept the internet connection open the whole night, even though the browser said it was closed.
    I only found instructions for CS5:
    http://helpx.adobe.com/creative-suite/kb/disable-auto-updates-application-manager.html
    does this work for CS6 the same way? I am by no means a system admin but I can replace this AdobeUpdaterPrefs.dat file. (and keep the original else where)
    thanks.
    edit: why on earth does adobe insist on displaying my real name in a public forum, when it even asks me to make a screen name first. There is no forum for this either, I guess.

    ... adobe insist on displaying my real name in a public forum...
    that is gone, thanks.

  • IE11 can't post form data to specific frame or window dialog opened via window.open()

    Hello,
    Form POST targeting to specific frame or dialog popped up via window.open() no longer works in IE11.
    It worked fine in IE10 and all previous versions of IE.
    Please see screenshot attached with simple test that reproduces this problem.
    Direct Link to screenshot:
    http://173.231.98.44/cgi/TestFolder/IE_11_widow_frame_targeting_BUG.jpg
    Direct link to simple test page demonstrating this problem:
    http://173.231.98.44/cgi/TestFolder/page2.asp
    Note: IE11 doesn't report any errors, doesn't complain about anything, even when debugged via F12 developer tools. The only thing it complained initially was missing doc type declaration on top of page, but even after adding doc type definition, problem still
    persists, makes no difference.
    I tested this on fresh install of Windows 2012R2 while testing our web application with the new IE11.
    I believe doing this on Windows 8.1 with IE11 will result in same bug/problem.
    Our web application uses a technique whereby it launches a popup window via call to window.open(), passing blank URL and specifying a name for the new window. It then does a from post targeting the name of new dialog.
    In IE11 this functionality has been broken and no longer works.
    Problem is that IE11, instead of posting form to the newly created dialog, it launches a new instance of IE and then loads the requested form in this new instance of IE, while the dialog launched via window.open() remains on screen and is empty. If user repeats
    launching same form post request (via button click for example), IE 11 keeps creating new empty dialogs and new IE instance for every form post executed. This totally breaks our application because we use many so called "wizards" that encapsulate
    specific functionality in separate web page launched in a popup window.
    Another related problem is that if a dialog is launched with window.open(), the java script code in the dialog can not target the parent frame that opened the dialog anymore. In our application, when a dialog is closed, it typically needs to trigger a refresh
    of a specific frame within the parent window (again targeted by name) to reflect saved/updated info that user entered in the popup dialog. The result is that we can't refresh the parent frame after the pop up dialog closes. Instead, IE11 launches
    a new instance of IE (not just a tab, but a whole new instance) and loads the parent frame in it.
    The problem seems to be caused by broken frame name targeting mechanism in IE11.
    Note that we force IE to compatibility mode 5, but even without specifying any compatibility, the problem remains.
    Typical java script to reproduce this is:
    <input type="button" onClick="Popup(this.form);" name="btn2" value="Popup Dialog">
    function Popup(f){
        window.open("","MyNewDialogName","width=200,height=150");
        f.action = "page3.asp";
        f.target = "MyNewDialogName";
        f.submit();
    Expected: IE11 should correctly post form to and load targeted page in the newly popped up dialog, without opening new IE instance and new tab. Repeatedly posting form to existing popup window should reuse that window, not keep on launching more popup windows
    and then more IE instances.
    Steps to reproduce the problem (include URL if applicable):
    URL with sample page: http://173.231.98.44/cgi/TestFolder/page2.asp
    1) Create page1.htm: <html><body>display "I'm in a popup window now ..."</body></html>
    2) Create page2.htm with a button and onclick() event calling function to open dialog, and do form POST targeting new dialog calling page1.htm, like below.
    <input type="button" onClick="Popup(this.form);" name="btn2" value="Popup Dialog"> function Popup(f){
        window.open("","MyNewDialogName","width=200,height=150");
        f.action = "page1.asp";
        f.target = "MyNewDialogName";
        f.submit();
    3) Open IE11, navigate to page2.htm, click the "Popup Dialog" dialog button. IE 11 will popup the new dialog, but then it will also launch new instance of IE11 and display the page1.htm in it, instead of in the popup dialog.
    Has anyone else encountered this problem?
    Any insight or help is appreciated.
    Regards
    Peter

    the default action of <input type="button" is submit. Note also that the default type of <button> elements is 'submit' also.
    add a return false to the onclick inline event handler (which constructs the form submit attribues) to cancel the default form.submit behavior.
    form elements have a target value with which you can specify the name window into which you want the form to open in.
    <form action="process.aspx" target="popup">
    you can use the window.open method with a query uri to achieve the same outcome.
    window.open('process.aspx?s=search+term&amp;foo=bar','popup',{features})
    the outcomes of all scripted windows are affected by
    your IE Popup blocker and tabbed browsing settings
    which in turn is affected by your IE Security zone settings (for popup blocking handling)
    and the settings of any third-party popup blocker you may have installed and enabled... it may not necessarily be visible on your browser toolbar.
    The first step in troubleshooting web browser issues is to test in no-addons mode.
    Use the Developer Tool to find out what documentMode the test page is opening in on your system. On Modal/Modeless popup windows use the f12 key to display the Developer tool positioned on the contentWindow.
    Use File>Properties to find out what IE Security zone it maps to... there is a security setting to prevent navigation into zones of lower integrity.
    Rob^_^

  • How link from html page to a specific frame in flash cs5 as3

    Hi!
    I'm kinda new around here. I am interested in knowing how to link from a specific html page to a specific frame in flash cs5 as3.
    I have a website that I originally began to design in flash but later started developing new pages for it in html. The flash part of it has several pages on different frames and I have created links from the flash part to the other html pages, but, I can only link the html pages back to the main flash home page, and not the other pages in the flash part of the website.
    I have read that in cs3 it was possible using the flashvars skip variable, but I don't know how to do it. I have not yet seen any working examples and I could not find any instructions / tutorials online for cs5.
    Can someone help here?

    add a query string, to the swf's embedding html, with variable/value indicating the frame you want to display in your swf.  add a javascript function to return the query string (or entire url), call the javascript function from flash using the externalinterface class.  and finally add code to your swf to parse the returned url or query string, parse it and then direct your timeline to the appropriate frame.

Maybe you are looking for

  • GETTING DATA FROM ODS BY USING A FUNCTION MODULE..

    Hi Frnzs, Here is my issue..Plz go thru it.. I  have a function module (YFSF_ICR_GET_EXCHG_RATE_ODS). the function performs the current logic without any changes, that is reading SPOT rates for actuals (the planning cycle is empty) or S rates for for

  • Extracting xml from BLOB and display on the Browser on the fly using xslt

    HI All, I am storing my xml file in BLOB in oracle database. Now in my java-jsp application, I want to display this xml file, by extracting from BLOB in a formatted/html way...( XSLT/CSS Style) on the fly.. means without storing it as a .xml file. Pl

  • Upgrading to 10g with a Physical Standby in Place

    I am looking through Oracle note 278521.1 for upgrading my Oracle database with stand by database and I have problem with step 15: 15.  In order to optimize performance the 10g Release 1 and lower versions of the Database Upgrade Assistant will disab

  • Hide the timeline in the final HTML5-file? (Captivate 6)

    Hello I've got a problem: When I save my project (It's a softwaresimulation) then there always appears a small timeline at the bottom (It's not just in the Captivate, also when I open it in Firefox) How can I hide it? I already searched everywhere, a

  • Print Bar Code number

    hi All. i develop a employee attendance software. i shall make cards for all employee. problem is that how i convert the employee code to its equalent Bar Code in Report. Tell me detailed. Thx Imran