Flex co-ordinate system

Hi,
I have a vbox of size 100, 100. When I mouse over that vbox, I'm able to read the x, y coordinates of the mouse pointer.
How can I get the coordinates of the vbox.

You can find the answer here
http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html
It explains very well how you can find your components coordinates.

Similar Messages

  • Drawing quadratic equations on a 2D cartesian co-ordinate system

    Hi,
    I need to design a 2D cartesian co-ordinate system to plot quadratic equations on the graph using pure action script. Quadratic equations are of the form y = ax^2 + bx + c where a,b and c are the variables for which the values need to accepted from the user as input. Accordingly, the curve needs to be plotted on the graph.
    Could anybody kindly help me to write an action script 3.0 code to suffice the above requirement?
    Thanks in advance.
    Cheers,
    Pratik.

    that will take more work than doable in a forum.  to start, you need to find the roots of your equation (use the quadratic formula) and make sure the real roots are towards the center of your x-axis.  the two parts where y tends towards (+infinity or -infinity) do not require much display.
    if there is only 1 or 0 roots, put that equation in vertex form and use an x-axis centered around the vertex.
    for a sample of how this can be done:  http://www.kglad.com > snippets > function graphs.

  • AWT co-ordinate system

    Hello.
    I still can't figure out. I'm plotting graph co-ordinates on an AWT Canvas component. i.e (x,y) values
    However, due to the AWT co-ordinate system, the origin (0,0) is at the top left hand corner of the screen.
    What trick can I do to plot my points with
    respect to the origin at the BOTTOM left hand corner of the canvas?
    I am using the fillOval() method to display the points on the canvas. (See code below)
    All I want to do is reverse the direction
    of the y axis. Some sample code would be very much appreciated.
    A.
    My paint code is as follows ...
    <code>
    public void paint(Graphics g)
    // Paint the means
    g.clearRect(0, 0, 600, 500);
              if (firststep)
              db.paint(g);
    else
    for(int i = 0; i < nk; i++) {
    g.setColor(cl);                                        
    Point p = (Point) means.elementAt(i);
    //           System.out.println("mean = "+p);
                                            g.fillOval( (int) (p.xVal()*600)-PtSize/2, (int) (p.yVal()*500)-PtSize/2, PtSize, PtSize);                    //      Draw an oval
                             String s = "k= "+ i+ "[" + round(p.x, 2) + " , "+ round(p.y, 2) + "]" ;
                             g.drawString(s, (int) (p.xVal()*600)-PtSize/2 + 10 , (int) (p.yVal()*500)-PtSize/2 + 15 );
    // Print the cluster
    Vector cluster = (Vector) clusters.elementAt(i);
    int size = cluster.size();
    for (int j = 0; j < size ; j++ )
              p = (Point) cluster.elementAt(j);
    //     g.setColor(Color.green);
    //     g.fillRect( (int) (p.xVal()*600)-PtSize/4,(int) (p.yVal()*500)-PtSize/4,PtSize/2,PtSize/2);
    //     g.setColor(cl[i]);
                                            g.fillOval( (int) (p.xVal()*600)-PtSize/4, (int) (p.yVal()*500) -PtSize/4,PtSize/2,PtSize/2);               //      Draw circles to represent the points                
    //          g.drawString(i+"",(int)p.xVal(), (int)p.yVal());
    }</code>

    An example without axises or labels:import java.awt.*;
    import javax.swing.*;
    public class Test extends JFrame {
        public Test () {
            setContentPane (new GraphPanel ());
            setDefaultCloseOperation (EXIT_ON_CLOSE);
            setTitle ("Graph example");
            pack ();
            setLocationRelativeTo (null);
            show ();
        public class GraphPanel extends JPanel {
            public void paintComponent (Graphics graphics) {
                super.paintComponent (graphics);
                // y = x^2
                Point previousPoint = null;
                for (int x = 0; x <= getWidth () / 10; x ++) {
                    int y = x * x;
                    Point point = new Point (x * 10, getHeight () - y);
                    if (previousPoint != null) {
                        graphics.drawLine (previousPoint.x, previousPoint.y, point.x, point.y);
                    previousPoint = point;
            public Dimension getPreferredSize () {
                return new Dimension (200, 400);
        public static void main (String[] parameters) {
            new Test ();
    }Kind regards,
      Levi

  • PageItem Co-ordinate w.r.t. Spread Co-ordinate System

    Hi All,<br /><br />I am trying to get coordinates of text frame with respect to spread co-ordinate system.<br />I have used following code for this:<br /><br />InterfacePtr<IGeometry> frameGeometry(textFrame, IID_IGEOMETRY);<br />PMRect frmRect = frameGeometry->GetPathBoundingBox();<br />::InnerToParent(textFrame, &frmRect);<br /><br />Here textFrame is the ITextFrame pointer of which I want to get coordiantes w.r.t. Spread. The problem is dimensions in frmRect doesnot change even after transformation using InnerToParent().<br /><br />Can anyone suggest me in this regard, where I am wrong?<br /><br />- Pete

    Hi Pete,
    I think your problem is that the parent of kMultiColumnItemBoss or kFrameItemBoss (the only bosses that could store the ITextFrame interface you start from) is kSplineItemBoss and not kSpreadBoss. With your call to TransformUtils::InnerToParent you are likely getting the coords in the spline item's coordinate space and not in the spread's one. The SDK documentation specifies that "The parent coordinate space is the first ancestor boss object on IHierarchy that has an IGeometry interface".
    HTH,
    Emanuele.

  • Georeference cartesian co-ordinates to standard co-ordinate system

    We have set of old maps which do not follow any standard co-ordinate system and they are just cartesian grid co-ordinates (for example lat,long 40.733828,-73.988414 corresponds to cartesian co-ordinates 1610350, 1114450) . I want to explore a possibility of applying simple transformation and geo-reference it to standard co-ordinate system. I can have little compromise on positional accuracy. What is best available method to do it oracle spatial?
    Thanks

    Well...
    One approach would be via EPSG method 9621. Unfortunately, 9621 is not yet implemented, at this point.
    Another approach is via NADCON, although NADCON was not semantically meant to be used in this way. If you can determine (lat, lon) and (x,y) exactly along the 4 corners of your unknown map, we could use the NADCON method. It is difficult to say how much accuracy you would get with these 4 points. The accuracy would increase with an equi-spaced grid of n x m known points.
    Yet another approach would be that we simply assume a transverse mercator projection. Since your map only covers Manhattan - who will see the difference between transverse mercator or anything else (assuming that the projection center is near Manhattan)? But it is a little more complex, of course. First, we would need to perform a datum transformation with the required rotation. This would simulate the rotation of the map you talked about. Then we would perform a transverse mercator projection with its center near Manhattan. We would have to assume that your unknown projection also had its center near Manhattan (resulting in minimal distortion, there). This assumption is reasonable for a map of this scale.
    If you give me approximately 5 points for which you know lat/lon and x/y, I will see what I can do. Usually, we do not do this, and it will certainly take a few days, for I will have to fit it into my schedule.
    Also, a reasonable result will only come out if our assumptions regarding this unknown projection are mostly true.

  • Support for Co-ordinate system?

    Does anyone know whether Oracle Spatial supports the mapping co-ordinate system used in Romania (Stereo70)?

    Yes, this SRID is based on the EPSG projection method 9809 ("Oblique Stereographic"). If you are not sure whether this is the SRID you need, do you also have some numeric parameters?
    SQL> select wktext from cs_srs where srid = 31700;
    WKTEXT
    PROJCS["Dealul Piscului 1970/ Stereo 70", GEOGCS [ "Dealul Piscului 1970", DATUM
    ["Dealul Piscului 1970 (EPSG ID 6317)", SPHEROID ["Krassowsky 1940 (EPSG ID 702
    4)", 6378245, 298.3]], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree",
    0.01745329251994328]], PROJECTION ["Stereo 70 (EPSG OP 19926)"], UNIT ["Meter",
    1]]
    SQL>
    By the way: the WKT is relatively short, and does not contain projection parameters. This is because the 9809 method is not mapped to a legacy projection, and thus the legacy parameters for this projection are not available. The EPSG parameters are in the SDO_COORD_OP_PARAM_VALS table.

  • Interactive X-Y Co-ordinate system

    Hi
    Actually I want to have an Interactive x-y Co-ordinate system(having adjustable grid) where I can place arcs and lines at specified angles and position. Along with that we can also can fill out each grid cell with some value.
    Is that much interaction is possible with LabVIEW. Please help me out.
    Regards
    Gaurav Sharma

    Use this javascript:
    var mouseX = 0;
    var mouseY = 0;
    function mouseXY(e) {
       if (IE) {
          mouseX = event.clientX + document.body.scrollLeft
          mouseY = event.clientY + document.body.scrollTop
       } else {
          mouseX = e.pageX;
          mouseY = e.pageY;
    // set up mouse movement capture for tool tip placement
    var IE = document.all?true:false
    document.onmousemove=mouseXY;Then just use mouseX and mouseY wherever you want to find out the current mouse position.

  • Help!  Does anyone know the best framework for delivering an enterprise-quality Flex-based reporting system?

    Background
    We need to build a commercial-quality, Flex-based reporting system for the corporate customers who use our English learning system.  Ours is a multi-tenant web-based Saas solution.
    he solution must include:
    >  a slick, professional design, including Flex/Flash UI and charting and graphing
    >  a full suite of serverside functionality such as report management, scheduling, export and delivery
    >  strong security in a multi-tenant environment
    >  can be integrated seamlessly with our existing Flex/.NET application
    >  data sources are MS SQL Server database and/or OLAP cubes
    >  scalability/performance to serve tens of thousands of users
    >  no per-user license fees (we need to own this system)
    The initial focus is on "canned" reports with some parameter controls, while future releases will include more freeform report designer/builder capabilities.
    Do you know of a good example/approach?  Please reply here, or to [email protected]
    Thanks in advance!

    Hello,
    The recommended way is with JCA Connector.
    Adaptive RFC is included from NW7.1,
    See "Creating an Adaptive RFC2 Sample Application without using Web Dynpro"
    in the SAP HELP of NWCE7.1 or NWCE7.2.
    Seems to be based in JCo 3.0 and Java5 so it will not work in NW70.
    For older Versions like EP 5 there is also a JCo ClientService available.
    Regards
    Johannes

  • Shifting of GUI Co-ordinate system when Mouse clicked

    In my JDK 1.2.2 / Swing based application I have this problem of change in coordinate values (x,y) when a mouse click is used. This problem occurs sometimes and reason cannot be traced.
    For e.g. If a user clicks "on" a Button the button is not affected , but the Button is pressed when the user clicks just "above" the button. When this problem arises it happens for all GUI components in the screen like textfield , combobox , table rows etc.
    I hope the forum has answer / hint for this untraceable & intermittent problem.
    Thanks in advance

    1) What OS are you using?
    2) Did you try the app on a different machine?
    - If yes, and it worked OK, make sure you have the newest video drivers installed on your system.
    - If no, then beg/steal/borrow another machine to try it on, or:
    3) (better still) post your entire code if it's not too big, or failing that, post a compilable/runnable subset of your code which shows the same behavior, so we can try it out.

  • Creating ETRS 89 co-ordinate system

    hi ,
    Has anybody created ETRS 89 (European terestrial refrence system 1989) in oracle ??
    where can i find the values for ellipsoid,datum and other values in WKTEXT field in mdsys.cs_srs.
    thanks
    vikesh

    try following:
    this is the projection system for ETRS89 based on the GRS80 which is described in "Longitude / Latitude (NAD 83)";
    This will work for UK and parts of western europe; please remind:
    6 deg stripes; middle meridian for stripe 31 by 3 deg; for stripe 32 by 9 deg and so on...
    INSERT INTO CS_SRS VALUES
    ('ETRS89(31), ITRF Zone 31 (GRS80)', 600000, 600000, 'Oracle',
    'PROJCS["ETRS89(31), ITRF Zone 31 (GRS80)",
    GEOGCS [ "Longitude / Latitude (NAD 83)",
    DATUM ["NAD 83",
    SPHEROID ["GRS 80", 6378137.000000, 298.257222]],
    PRIMEM [ "Greenwich", 0.000000 ],
    UNIT ["Decimal Degree", 0.01745329251994330]]
    GEOGCS [ "WGS 84",
    PROJECTION ["Transverse Mercator"],
    PARAMETER ["Scale_Factor", 0.999600],
    PARAMETER ["Central_Meridian", 3.000000],
    PARAMETER ["False_Easting", 500000.000000],
    UNIT ["Meter", 1.000000000000]]')

  • Learning Co-ordinate System - Problem

    Hi
    I created a sample project to epxlain my problem.
    There are two canvases in the main application. outerspace canvas and innerspace canvas.
    innerspace canvas has a visual component "mainBox"
    and there is also a visual component in outerspace canvas named "overBox"
    now i want user to map the x-xis and y-xis of overBox to mainBox, so when user will click re-arrange, overbox will completely cover the mainBox.
    This is actually a problem of different co-oridatane systems and i dont know how to map them into one.
    Here is the code.
    Application File
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*">
         <mx:Script>
              <![CDATA[
                        private function arrange(event:MouseEvent):void{
                             var point:Point = mainBox.localToGlobal(new Point());
                             overBox.x = point.x;
                             overBox.y = point.y;
              ]]>
         </mx:Script>
         <mx:Canvas width="80%" height="80%" horizontalCenter="0" verticalCenter="0" id="outerSpace" backgroundColor="#A9A9A9">
              <mx:Canvas width="80%" height="80%" horizontalCenter="0" verticalCenter="0" id="innerSpace" backgroundColor="#8DB5FF">
                   <ns1:Node horizontalCenter="0" verticalCenter="0" width="100" height="100" id="mainBox">
                   </ns1:Node>
              </mx:Canvas>
              <ns1:Node x="21" y="10" id="overBox" width="100" height="100" backgroundColor="#FFA352">
              </ns1:Node>
         </mx:Canvas>
         <mx:Button label="Re-Arrange" click="arrange(event)" left="10" top="10"/>
    </mx:Application>
    Project is also attached.
    Thanks

    Just see below. But it won't work if you resize the view, as one is centered
    private
    function arrange(event:MouseEvent):void
    // Get mainbox coord in local system - i.e. relative to innerSpace
    var p1:Point = new Point(mainBox.x,mainBox.y); 
    // Convert it to global coord from innerSpace
    var p2:Point = innerSpace.localToGlobal(p1); 
    // Convert it to local coord - relative to outerSpace
    var p3:Point = outerSpace.globalToLocal(p2); 
    overBox.x=p3.x;
    overBox.y=p3.y;

  • Run flex app on system startup

    Hi all
    I have developed an app .Now what i want is that when ever the PC start the installed air app to start as the system starts..
    Like the way yahoo messenger starts on system start up i want to implement that functionality ..can anybody tell me what i have to do in my app to implement this..
    Thanks

    Thanks paul it worked
    private function RunAtStartUp():void
                    try
                        nativeApplication.startAtLogin=true;
                    catch(e:Error)
                    trace('error =' + e.message.toString());
    is there any need to call this function in init()  of my app ?
    right now i m not calling it in init()..js created a seperate function without calling it in any other function..any it launches the app whn i restart my pc..

  • Integrate payflow pro into a Flex cart system.

    Hello,
    I was wondering if anyone had integrated payflow pro into their flex based cart system and if so, if you could point me to any examples or tutorials you used. The rest of the cart is essentially designed and I have just started on the paypal integration and haven't been able to find and examples on the HTTPS implementation specifically for actionscript.
    Thanks,
    Scott F.

    1. After installing the SDK do we need to copy dll's into the WebTools\bin directory.
    > No
    There is already a Payflow_dotNET.dll in the bin directory - does this need to be updated/replaced
    > No
    2. The SDK has a .NET 1.1 and 2.0 dll - do we need to do anything special with these?
    > No
    3. I am in Australia. Is payflowpro in Australia inherently different from the US?
    > Not sure, but can't think of why it would be different.
    Am I naive in thinking this would work in Australia?
    > No, other customers have claimed to use it
    4. My test account details include a blank username - is that likely to cause WebTools any problems\
    > Yes, you should input the login from Verisign
    5. Is there any documentation that walks through the process is it's entirety?
    There is a note for 5.9 that needs(obviously) to be updated to 2007.
    Here are the settings:
    User - "login" provided by Verisign
    Password - provided by Verisign
    VendorCode - Same as User
    URL - payflowpro.verisign.com/transaction
    Partner Code - PayPal
    Certs Path - Location of payflowpro SDK certificate, as documented in payflowpro SDK, Typically "C:\Windows\certs" on the webserver
    Steps:
    1 - Download payflowpro SDK from the Verisign Manager website
    2 - Extract Zip file to temp location on Web server
    3 - Locate the certificate file, probably in the certs directory
    4 - copy this file to C:\Windows\Certs
    5 - Enter the above information in web tools admin
    The error you are getting is because it is missing a field on the cc gateway page in the web tools admin

  • Where is the Flex SDK 3.6 change log?

    Now we have almost 3 weeks after the release of Flex SDK 3.6 and I still can't find up-to-date release notes or a change log. The release notes and many other online resources still mention Flex SDK 3.5. Also I can't find a milestone in the bug database for filtering the affected issues.
    Does anybody know what's new in 3.6?

    I've looked for the changelog as well but could not find it either.
    You should check at Flex Bug Management System  https://bugs.adobe.com/flex/
    no registration is required to browse.
    In Project, select Flex SDK
    In Issue  select Bug (or any)
    In Milestone select Flex SDK 3.6(Release)
    And that's it , click on View and you'll see what's been changed.

  • Video display with Flex

    Hi everyone, this is my first time here.
    The first thing i want to say is "please, forgive my english,
    present or future mistakes, i'll try my best to explain everything
    i want to say"
    Here is my problem: I encoded and deinterlaced videos in DV
    codec using Adobe Premiere 6.0, then i encoded these videos in
    Flash On2 VP6 Data rate 700 kbps and audio MP3 128 kbps (i tell you
    all the informations i have =p ) using Flash 8 Video Encoder.
    The thing is, when i play them with a player i found on the
    net : FLV Player 1.3.3 the display is ok but when the file is
    played with an application the society i work in developped, it's
    like i never deinterlaced the video: moves = lines around the
    characters (i call it brush effect).
    Now i can recode the videos, deinterlace them a second time
    with another software and it works but it's a loss of time and i'd
    like to know if the problem comes from the flash player used in
    Flex or if i should change Adobe Premiere. Has anybody encountered
    this kind of problems and resolved it?
    thank you for your answers, hope you can understand my
    message (reads it for the third time but doesn't see any mistakes)
    *It's like we're dreaaaaaaming*

    "Nehhhh" <[email protected]> wrote in
    message
    news:e3q0r4$qn5$[email protected]..
    > Hello everybody,
    > I am a newbie to Flex. I wanna develop an application to
    display
    > video
    > without using FMS.
    > Is it possible ? If yes how ? Pls. suggest some tutorial
    or examples.
    Streaming requires FMS, but you can use progressive HTTP
    download instead.
    Just point the VideoDisplay component to the .flv file on
    your web server.
    Difference b/w progressive download and streaming:
    http://www.adobe.com/devnet/flash/articles/flv_download.html
    Manish Jethani
    Developer, Flex Framework
    Adobe Systems Inc.

Maybe you are looking for