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.

Tags: Flex

Similar Questions

  • Double y axis scales - how to get the right second scale indicator

    I'm tracing the density compared to the speed and pressure compared to the speed on the same graph XY.  Field Multi-XY seemed the perfect way to do it, until I discovered there is no way to display a scale for the second y-axis (data cannot reasonably be displayed at the same scale).  I looked at assignments and examples, but with the exception of the mention of a semi-mythical double y-axis library of controls in the new 5.0 version, I'm not finding anything.  This seems to be a fundamental characteristic of graphing calculator, so I hope someone can tell me where he is currently.  I use the 2013 LabVIEW Development package.

    Any ideas to suggest?

    I found the answer on this help page.

    http://zone.NI.com/reference/en-XX/help/371361J-01/lvhowto/configuring_the_x_and_y_sc/

    I had to use a combination of Swap faces and scale to duplicate, and then juggle scale values.

    It doesn't seem to be a way to make this work with field Multi - XY.vi, but the standard XY graph function should work for me.

    I consider the answer to this question.

  • How to get the element selected listfield and goto next page?

    Assalaamualikum

    I try parsing the XML from a url and show in listfield.

    problem:

    How to get the selected item and passing the variable and than goto next page?

    my code:

    package parsepack;

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Vector;

    Import javax.microedition.io.Connector;
    Import javax.microedition.io.StreamConnection;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ListField;
    Import net.rim.device.api.ui.component.ListFieldCallback;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.xml.parsers.DocumentBuilder;
    Import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

    to import org.W3C.DOM.document;
    Import org.w3c.dom.Node;
    Import org.w3c.dom.NodeList;

    extends xmlparsing public class UiApplication implements ListFieldCallback, FieldChangeListener
    {

    Public Shared Sub main (String [] args)
    {
    xmlparsing app = new xmlparsing();
    app.enterEventDispatcher ();
    }

    public long mycolor;
    Connection _connectionthread;
    private static ListField _list;
    private static Vector listElements is new Vector();.
    public display display = new MainScreen();
    MainManager VerticalFieldManager;
    VerticalFieldManager subManager;

    public xmlparsing()
    {
    Super();
    pushScreen (screen);

    final Bitmap Imagearriereplan = Bitmap.getBitmapResource ("blackbackground.png");

    mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR)
    {

    public void paint (Graphics graphics)
    {
    graphics.drawBitmap (0, 0, Display.getWidth (), Display.getHeight (), Imagearriereplan, 0, 0);

    Super.Paint (Graphics);
    }

    };

    subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = Display.getWidth ();
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }
    };

    Screen.Add (mainManager);

    _list = new ListField()

    {

    public void paint (Graphics graphics)

    {
    graphics.setColor ((int) mycolor);
    Super.Paint (Graphics);

    }

    };
    myColor = 0x00FFFFFF;
    _list. Invalidate();
    _list.setEmptyString ("* only supplies not available *", DrawStyle.HCENTER "");
    _list.setRowHeight (50);
    _list.setCallback (this);
    mainManager.add (subManager);
    listElements.removeAllElements ();
    _connectionthread = New Connection();
    _connectionthread. Start();
    }

    protected boolean navigationClick (int status, int time)
    {
    Try
    {
    Here, go to another screen if you need.

    }
    catch (System.Exception e)
    {
    System.out.println ("Exception:-: navigationClick()" + try ());
    }
    Returns true;
    }

    private class login extends thread
    {
    Public connection()
    {
    Super();
    }

    public void run() {}
    Doc document;
    StreamConnection conn = null;
    InputStream is = null;
    try {}

    Conn = Connector.open (StreamConnection) ("http://ec2-54-248-241-248.ap-northeast-1.compute.amazonaws.com/koperasi-akr-trial/cgi-bin/gw-pinjama...

    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
    docBuilderFactory.setIgnoringElementContentWhitespace (true);
    docBuilderFactory.setCoalescing (true);
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    is = conn.openInputStream ();
    doc = docBuilder.parse (is);
    doc.getDocumentElement () .normalize ();
    List of NodeList = doc.getElementsByTagName ("ID");
    for (int i = 0; i)< list.getlength();="" i++)="">
    Node node = list.item (i) .getFirstChild ();
    listElements.addElement (textNode.getNodeValue ());
    }
    } catch (Exception e) {}
    System.out.println (try ());
    } {Finally
    If (is! = null) {}
    try {is.close ();
    } catch (IOException ignored) {}
    } If (conn! = null) {}
    Try {conn.close () ;}
    catch (IOException ignored) {}
    }} UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _list. SetSize (listElements.Size ());
    subManager.add (_list);
    Screen.Invalidate ();
    }
    });
    }

    }

    ' public void drawListRow (list ListField, Graphics g, int index, int y, int w)
    {
    Your string = (String) listElements.elementAt (index);
    int yPos = 0 + y;
    g.drawLine (0, yPos, w, yPos);
    g.drawText (, 5, 15 + y, 0, w);
    }

    public {get {Object (ListField list, int index)
    {
    Return listElements.elementAt (index);
    }
    public int indexOfList (String prefix, ListField list, int, string)
    {
    Return listElements.indexOf (prefix, string);
    }
    public int getPreferredWidth (ListField list)
    {
    Return Display.getWidth ();
    }
    public final void insert (String toInsert, int index) {}
    listElements.addElement (toInsert);
    }

    ' Public Sub fieldChanged (field field, int context) {}

    }
    }

    Thank you.

    I told you that replace the navigationclick() method where initialize you your listfield

    as I think that changing your code and then answer me

    _list = new ListField()
    {
    protected boolean navigationClick(int status, int time)
    {
      Dialog.inform("hi");
      return true;
    }
    
    public void paint(Graphics graphics)
    {
    graphics.setColor((int) mycolor);
    super.paint(graphics);
    }
    };
    
  • How to get the physical size of the screen?

    Hi all

    How to get the physical width and height of the screen (not resolution) in inches or in centimeters?

    Is there a method to do

    Thank you very much

    Display.getWidth () and Display.getHeight () you will get the number of pixels.

    Display.getHorizontalResolution (); and Display.getVerticalResolution () to get the pixels per meter.  Then by dividing appropriately you can find the actual size.

  • 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

  • How to get the size of the loaded swf file?

    final/public class main extends Sprite
    {

    public void main()
    {
    loaderInfo.addEventListener (Event.COMPLETE, _onLoadCompleted);
    }

    private void _onLoadCompleted(event: Event): void
    {
    var tw: int = stage.width;
    var e: int = stage.height;
    TSW var: int = stage.stageWidth;
    tsh var: int = stage.stageHeight;

    }

    }

    Above is my project simple as3 in flex builder 3.

    My screen resolution is 1920 * 1080, when debugging, the SWF is stretched to the full EI client area, but the stage.stageWidth is 500 and the stage.stageHeight is 375, stage.widht and stage.height are 0, who can tell me why and how to get the right size of the SWF, named the area size customer of EI in this situation?

    Thank you very much!

    The HTML wrapper can resize the SWF later, so wait a frame and recheck stageWidth/stageHeight.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • where and how to get the new Firefox add - one of who is spying on us. Please mail to...

    Heard speak adds the new on Fire Fox. Where and how to get the new Firefox add - one of who is spying on us. Please mail to maheshubhayakar at rediffmail.com

    edited by email address - moderator

    It is helpful if you provide a link to the article you were reading.

  • I rolled again Firefox 4.0 to 3.6 and now my navigation bar still looks like instead of 3.6 4.0 how to get the old layout back?

    I rolled again Firefox 4.0 to 3.6 and now my navigation bar still looks like instead of 3.6 4.0 how to get the old layout back?

    The fastest way is to use the option 'Restore the default toolbar set' as shown here - https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • You will need to plug Sony IEEE 1394 camcorder to an iMac. It would connect to the thunderbolt via an adapter port? I have a cable of firewire 800 and wanting to know how to get the video of my iMac. Thanks for any help you can give :)

    I borrowed a camcorder tape Sony that has an IEEE 1394 (ilink Sony) and eager to download video from my iMac.

    It would connect to the thunderbolt via an adapter port?

    I have a cable of firewire 800 and wanting to know how to get the video from my iMac via this cable.

    Appreciate any help you can give :)

    You want a Thunderbolt Apple FireWire adapter. Here is a link (to the US store):

    http://www.Apple.com/shop/product/MD464LL/A/Apple-Thunderbolt-to-FireWire-ADAPTE r? FNODE = 8 b & fs = f % 3Dadapter % 26fh %3 D 4595% 252B45b0

    Sorry, I don't know what software you need to play your video, once you get the cable work.

  • How to get the film on the second screen and cut on normal?

    How to get the film on the second screen and cut on normal?

    iMovie 10 does not support using double screen, tou need to FCP to do.

    Geoff.

  • Chart WPF: How to get the limits of PlotArea and axes

    I can't find explicit methods to get limits of PlotArea and axes.

    Please let me know workarounds if they are available. Actually a post explains how to get the PlotArea limits using RangeCursor. Are there alternative means for shafts?

    The photo below shows what I did in WinForms with the methods GetBounds and HitTest. I would like to draw the ornaments on the chart in WPF.

    I have attached a code example of this look ornaments around the plot area and the scales.

    Note that this relies on implementation details of the current version of WPF controls for the ornaments of the scale, as it was more effective than gradually points to test in the graph using the GetScaleAt method. We have intentionally left much of the underlying primitive types with a minimum documentation, like us they have changed in the past and may change in the future. Although these exact members can be removed in a future release, we do not expect to provide an equivalent function and stabilize the primitive API over time.

  • How to get the string (specified by row and column) of txt file with labview

    Hello world

    How to get the string (specified by row and column) of txt file with labview

    THX

    As far as I know, a text file has no column.  Be more specific.  Do you mean something like the 5th word on line 4, where the words are separated by a space, and lines are separated by a newline character?  You can read from the spreadsheet String function and set the delimiter to a space.  This will produce a 2D channels table.  Then use the table to index and give the line number and column number.

  • How to get the parameter values of a step type custom when I create file and adding a type of step seq

    I use lv 8.5 and teststand 4.0.

    I did a step type custom and recorded at the MyTypes.ini in pallets of type.

    I specified a default module by opening the properties of the custom step of *.ini type window, then I put some values of the parameters.

    T1) when I open teststand and I add the custom step type manaully in seq file, the labview module parameter values are represented.

    But, if to use file (create and add support prototype stage), the labview module parameter values has the default value.

    Using joint file, how to get the setting custom step type values I put in *.ini?

    Q2) each type of step are automatically by name through the use of LoadTypePaletteFilesEx. When I open teststand and I add the custom step type manaully in seq file, the module is loaded automatically. Inside the attachment, I use a prototype of charge and a fixed path where the module labview is to load the labview module.

    Can I load module automatically without using a prototype of charge or how can I get a dynamic path of type step?

    I solved Q1 for myself by using the mapping tab of the parameter within the configuration to the default module window.

    Everyone knows Q2?

    Thank you.

  • Someone tried to hack my account and now I can't in my mail. How to get the lock down?

    I tried to log on my hotmail and it says it is locked due to too many failed attempts to connect.  Someone tried to hack my account and now I can't in my mail. How to get the lock down?

    Hello

    Answers is a peer group supported and unfortunately has no real influence on Hotmail.

    HotMail has its own Forums, so you can ask your questions there.

    Windows Live Solution Center - HotMail - HotMail Forums Solutions
    http://windowslivehelp.com/

    Hotmail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=1

    Hotmail - Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    How to contact Windows Live Hotmail Support
    http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm

    Windows Live Hotmail Top issues and Support information
    http://support.Microsoft.com/kb/316659/en-us

    Error message "your account has been locked" when trying to connect
    http://windowslivehelp.com/thread.aspx?ThreadId=77be7d82-a0e9-49c7-b46d-040ec654a9e2

    Compromised account - access unauthorized account - how to recover your account
    http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Hotmail hacked? Take these steps
    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • How to get the new update for the help and support

    OT:how to get the new update of the abd support help

    How to get help and support update

    Hello rickstemberger,

    Please click the number of the KB article for more information on how to add Windows Vista Help files.
    KB Article ID: 917607 -I can not open Help files that require the Windows Help program (WinHlp32.exe)

    Microsoft stopped including the 32-bit help files viewer in versions of Windows starting with Windows Vista and Windows Server 2008.
    However, with article 917607, you can download the appropriate version of the Windows Help program (WinHlp32.exe) and add them
    the operating system.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

Maybe you are looking for