How to get the width and height of Flex Mobile view?

Hello

The following instructions can get the width and height of the current Flex app:

var request: UIComponent = FlexGlobals.topLevelApplication as UIComponent;

trace (application. Width);

trace (application. Height);

But I don't know how to get the width and height of mobile display Flex current (i.e. the content size excludes bar action and the Navigation bar). Why the "this.width" always returns 0?

Thank you!

Looks like you're running in this bug: https://bugs.adobe.com/jira/browse/SDK-30070

Tags: Flex

Similar Questions

  • How to get the width and height of a loaded image?

    Hello world

    Clicking on one of the 26 letters of the alphabet, I display 15 logos, starting with the first brand whose initial is the clicked letter.

    Logos have different dimensions, but I can't recover, so that they appear stretched or squeezed, retaining the width and the height of the first 15 logos put on stage in the edge source.

    Both the two console.log in the following code produces w = 0 h = 0 :

    -just after the assignment of the src attribute;

    -in the callback to the loadfunction.

    $('.letter').on ('click', Function)

    {

    swap the 15 images of logo

    for (var i = 0; i < 15; ++ I)

    {

    var patriciacartailler is sym. $("logo" + (i + 1));

    iBrand var = / / calculate the index of good

    radical var = .logo brands [iBrand];

    filePath var = ' images /' + radical + ".gif";

    var imLogo = new Image();

    imLogo.src = filePath;

    Console.log (I +' ' + radical +' BEFORE w = ' + imLogo.width +' h = ' + imLogo.height);

    patriciacartailler

    .Attr ('src', filePath)

    . Hide()

    . Load (Function)

    {

    Console.log (I +' ' + radical +' AFTER w = ' + imLogo.width +' h = ' + imLogo.height);

    $(this)

    .Attr ("width", imLogo.width)

    .Attr ("height", imLogo.height)

    . fadeIn();

    });

    }

    });

    Any idea? Thank you

    Gil

    Much better demesstified thank you, Zaxist.

    brands = {};

    Letter = {'A': 0, 'B': 0, 'C': 0,'d ': 0, 'E': 0, 'F': 0, 'G': 0, 'H': 0, 'I': 0, 'J': 0, 'K': 0, 'L': 0, ': 0,}

    {, 'O': 0, 'P': 0, 'Q': 0, 'R': 0, THE FROM ': 0, 'T': 0, 'U': 0, 'V': 0, 'W': 0, 'X': 0, 'Y': 0, 'Z': 0};

    //------------------------------------------------------

    $.getJSON ("brands.json", function (data))

    {

    the JSON file contains objects sorted by alphabetical order of their ownership of the mark

    brands = data;

    initialize the array of entries by letter

    key var = "z";

    $(données, fonction (index, entrée) .each)

    {

    initial var = entry.brand.charAt (0);

    If (initial! = key & initial! = 'É')

    {

    Letter [initial] = index;

    key = original;

    }

    });

    fill the empty entries

    for (var keyLetter in letter)

    {

    If (letter [keyLetter] == 0 & keyLetter! = 'A')

    {

    If (keyLetter is 'Z')

    {

    Letter ["Z"] = the letter ["Y"];

    } else {}

    value of the next entry

    [KeyLetter] = letter [string.fromCharCode(0)) (keyLetter.charCodeAt () + 1)];

    }

    }

    }

    swapLogos (0);

    });

    //------------------------------------------------------

    function swapLogos (iFirst)

    {

    Console.log (iFirst);

    for (var i = 0; i)< 15;="">

    {

    var patriciacartailler = sym.getSymbol ("cell_" + (i + 1)). $('square');

    iBrand var = iFirst + i;

    If (iBrand<>

    {

    patriciacartailler

    (. CSS

    {

    "background-image':" url (images / "+ .logo brands [iBrand] +".gif) ","

    'background-size': 'auto',

    'background-repeat': 'no-repeat '.

    'background-position': 'Center '.

    })

    . Show();

    } else {}

    theLogo.hide ();

    }

    }

    }

    //------------------------------------------------------

    $('.lettre').on ('click', Function)

    {

    var letter = $(this) .attr ('ID') .charAt (6).  Stage_A

    swapLogos (letter);

    update the letter highlighted (color)

    $('.lettre').css ('color', '#EEE');

    $(this) .css ('color', '#FF3');

    });

    //------------------------------------------------------

    Download here: https://app.box.com/s/c1hlvbfrum4yzypc1mid

    Gil

  • How to get the width and height of the model.

    Hi, I am writing a script which sends my AE comps in a render farm.  I need to retrieve the size of the frame (height and width) of the model.  But I'm unable to find the method to do it.  Is this possible via javascript?

    Thank you

    myComp would be a reference to your object model. You could get it from the activeItem if your comp is opened and selected:

    var app.project.activeItem = myComp;

    If not, you will need to loop through the elements of project until you find an element of the model with the name of the model you are looking for (not tested, but should be close):

    var myCompName = 'Hand Comp';

    var myComp = null;

    for (var i = 1; i)<= app.project.numitems;="">

    If ((.name app.project.item (i) == myCompName) & (app.project.item (i) instanceof CompItem)) {}

    myComp = app.project.item (i);

    }

    }

    If (myComp! = null) {}

    var l = myComp.width;

    var h = myComp.height;

    } else {}

    Alert ("Cannot find model" + myCompName);

    }

    Dan

  • Get the width and height of the image

    Hi scripters

    I try to get the width and height of my image file. Here is my code

    myPicFile = File("c:\\ar.eps");

    h = myPicFile.height;

    w = myPicFile.width;

    Alert (h)

    Copy the following code generates error

    ---------------------------
    Script alert
    ---------------------------
    undefined
    ---------------------------
    Ok
    ---------------------------

    How can I get the height and the width of my image? is there another method?

    Thanks in advance

    concerning

    a you are the

    Dear Arul,

    Here, my code is in InDesign. I don't know that we get the size of the Image directly. ?

    Throught InDesign [you using the InDesign Script then] Script here I pasted the code below...

    = Image height / width =.

    myDoc var = app.activeDocument;

    myPicFile = file ("E:\\HariharaSudhan\\Blue hills.jpg");

    App.place (file (myPicFile);

    = Then u please select the Image file in InDesign and then you run the script = / /.

    mySel var = app.selection [0];

    var limit = mySel.geometricBounds;

    var height = related [2] - bound [0];
    var width = Bound [3] - bound [1];

    Alert ("Image Height:" + height + ""+"Image width:" + width);

    = End: getting the Image height / width =.

    Please let me know if you have any questions.

    Thank you & best regards

    Thierry T.R.Harihara

  • How do I get the width and height of an external image

    Hello

    lets say I want to get the width and/or height of this external image (it could also be an external file on my hard drive): http://www.icatcher.com/wp-content/uploads/2013/01/Adobe.PNG

    I create a button and add an onClick function that says:

    var externalImageWidth = ???
    alert(externalImageWidth);
    

    How can I do (so to speak dynamically?)  without the addition of the image itself to my library or put it on the stage?

    All my attempts said 'indefinite' or '0' or they simply do not work.

    Thanks in advance!

    You can try the following (assuming that there is a dummy container with id mydiv = div),

    var img = new Image();

    IMG. OnLoad = function() {}

    SYM. $("mondiv") .attr ("width", this.width) .attr ("height", this.height) .append (this);

    };

    IMG. SRC = "http://www.icatcher.com/wp-content/uploads/2013/01/Adobe.png";

    Modify the code according to your need for the selection of the container element.

    DIA-

  • How to change the width and height of the title?

    Program: First Pro CC

    Recently I create da title for my video. I noticed that when I had looked at the preview of the title and the video, the title is so blurry. My settings at first:

    SAve.PNG

    How am I able to change the width and height parameters (to make the title more high definition) , without having to create another title in replacement from that Fuzzy? I don't ask if I have to create another title and insert it in the video, and then having to erase those blurry I had to replace. How are you able to change settings of the original title, without having to make a new title? Should I go to the 'Properties' tab when there is nothing at all (as in there is no option to change the w + h title quality) to change the current settings of the title?

  • How to set the width and height of the Textarea in tabular of.

    Hello

    How the width and height of the Textarea value formatted table.



    Thank you

    Maury

    Go to the article on the report.
    go to the section of the tabular form element and the "width of the element" allows you to change the width and the 'number of lines' to change the height.

    Gus...

  • How to avoid the width and height of the code when inserting a picture

    Hello

    When I write html codes, I try to use "Ctr + ALt + I" to insert an image in the html code. "the codes will show width and height, for example" < img src = "Add - btn.gif" alt = "" "width ="76"height ="25"/ >", you can see, the code is not clean enough, I must remove the width and height by hand, is there a way I can insert a picture, without codes with the width and height.

    Thank you.

    Frank

    Hello

    First of all, welcome to the forum.

    is it possible that I can insert a picture, without codes with the width and height.

    No without changing the actual code of the marker or create an extension for editing. The first is not recommended because it will change it on all the html code and you must also change the tag for each doctype, and the second takes a lot of time and also needs to be done for each doctype.

    PZ

  • How to know the width and height of SWFLoader

    I am loading an image file with UrlLoader and SWFLoader and I need to know the width and height of the image size
    ----
    var tmp_swf:SWFLoader = new SWFLoader();
    tmp_swf. Load (a_file_urlloader. Data);
    window_tw.addChildAt (tmp_swf, 0);
    ----

    I tried:
    window_tw.getChildAt (0). Width.ToString ();
    and
    window_tw.tmp_swf. Width;
    but both return 0.

    Any ideas or am I just dumb?

    Quote:
    Posted by: SujitG
    Hello

    Try SWFLoader.content.width. You can find more details on ownership of content at the ADDRESS below.

    http://livedocs.Adobe.com/Flex/3/langref/MX/controls/SWFLoader.HTML#content

    I hope this helps.

    Yep, works after SWFLoader is COMPLETE. Thank you

  • Get the width and height of the youtube player!

    Hello!

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


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

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

    }

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

    Any tips? ~~~~~~

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

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

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

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

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

  • How to get the property of the image on the width and height?

    Hi, all, I import image from the outside with the following method, but how to get the w3c_main.png on the width and height property? I will appreciate for your answer.

    var mcLoader = new MovieClipLoader()
    mcLoader.loadClip (" http://www.w3.org/Icons/w3c_main.png", image);

    or an image. LoadMovie (" http://www.w3.org/Icons/w3c_main.png")

    in the first case use the method onLoadInit() to a listener for your mcl before trying to access your target movieclip laborious and _height properties.

    in the second, use the preloader code to ensure your png loading is completed before attempting to access the _width and _height of your target movieclip properties image.

  • manipulate the width and height on FORM

    Hello

    I would like to show a thumbnail of the image on a form page.
    I used the apex_util.get_blob_src - something but then it shows a large image.
    The problem is that I can not put the width and height. On a report, it works with a < img - tag > in the query, but I did not have this option in a form.

    Does anyone know how to fix this?

    This option is also possible (http://dgielis.blogspot.nl/2008/07/show-blob-of-other-table-in-apex-form.html), but my text field show only the < img > - tag. I don't know how to set up the field to only show the image... (in a report, you set "standard report column", but in forms?)

    Gr.
    garco

    garcol wrote:

    About P1210_AVATAR, I change "based on" (under settings) to "Image URL stored in the value of the page element.
    Under Source, I put this in the "source or expression value":

    return  'Avatar';
    

    This is not a URL, it's an HTML element. Inspect the source code, and I think you will find that the attribute src of the image element is completely garbled.

    P711_AFB is a part of the image (BLOB), P1210_DNR_ID is the primary key of the table where I get my image of.

    Create the P1210_AVATAR element with

    Display in the form: Image display
    Based on: Image URL stored in the value of the item Page
    The HTML Form element attributes: width = "50" height = "50" alt = "Avatar."
    Type of source: Body of the PL/SQL function
    Source of value or expression:

    return apex_util.get_blob_file_src('P711_AFB', :P1210_DNR_ID);
    
  • How to get the coordinates and the size of the swf to scale components

    I use the Web (I put it to the size of the entire screen) to frame a swfloader that loads a swf file with the width and height set to 100%. This swf has a movieclip. How can I get the exact coordinates of his position and its size after the scaling in Flex?

    In Flash CS4, the movielip a x = 40, y = 700. In Flex, the swf file is set to 100% scale, but when I get the x value of this movieclip, it is always 40. I try to get the scale of the x axis ratio using scaleX of swf. But his 1, pretty weird.

    How can I get the correct coordinates of the movieclip?

    The coordinates are usually compared to something.  X is relative to the parent.

    LocalToGlobal and globalToLocal convert coordinated areas.

    You can go to transform.pixelBounds and

    transform.concatenatedMatrix.

  • Set the width and height

    I prepare my InDesign ePub docs.

    Someone told me to if sure that the width and height of images are defined as the kindle will have problems if they are not.

    How do I get the images I have in my InDesign docs?

    Thank you.

    A picture is worth a thousand words:

  • What is the width and height?

    I got a memory to provide a logo to be printed on a baseball cap, the printers asked me to provide the logo with a dimension not exceeding 19.35 square cm.

    What would be the width and height for the jury of art in Illustrator?

    Any help will be greatly appreciated.

    Thank you.

    Thank you all for your comments, that's why I'm so confused by the request because I calculated what 4,4 cm which is really small. I'll get them to confirm the actual size, because it's a very loose way of telling me the obligation and can be interpreted in many ways.

    Thanks again, much appreciated.

Maybe you are looking for

  • How to stop the repetition of songs in the iOS 10

    I use iPhone 6Plus recently upgraded to iOS 10. It's terrible for the songs in the music streaming. How to prevent the songs repeat?

  • Can satellite P300D-h-13 - I install Vista x 64?

    I ordered by Satellite P300D-h-13 that came with Vista x 32.Now, I want to install Vista x 64 for my business. I need drivers for it, or Vista x 64 install without problem?I realized I need to upgrade the BIOS for Vista x 64... When should I upgrade

  • Equium M50-164 - cannot find a wireless switch

    Im having trouble setting up my wireless network - I get a constant message telling me wireless is not lit - for the life of me I can't find out how to do this. I am looking for a switch to a button or something - ive tried searching through my XP op

  • Contact HP

    I've seen a few posts on here recently, declaring that members have a hard time getting in touch with HP support. Well, I want to address this issue so that members of the community can have this information. If you live in the United States or Canad

  • Bootloader unlock allowed: No.... SONY fix it, please!

    Hello! First of all, sorry for my bad English. I have not found another forum where to ask this question. Apparently, the Spanish carrier Movistar and Sony have reached an agreement whereby, we provide a way to allow unlocking bootloader (which is no