How to get an Image.height who created when running?

Hello

I create an image to the length and adding it to a control group. After that, I want to get this image width and height.

but when I get the image like this:

var bgImg:Image = group_createdMenu.getElementAt (imageIndex) as Image;

bgImg.height = 0; -> don't just not the height of sources.

I think because of the image that is not yet drawn. What can I do?

So thank you, have a nice day.

Hello

without seeing your code it is difficult to assess what may be the problem, but these options can help troubleshoot/fix:

Check group_createdMenu.getElementAt (imageIndex) is to return an image - add path (bgImg); After var bgImg:Image =--if it displays "null" then it isn't an image type (so you can't get its height)

try to get the dimensions of the object bitmapData instead: bgImg.bitmapData.height

or the postal code where you create the image - you load a bitmap of runtime or it generate with the code?

Tags: Flex

Similar Questions

  • How to get the name of the element when running from popup menue?

    Hello

    I am using the 10.2 forms and a form with 2 listitems (mouse and keyboard navigable = No./false) with the same popup menu.
    When I'm currently running then menu-trigger point: system.mouse_item is not defined and: system.cursor_item the value von hase something else.

    How to get the itemname of the element that is currently leading the context menu?

    Robert

    Hello!
    Can create a PRE-POPUP-MENU trigger on block level
    with a call to go_item (: system.mouse_item)
    You know, you're on what item in the list when the context menu is active.
    Concerning

  • How to get rid of adds tht come when I browse

    How to get rid of adds that come when I browse

    Scan your PC with antimalware program.

    You should consider removing some plugins too, for example game loader Plugin for Power Challenge Games,.

  • I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a

    I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a game on FaceBook called Farm Town at all, and I get a popup of AVG on the cookies that I can't get rid of. These issues are causing me to use Chrome quite often, although I like Fox better. I've searched and searched how to get help and find nothing. How can I get personalized technical help? These problems will not occur in Chrome at all. Thank you.

    Do a check with some malware malware, analysis of programs on the Windows computer.

    You need to scan with all programs, because each program detects a different malicious program.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • How to get the message to debug all to running page request OFA?

    Hello

    How to get the message to debug all to running page request OFA? do not use JDeveloper

    Thank you

    Renon,

    this.writeDiagnostics will be work AM and not CO. You mentioned that your code is AM, which is why I give (this.writeDiagnostics).

    You get an error when you use what to ? AM

    in CO, you must use pageContext. writeDiagnostics();

    You don't need to put any profile (other than DNF: Diagnostics), you just need to go to the Diagnostics - select the log on screen and choose the level that you used in the writeDiagnostics method.

    See you soon

    AJ

  • I'm editing in the bright room of Adobe and when I change in the develop module, I get the image I want, but when I see in the library module in its final State, it changed and degraded. Why is this happening?

    I'm editing in the bright room of Adobe and when I change in the develop module, I get the image I want, but when I see in the library module in its final State, it changed and degraded. Why is this happening?

    The difference between the raw edition photo and editing a PSD is that the PSD has black points and white pinned to the visible pixel values, the raw photo has still "headroom" with values of pixel darker than black visible and brighter than white, so when you export the raw file , there may be details that have improved (or obscured if it was another type of image) of the perception and mapping of the Compensation of the black spot on the final color profile.

    This means not PS is better or LR is lower, it is enough for you to go to a different type of image.  If you don't have PS to do final Assembly, you can probably do the same thing by exporting the raw in a 16 bit ProPhotoRGB TIF file, re-import this TIF and then set it LR, possibly using the tone curve to make the pitch black dark areas.

  • How to change text labels that created when running?

    Hello

    I am creating label dynamic runtime controls and adding them to a group element. This component of the group is in another custom component and I have a lot of comp. custom in my application.

    My question is how to access (via id) and change a text whict labels created when running?

    I can change it, but I am the creation of the id and that you want to reach via id.

    var lbl:mx.controls.Label = mx.controls.Label (subMenu5.group_subMenu5.getElementAt (1));

    LBL. Text = "good job."

    Thanks, have a nice day.

    First of all, if you already use a group of Spark, I would say that you use a label of the spark instead of a label of MX. If you want to refer to the label of the group, to loop through the elements of the Group and check if the id of the item corresponds to the label that you want to assign text.

    var lbl:Label;

    var n: int = myGroup.numElements;

    for (var i: int = 0; i< n;="">

    {

    LBL = myGroup.getElementAt (i) as Label;

    If (lbl & lbl.id == "myLabel")

    {

    LBL. Text = "newText";

    }

    }

  • How do you get the images to enlarge them when hovering over the image as in Ebay It used to work.

    I assign purchases on Ebay and some versions of Firefox there, I could have the pointer of the mouse pointer over an image and it would broaden so I could get a better view, but now it's not past and I need to know how to get this feature. Thank you

    Thumbnail Zoom more {web link}
    Show full image when you hover over a thumbnail. Works with
    Amazon, Images, Images of Bing, Facebook, Flickr, Google Baidu +.
    Google Images, IMDb, LinkedIn, Netflix, Pinterest, Reddit, Twitter,
    Yandex, YouTube, Wikipedia, Yahoo Images and much more.

  • How to get the image to display on the Blackberry screen URL

    Hi all

    I'm setting up a Blackberry java application. I have a url to the image... (as you can tell "http://www.christianfilmdatabase.com/wp-content/uploads/2013/06/Movies.jpg"). I get this image dynamically and display on my screen. ... How can I do it... I post my code here...

    Bitmap bitmap = Bitmap.getBitmapResource(imageUrl);
    
                        Background background = BackgroundFactory.createBitmapBackground(bitmap);
    

    Best regards,

    Thank you very much, Peter... Now, I could get the web images and display them on the screen...

  • How to get the image tag

    IAM create small Animation in 10 pictures. 1 frame lable called 'Start', frame label name is 'end '. Button click on how to get the current frame label name.

    var frameObj:Object = {};

    frameObj [1] = "start";

    frameObj [this ._totalframes] = "end";

    etc.

  • If anyone can help with how to get the image

    a database in a view using Dreamweaver page?

    I have a page with a recordset and a database with text and images. The image field has a link to the file and the image as in /images/image1.jpg including the size.

    The thumbnail I want to display on a page of the main display is in the database using varchar with a link like /images/image1.jpg

    When someone wants to see the master page, they click on a link and everything which has been entered showing the database. At least everything except the image.  Right now it shows just /images/image1.jpg

    I don't know how to call the images to the database.

    Thanks for the help and information.

    conch,

    Check the entry of the database, and you may also have too many tags...

    In addition, check to see if your pictures folder is in the root directory, such as an incorrect path can complicate things.

    If this site is located on a remote server, feel free to send me the link here or by e-mail: [email protected]

    In addition, if you have a screenshot, it would be useful.

    Hang on!

    See you soon,.

    wordman

  • How to get the coordinates of the screen when they are hit.

    Hi all!

    I am a beginner on the development of blackberry, also a beginner in programming in general ^^

    I've done some app using just QML and take some C++ tutorials

    I try to get the coordinate of the screen when the user touches, I wasn't able to do that you use just QML, I found the source TouchEvent and tried to make it work on C++, to get the windowX and windowY coordinates of the touch.

    http://developer.BlackBerry.com/Cascades/reference/bb__cascades__touchevent.html

    I use the image on background to try to get contact with the event.
    So far, we have:

    PPS:

    class LostInSpace : public QObject
    {
        Q_OBJECT
    public:
        LostInSpace(bb::cascades::Application *app);
        virtual  ~LostInSpace() {}
    public slots:
    Q_INVOKABLE float screentouchY(bb::cascades::TouchEvent* event);
    Q_INVOKABLE float screentouchX(bb::cascades::TouchEvent* event);
    
    private:
    QPointer fundo;
    
    };
    

    CPP:

    LostInSpace::LostInSpace(bb::cascades::Application *app)
    
    {
    
        QmlDocument *qml =
    QmlDocument::create("asset:///main.qml").parent(this);
        qml->setContextProperty("app", this);
        AbstractPane *root = qml->createRootObject();
    
        app->setScene(root);
    
        fundo = root->findChild("fundo");
        bool res = QObject::connect(fundo, SIGNAL(touch(bb::cascades::TouchEvent*)),this, SLOT(screentouchY(bb::cascades::TouchEvent*)));
        Q_ASSERT(res);
        res = QObject::connect(fundo, SIGNAL(touch(bb::cascades::TouchEvent*)),
    this, SLOT(screentouchX(bb::cascades::TouchEvent*)));
        Q_ASSERT(res);
    
    }
    
    float LostInSpace::screentouchY(bb::cascades::TouchEvent* event) {
        return event->windowY();
    }
    float LostInSpace::screentouchX(bb::cascades::TouchEvent* event) {
        return event->windowX();
    }
    

    QML: (I'll do later animations, it's just to see if it works. I mean a "unknown simbol app" the Notecard, I thought I just had to put "qml-> setContextProperty ("app", this);  in the constructor)

    ImageView {
                    objectName: "fundo"
                    imageSource: "images/fundo1.png"
                    touchPropagationMode: TouchPropagationMode.Full
                    onTouch: {
                        tiro.translationX = app.screentouchX();
                        tiro.translationY = app.screentouchY();
                    }
                }
    

    Any help will be very appreciated!

    Thank you!

    Hey there,

    You don't need to do... You can access the 'event' TouchEvent object in the notecard: {} area QML...

    ImageView {
                    objectName: "fundo"
                    imageSource: "images/fundo1.png"
                    touchPropagationMode: TouchPropagationMode.Full
                    onTouch: {
                        tiro.translationX = event.windowX
                        tiro.translationY = event.windowY
                    }
                }
    
  • XML: How to get the value of the node when the node of pasing as a parameter name

    Hello

    I've got some xml:

    var xmlData:XML = 
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    

    So, I want to read the value of specific node based on a value passed to a function. .

    var buttonID = new Button;
    
    var imageID = new Image;
    
    var labelID = new Label;
    
    
    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    
    trace (xmlData.nodeName)                      //doesn't work
    
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    
    }
    

    I don't know how to get the value when the name of the node is changed dynamically.

    use:

    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])
    }
    
    
  • How to get rid of the icon buttons when you type?

    Could someone explain to me how to get rid of these little icon buttons that keep popping up on the screen when I use my keyboard. Read on this forum that they are something to do with "apps"? What information and icons that appear when you drag to the top of the bottom of the screen? With the wording "parachuting" in the middle of the screen? If so, how do I "turn off" those little buttons, which appear in the bottom right of the screen and above? Can someone advise me on this?

    There is also a tin can that appear on the screen as when I use my keyboard, something "iCloud rental", with the word "done" there commit to get rid of this box. Can someone tell me how to stop this box from appearing when I type...

    You talking about icons like below?

    Or like these?

  • How to get 'Print', 'Download' and 'Back' link when navigate using go the URL

    I have a report R2, there a chart based on PivotTable. This report is called from another report R1 using the feature to the URL. Report R2 does not 'Print', 'Download' and 'back' link when it is called R1. But if I run R2 as it shows the report asandalone 'Print' and 'Download' links.

    can you pls suggest how I can get 'Print', 'Download' and 'back' links when R2 is called from R1 using the feature to the URL.

    You will usually use GO Url to integrate with external portal, so there is no value 'return' for the parameter 'Options '.

    The possible values for the link Options are:
    m change request
    f print version
    d - download to Excel
    r - refresh results

    If you need to view back, you can add another parameter called Done like below and provide the explicit path to where you want to go. For example, in the example below, I would go back to answers to myreport

    http://prakashj:7777/Analytics/saw.dll?go&path=/users/administrator/myreport2&options=rmfd&done=answers%26path=/users/administrator/MyReport

    HTH,
    Prakash

    Published by: prakah on August 17, 2009 08:51

    Published by: prakah on August 17, 2009 09:03

Maybe you are looking for