Global mouse to Local cordinates

in my controller class:

stage.addEventListener (MouseEvent.MOUSE_MOVE, mouseMoveListener);

to slam my object to a grid

I'm using this algorithm of

protected function mouseMoveListener(e:MouseEvent):void {}
Brick.x = mouseX - %theGrid.getGridSize() mouseX;
Brick.y = mouseY - mouseY %theGrid.getGridSize();
}


It is inside a container and its position in the x-axis of the brick is 200px

When the brick is displacement value, x and are based on the x scene and there mouse.

The value 0 at the stadium must match-200 inside my container.

How can I use method globalToLocal?

instead of writing:

Brick.x = (mouseX - %theGrid.getGridSize()) mouseX - 200;)

?

Thank you

:

stage.addEventListener (MouseEvent.MOUSE_MOVE, mouseMoveListener);

to slam my object to a grid

I'm using this algorithm

protected function mouseMoveListener(e:MouseEvent):void {}
Brick.x = mouseX - %theGrid.getGridSize() mouseX;
Brick.y = mouseY - mouseY %theGrid.getGridSize();

var globalPt:Point = new Point (mouseX, mouseY);

var localPt:Point = brick.globalToLocal (globalPt);

trace (localPt.x, localPt.y);

}

Tags: Adobe Animate

Similar Questions

  • In regard to the global inventory and local inventory

    Hello

    What are the inventory we need to define before installing R12.1.1 on any platform.


    IAM describing how I installed the R12.1.1 applicatain on linux dilated.


    I PUT one PLACE of the INVENTORY IN THE /etc/oraInst.loc

    THE OWNER OF THESE PREMISES, THE INVENTORY IS ORAPROD (ORACLE USER).

    I GAVE THE 777 PERMISSIONS TO THE FOLDER OF THE INVENTORY.



    I STARTED THE FAST OF THE ROOT USER INSTALLL.

    OWNER OF DATABASE SPEICFYING - ORAPROD LEVEL.

    SPECIFICATION OF APPLICATION TIER OWNER - APPLPROD.


    I FINISHED THE INSTALLATION.

    EVERTHING WORKS FINE.



    WHEN IAM TRYING TO RUN THE OPatch lsinvneotry of the AS10.1.3 House.

    HIS WATCH IS NO INVENOTRY.



    Show that I JOINED THE NEW INVENTORY in the/etc/oraInst.loc.


    I run the runinstaller to join the House of AS10.1.3 House.


    the same process as I did to the AS10.1.2 House.


    the location of the inventory is the same for the AS10.1.2 and the AS10.1.3.



    I mean that's my confusion

    What is the use of the global inventory.

    What is the need of local stocks.

    When and where we need to put the local inventory.

    When and where we need to put the global inventory.



    HOW MANY LOCAL INVENTORY MUST SET UP DURING THE INSTALLATION THE INSTALLATION OF R12.1.1.

    Please provide information about the local inventory and the overall invenotry.

    WHEN IAM TRYING TO RUN THE OPatch lsinvneotry of the AS10.1.3 House.

    HIS WATCH IS NO INVENOTRY.

    This patch you are trying to apply?

    Did you source the file correct env? What is "echo $ORACLE_HOME" returns?

    What is the use of the global inventory.

    What is the need of local stocks.

    When and where we need to put the local inventory.

    When and where we need to put the global inventory.

    HOW MANY LOCAL INVENTORY MUST SET UP DURING THE INSTALLATION THE INSTALLATION OF R12.1.1.

    Please provide information about the local inventory and the overall invenotry.

    All you questions are answered in these documents.

    How to find the location of the GLOBAL stock and LOCAL stock on R12.x? Need for clarification Oracle inventory [ID 878717.1]
    How to create, update or re-create the central inventory of the Applications R12 [742477.1 ID]
    Global and Local inventory explained [360079.1 ID]

    Thank you
    Hussein

  • UCS Central - model of political profile of Global Service with Local SAN Boot

    Hello

    I created a profile Service Global UCS central template to create the ESX Service profile for servers 5 different area of UCS.

    The majority of addresses is assigned in the world i.e. addresses MAC, UUID, etc with the exception of the WWPN where local teams of SAN want to pre-configure the zoning for a defined block of addresses WWPN.

    I intend to use the ID range Qualification policy to assign a block of addresses WWPN to a specific area of UCS, but my main concern is around the creation of Boot SAN policy. As we intend to use the same model of Service Global profile for 5 different areas SAN Boot targets will have to be different.

    Any way to locate startup SAN strategy so I can have only one UCS Global local SAN Boot targets?

    Thank you very much, Paul

    Hi Paul,.

    What you're looking for, it's what we call a 'Boot target Alias', that should work much in the same way that VLAN alias work with UCS 1.1 Central.     Made senior level policy reference to the 'alias', but the actual link (some VLAN or target of Boot or...) will be specific field/DomainGroup and will not be resolved until the SP is associated with a session on a given field.     In the case of prime targets, this would allow for the same Global SP model to be used in several DomainGroups, while the actual target of Boot will vary according to the individual DomainGroup.

    Unfortunately, this feature is not in UCS 1.1 Central.   We have it on the list of features 'high priority' to point 1.2.

    The only 'solution' is to use several global models of the SP, whose name and attributes reflect the underlying objective of SAN-Boot - even if this creates models of N * M (N = # Gech/s;) M = bays of Boot # SAN).

    Hope this helps to enlighten us.    See you soon,.

    -Jeff

  • How do I know it's global index or local index?

    Hi all

    How will I know if it's overall index or local index?

    Thank you!

    Dan.

    Salvation;

    Check defination of index? Overall index below has defination

    CREATE INDEX month_ix ON sales (sales_month)
    GLOBAL PARTITION BY RANGE (sales_month)

    For more information, please visit:

    http://download.Oracle.com/docs/CD/B13789_01/server.101/b10739/partiti.htm

    Respect of
    HELIOS

  • Use of global variable from local variables for business rules

    Someone at - it guidelines on the use of overall compared to the local variables for the business rules? I really don't like the world no matter what, so if someone has a compelling reason to use overall.

    If I use a local variable in the world, is there a single character required for the local variable or no problem with the help of the same name local var in all of business rules.

    Thank you

    Hello

    I bet you have a background in programming. Don't let the 'global' nomenclature lure you into thinking that "bad design - not encapsulated, etc" with regard to business rules. According to John, this area, variable overall are a vehicle to reduce maintenance.

    For example if you have a variable in which all its used BR called CurrMonth and its always the current month, it create once, maintain his assignment in one place and use it anywhere. In this case 'global' is in fact less.

    Kind regards
    Robb Salzmann

  • Local and Global filter

    Hello

    What to say by a global and local filter filter, global and local guest quick to OBIEE


    Please urgent.


    Thank you
    JEL

    Global vs Local filter filter:
    global filters are also called saved filters, it can be applied to several reports.

    step 1: go criteria in responses create a filter using Add option filter in any column.
    step 2: save the filter in any shared folders.we can apply this filter to any report containing this particular column.we can select filter recorded in option to filter the left pane.

    If a report contains several blocks as table and chart, you can apply a filter that filters the data of table and chart. It is not only for the two blocks. You can apply a filter to a number n of blocks. This filter is called global filter. Local is a normal filter that can be applied generally on one block.

    Guest of dashboard:

    Guest of dashboard is a special type of filter that filters of query that are integrated with the dashboard.

    Step 1: In Oracle BI answers select new dashboard button in this upscale neighborhood of topic.
    Step 2: Select the scope of the dashboard, if we choose the scope as a page then guest will filter does not show in a particular page.scope is the dashboard then it will filter all reports that are present in this dashboard.
    operator and in step 3, select column
    step 4: select control and constraints
    step 5:set default and set the variables of the presentation if necessary.
    step 6: create labels
    Guest of 7:save stage

    Two types of guests from dashboard:
    Table of edge/Page

    Dashboard: this will get all dashboards
    Page: this will get a particular page only.

  • How to create a global inbox for Thunderbird on Windows 10?

    I just installed Windows 10 and Firefox/Thunderbird. On my old system (Windows 7 and Windows Live Mail), I had four e-mail addresses: one is [email protected] and three with [email protected]. Windows Live Mail combined of incoming emails to all four addresses in a combined Inbox. In you bird, can I combine all the incoming mail to these four addresses in a single mailbox in you bird? How?

    For a true global Inbox, you must configure all your accounts to use a POP connection, and in each account, there is a setting to use the global Inbox under local folders. This setting is not available for accounts using IMAP.

    An alternative that can work for you is to simply switch to the view | Records | Unified. It doesn't care if you use POP or IMAP.

    But view | Records | Unread works very well for me. He maintains the separate accounts but collects all new unread messages.

  • Extremely frustrating mouse double click when you use the docking station?

    I have a mobile workstation 15 zbook and love it.  I have a docking station at work and even from one station to the House.

    When I plug the docking to the mouse House will be double-click whenever I have one click.  Simple click, I have to quickly move out of the object or it clicks double in each time.   I tried a new mouse, to reduce the speed of double click and is NOT the case on my docking station at work or when the laptop computer use with the mouse connected locally.

    It of extremely frustrating and makes working at home a pain rather than productive.

    You ask if anyone has seen elsewhere, or have any suggestions?

    Hello @romatlo,

    I read your post about how how your laptop will be double-click everything you click once when it is attached to your docking station, and I would be happy to guide you to a resolution!

    I'm sorry, but to get your question more exposure, I suggest posting in the trade forums, since it is a commercial product. You can do it:

    http://h30499.www3.HP.com/T5/notebook-HP-ProBook-EliteBook/BD-p/BSC-274

    I hope this helps!

    Concerning

  • models and documents/directory local css

    I have reviewed the documents and technical notes online, but somehow missed how to do the following with the models.

    < root > (global.css)- + - < dir1 > (local.css), page1.htm, page2.htm...
    ................................ |
    "... +-dir'n ' > (local.css) page1.htm, page2.htm...

    I can't understand how to create a model that connects two of the global, site wide, css and a local, a specific directory, css.

    "" < LINK href = "... / global.css ' type = text/css rel = stylesheet >
    "< LINK href="./local.css "type = text/css rel = stylesheet >

    I tried a bunch of different ways, but the model application process changes the local directory to point to non-existent files in the Templates directory. I am looking for a way to block the binding of path in the model and it remained unchanged by the process of model when applied.

    Thanks in advance,
    Bud

    > Version: Dreamweaver 8.
    >
    > Attach the editable area of local style and put in @import are for example a

    If you set the href of the link external css editable, you
    don't have to remember to put it when you make a new page of the child.

    It will use the default value that you set when you created the combo box.


    With the code above in the head of a model, each page of the child it will be
    get this code:


    This ===>
    Untitled.CSS in SOME directory the file of the child is in. Who is
    what I thought you wanted the CSS "specific directory.

    Yes, it is modifiable in the pages of the child using model properties...
    But you don't have to put or change or never even touch him if you
    do not want.

  • Unable to write by e-mail to in the box. I tried the compaction, but TB goes for several hours and then stops responding. I erased my in box on the server.

    I'm now 17 nstmp folders. my 3 TB drive C is only about 60% full. It is true that I've never compacted my Inbox before. I currently have about 1169 messages in the box. my server is POP3. mail.armscomm.com network solutions. I am able to download mail on another computer using Outlook Express. ask if you need more information

    Jonathan arm

    There is another way. I just try and avoid it.

    • It is essentially a compact manual.
    1. Create a folder in Thunderbird and copy all mail in the Inbox.
    2. Go to the menu Tools (alt + T), and then select account settings
    3. Select the server to the account settings (or if it is a local folder or a problem of global Inbox of local records)
    4. On the right at the bottom of the screen will be a local directory. Click Browse.
    5. In the window that opens on the right click on the highlighted entry and select Explorer. This should open windows Explorer to the folder that the file in question is
    6. Close Thunderbird by clicking Cancel on all Thunderbird Windows, you opened, and then the X
    7. Delete the Inbox and Inbox MSF files
    8. Restart Thunderbird
    9. Copy your mails to Thunderbird created when he started toward the top of the Inbox.
    • Thunderbird has its own javascript engine, it is part of the program.
    • Reinstall Thunderbird will not help because the problem is with your profile and who is unaffected by the resettlement process.
  • Areas of clock in the FPGA examples

    I was looking through some examples of LabVIEW FPGA and I fell on the example of Crossing Clock domains.

    In this example, there are 4 screws; FIFOs.vi; Global Variables.vi; Local variables.VI; and Registers.vi. In each of these screws, there is a timed loop which runs at 160 MHz.

    How is that possible? Since the clock on the FPGA is only 40 MHz. did I miss something?

    On the FPGA target, you can right click on the clock of 40 MHz and create a derived clock which can be a multiple where for a fraction of the base clock (40 MHz).

    160 MHz is a trivial example of 4 times the base clock.

  • Pass the Boolean b/t parallel threads

    Dear Board of Labview,

    I have two Labview processes running in parallel.   Entering the data and the other data output are done.   They where originally designed to operate independently of the other, but today I need them to make some modest integration.   The two processes are very complex, so I would avoid a costly reconstruction.   I am looking for a quick fix and dirty.

    I need #1 process (which is loop based) temporarily hold the execution based on a condition (Boolean flag) process #2.   I'm not familiar with the techniques of parallel processing in labview, and I wonder if I'm doing this more difficult it really is.   Can I put a wait loop in a process which refers to an indicator in another process?   What is the best way to pass Boolean data between parallel threads?

    Thank you

    Zach

    That vi is perfect.

    In your case by using a variable is probably correct. But do not use a global - use a local! I would stay again far using variables-you never know what the future holds. Maybe you end up adding a few other loop. Maybe you want to add error checking and loops to stop on error of the signal.

    There is a significant difference between Globals functional and just a simple variable. Since the FG is a vi that one instance can run at a time *. With a variable, you have no way of knowing which is written or read what or when, unless you use semaphores or structures from sequence.

    * unless you make it reentrant

  • The OFA error: you have enough privileges for the operation. Please contact your system administrator. (Hello world does not)

    Hello

    My business that we are upgrading to R12.2.5. I downloaded the latest patch from metalink jdeveloper and trying to configure jdeveloper. When I ran Hello World program I get an error of "you have enough privileges for the operation." "Please contact your system administrator."

    I have facility for all the configs needed in the project but still is the same.


    When I fell on the debug mode. I got the same error with the missing config file.

    Please check below the debug message:

    November 4, 2015 16:47 oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig

    INFO: oracle.adf.share.config.ADFConfigFactory no META-INF/adf - config.xml not found

    Help me its urgent.

    Thank you

    Thanks for the reply to my post.

    I used the position and he help me solve the problem.

    As I'm working on R12.2.5 which is the latest version of oracle, so the solution was not entirely correct, but helped me dig the real solution.

    After that the implementation of Jdevloper below is the steps I followed

    1. change the profile FND option: validate IP address - no

    2 al ' Jdeveloper go to tools--> embedded OC4J preferences--> Global--> starting--> address local IP select by default.

    It helped me solve my problem.

    Thank you

  • How to unregister script programmatically?

    Friends, Romans, countrymen!

    Lend me your ears! [Shakespeare: Julius Caesar]

    During the test of a script that has an opinion, that it is necessary to uninstall each time until it runs again (with some modifications). Doing this via the catalog script is at least of your time.

    If I don't do this, then old code can be executed and data Explorer displays items that are no more in the script... I even begin to FM and the ESTK again and again during the tests. In the notification function is also not possible.

    • to set a breakpoint
    • use of $.writeln.

    Only feedback functions alert, alert and Console. However, it is possible to set a breakpoint in a function called. Because some of them are called by the notification function should I put several...

    I tried to put the code of cancellation of registration on the Cancel button the dialog with the functions I tested:

    wPalDS.g1.Cancel.onClick = function () {
      wPalDS.close();
      Notification (Constants.FA_Note_PostActiveDocChange, false);   // unregister script
    }
    

    But it does not work: the script is always saved after the cancellation.

    For debugging of the Scripting Guide refers to JavaScript Tools Guide - which does not at all such a delicate situation.

    You have something to see global elements and local variables (to a function) and the objects in the data Explorer? Currently I use these constructions as var a1...:

    function RefreshGlobalsDS () {
    $.bp(true);
      GetRefPageItems ("Ref-Locations");              // gasLocations
      GetRefPageItems ("Ref-Formats");                // gasFormats
      GetRefPageItems ("Ref-Schemes");                // gaoTxtSchemes
    var a1 = gasLocations, a2 = gasFormats, a3 =  gaoTxtSchemes;
      FillItemList (wPalDS.p0.tabL.g1.p1.listLocations,  gasLocations);  // undefined is not an object ????
      FillItemList (wPalDS.p0.tabF.g1.p1.listFormats,    gasFormats);
      FillSchemeList (wPalDS.p0.tabT.g1.p1.listSchemes,  gaoTxtSchemes);
    }
    

    All the tips and tricks at hand?

    Hi Klaus,

    have you tried to swap lines2 and 3?

    First remove thenotification?

    I do it like this:

    wPalDS.onClose = RemoveMyNotification;

    function RemoveMyNotification()
    {
    Notification(Constants.FA_Note_PostActiveDocChange, false);
    }
    

    Just give it a try.

  • Question about "split partition" command

    Hello

    I have the following partitioned table...

    CREATE TABLE trans_tab
    (

    TRANS_ID number (10),
    DATE OF TRANS_DATE,
    CONSTRAINT PK_TRNS_ID PRIMARY KEY (TRANS_ID))
    PARTITION BY RANGE (TRANS_DATE)
    (PARTITION TRANS_2010 VALUES LESS THAN (TO_DATE ("2010-10-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN '")) TABLESPACE TRANS_2010,)
    PMAX VALUES LESS THAN (MAXVALUE) TABLESPACE TRANS_MAX PARTITION);

    Now, I intend to add a partition, as shown below...

    ALTER table split partition pmax trans_tab at (TO_DATE (' 2012-10-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN ')) in (2012 partition, partition pmax);


    The command above split partition worked well and ended quickly in the TEST environment which had only 100 records. I now intend to do in the production, which has about 90 MM records in the table. Here are my questions...

    (1) I will try to find how long would the "split partition" command to run into a table that has ~ 90 mm record table the command "split partition" to physically move the records or just logically to remap the records to the appropriate partition? If it is logical remapping, I guess that the split command would complement quickly even against a huge table... Could check you?

    (2) in the TEST environment, I checked the non partitioned status of the global and the local index after splitting the partiton and they look good? Should I be rebuild the index after splitting the partition?

    Thanks for your time...

    Assuming he has no line of 2012 year in partition PMAX, the SPLIT would create a vacuum PMAX anew. However, it has the maximum value of TRANS_DATE in the PMAX partition - so he must sweep the partition (or use a LOCAL index on the partition, if available). Therefore, depending on how it can identify lines, it may take a little time.

    I think that the current PMAX partition is not empty (that is, it has lines of 2011). As a result, a SPLIT will cause GLOBAL Indexes to score UNUSABLE unlesss you use the UPDATE GLOBAL INDEXES.

    Was your test with the actual number of lines to PMAX?

    Hemant K Collette

Maybe you are looking for