After setting stage.transform.matrix3d, mouse event localX/Y stageX/Y do not work

Hello
Because i need to do 3d transformation on the whole stage, i set the stage transfromation.matrix3d.
I made one test application and find that mouse event doesn't work properly.
In my application, i simply add a sprite containing red circle and test the functions.
Besides, i scale the stage along x-axis half using stage.transform.matrix3D
The problem is that when i click on my red circle, the e.localX/Y and e.stageX/Y are all zeros.
But if i click on places rather than my red circle be, the e.localX/Y and e.stageX/Y work fine.
Here is my code.
public function init():void{
                              var m:Matrix3D= new Matrix3D();
                              m.copyRowFrom(0,new Vector3D(0.5,0,0,0));
                              m.copyRowFrom(1,new Vector3D(0,1,0,0));
                              m.copyRowFrom(2,new Vector3D(0,0,1,0));
                              m.copyRowFrom(3,new Vector3D(0,0,0,1));
                              stage.transform.matrix3D = m;
                              s.graphics.beginFill(0xff0000);
                              s.graphics.drawCircle(0,0,50);
                              s.graphics.endFill();
                              addChild(s);
                              s.x = (stage.stageWidth)/2;
                              s.y = (stage.stageHeight)/2;
                              s.z = 0;
                              stage.addEventListener(MouseEvent.CLICK, onStageClick);
private function onStageClick(e:MouseEvent):void{      
                              trace("global" + e.stageX + " " + e.stageY);
                              trace("local" + e.localX + " " + e.localY);

1. In the code, I think it should change the value of the "player" so that it reflects the right turn. E.g. after the user press the mouse, the player should be changed to "computer" and after the computer goes, the player should be changed to "you". Otherwise, the player stays the same value and the program will only print out one symbol, which in this case is "O".
2. To make the previous moves stay, the code has to get some way to remember the moves. So before the repaint, the program will record the context for the next paint method.
Regards,

Similar Messages

  • How to I set an internal link in a PDF document using Preview?  After setting a link under the Tools/Annotations menu, the link doesn't work and no detailed instructions are provided.

    How to I set an internal link in a PDF document using Preview?  After setting a link under the Tools/Annotations menu, the link doesn't work and no detailed instructions are provided via the Help menu other than it showing the pull-down menu selection to make.

    No.  I am able to use the other features such as underlining, highlighting, adding rectangles and oval and save those changes.

  • HT5022 After setting up, no longer appears in either version of Airport but DOES WORK! Why?

    After setting up, no longer appears in either version of Airport but DOES WORK! Why?

    Hey Bob...
    So far, using wireless only on the AirPort Extreme... (No Ethernet Devices or USB connected)
    Yes to "create a wireless network".
    My Cable Modem is the latest Motorola Docis 3, The APE is M8799LL/A Model A1034
    Yes both versions...
    More detail.... If I reset the APE, it shows up just fine in 5.6.
    I  go through configuration. I choose APE name, new wireless network, enter Wireless Network name and password.
    Set for WPA.
    Anyway, Airport 5.6 claims success and restarts APE. Never finds it again, (unless I reset it again. Went thorugh this process 3 times with same results... )
    Anyway. the utility cannot "see" APE but my devices, (iPads, iPods, iPhone, Macbooks, Android devices as well), All can see APE and connect to it.
    So, NOT major issue except that in order to make ANY changes to the APE, I must do a reset..
    It's just WEIRD!    

  • After upgrading to OS 10.9.1 Aperature 3.2.3 does not work and I'm not able to download new version of Aperature.

    After upgrading to OS 10.9.1 Aperature 3.2.3 does not work and I have not been able to download upgrade of Aperature?

    Is Aperture installed in the "Application"s folder and simply named Aperture?  If not, move it back to "Applications". Did you buy Aperture from the App Store or as a boxed Retail version?
    Relaunch the App Store and sign in with your Apple ID (in the Store menu). Reload the "Purchased" page of the App Store. Do see Aperture on the Purchased tab or perhaps the "Accept" portion of the "Purchased" page? If in the "Accept" portion, accept it to your AppleID  and install it. Else look again at the Update page.
    For some forum members the update did only appear  until after setting the primary system language to English and rebooting the Mac.  This bug is supposed to have been fixed with the update to 10.9.1, but try it, if all else should fail.

  • After installing iPhone Configutilities in my Mac, Personal Hotspot using USB is not working! Please help, I am using 10.7 Lion OS

    After installing iPhone Configutilities in my Mac, Personal Hotspot using USB is not working! Please help, I am using 10.7 Lion OS

    Did you talk to your carrier?

  • When I click PDF file, the file does not open and  installation software for creative suite automatically begin to start. Even after re-installation of creative suite 5.5, only acrobat reader dose not work and the same phenomena occurs.

    When I click PDF file, the file does not open and  installation software for creative suite automatically begin to start. Even after re-installation of creative suite 5.5, only acrobat reader dose not work and the same phenomena occurs.

    Did you ever install Acrobat? It is not installed automatically with CS, but requires an extra installation step.

  • After I updated to iOS 7.0.2 my lock button is not working properly

    After I updated to iOS 7.0.2 my lock button is not working properly I push the button many times and after many failed attempts it locks and sometimes not. I had to use the accesibility tool to lock it manually from the screen, this is really annoying.

    I guess it is.
    Do you have a question, or are you just sharing your experience with us?

  • HT201210 Please can you help? How do i reset my lock screen on ipod. I have connected to itunes on the original computer it was set up on however the code i thought i entered does not work. thanks in advance

    Please can you help? How do i reset my lock screen on ipod. I have connected to itunes on the original computer it was set up on however the code i thought i entered does not work. thanks in advance

    Connect the iPod to irs syncing computer and restore via iTunes/ Place the iPod in Recovery mode if necessary to allow the restore.

  • After i changed my computer's name and ip ,the EM could not work???

    My server is sunV890 + solaris9+oracle 10g
    After i changed my computer's name and ip ,the EM could not work???
    Who can help me to sovle this problem?thank you

    The notes in these Metalink documents will help you:
    Note:224425.1
    Note:260571.1
    Note 141955.1
    Note 95418.1

  • After "upgrading" from trial to FCPX 10.0.3 multi cam does not work

    After "upgrading" from trial to FCPX 10.0.3, multi cam does not work anymore. Everything was fine in the trial version, but now the multicam clip I made in trail is shown, but not with the 4 windows, only the first angle can be seen. And I can not find (import) the cuts I made in the trail. The settings are the same in both versions. Am I missing something? Is it possible that I have to start from scratch and all work is lost?
    When I double click the multi cam clip I see all four angles in the timeline, one underneath the other... 
    Any help is appreciated! Thanks!

    There is an excellent podcast tutorial series called "Creative COW Final Cut Help Tutorials Podcast (SD)"
    in the iTunes Store.
    The latest three are video podcasts and go into great depth concerning the new Multicam in 10.0.3
    Can't recommend them enough.

  • OIM Event handler resistered and Imported but not working

    hi,
    I am using OIM 11g in windows 32 bit envoirnment.
    I have registered a pre precess event handle and also imported it into oim but it's not working. pls find below details.
    DB Entry of MDS_PATHS Table
    1     LastNameEventHandlers.xml     197     196     /tiks/LastNameEventHandlers.xml          DOCUMENT     5          143     http://www.oracle.com/schema/oim/platform/kernel     eventhandlers     1          1          UTF-8     3558973303                    0     0
    DB Entry of plugins table
    2 com.holcim.hssa.eventhandler.LastNmPreProcessEventHandlers     oracle.iam.platform.kernel.spi.EventHandler     1.0     LastNamePreProcessEventHandlers     1
    need tio know where does the eventhandlers goes D:\ORCL_HOME\Oracle_IDM1\server\features this path or else,
    but it's not working

    The eventhandler
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <action-handler class="com.holcim.hssa.eventhandler.LastNmPreProcessEventHandlers" entity-type="User" operation="CREATE" name="LastNmPreProcessEventHandlers" stage="preprocess" order="FIRST" sync="TRUE"/>
    </eventhandlers>
    The Plugin
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="com.holcim.hssa.eventhandler.LastNmPreProcessEventHandlers" version="1.0" name="LastNamePreProcessEventHandlers"/>
    </plugins>
    </oimplugins>
    The handler
    package com.holcim.hssa.eventhandler;
    import java.io.PrintStream;
    import java.util.HashMap;
    import oracle.iam.platform.context.ContextAware;
    import oracle.iam.platform.kernel.spi.PreProcessHandler;
    import oracle.iam.platform.kernel.vo.*;
    public class LastNmPreProcessEventHandlers
    implements PreProcessHandler
    public LastNmPreProcessEventHandlers()
    methodName = "";
    System.out.println("LastNmPreProcessEventHandlers called of NamePreProcessEventHandlers 16 ");
    public boolean cancel(long arg0, long arg1, AbstractGenericOrchestration arg2)
    System.out.println("cancel called");
    return false;
    public void compensate(long arg0, long arg1, AbstractGenericOrchestration arg2)
    System.out.println("getParamaterValue called");
    public EventResult execute(long processId, long eventId, Orchestration orchestration)
    System.out.println("EventResult execute called of LastNmPreProcessEventHandlers 16 ");
    methodName = "execute";
    HashMap parameters = orchestration.getParameters();
    System.out.println((new StringBuilder("Parameters ")).append(parameters).toString());
    String operation = orchestration.getOperation();
    System.out.println((new StringBuilder("Pre Process Operation ")).append(operation).toString());
    if(operation != null && operation.equalsIgnoreCase("create"))
    String firstName = getParamaterValue(parameters, "First Name");
    if(firstName != null && !firstName.trim().isEmpty() && !parameters.containsKey("Middle Name"))
    orchestration.addParameter("Middle Name", firstName.substring(0, 1));
    return new EventResult();
    public BulkEventResult execute(long arg0, long arg1, BulkOrchestration arg2)
    System.out.println("BulkEventResult called of LastNmPreProcessEventHandlers 16 ");
    return null;
    public void initialize(HashMap arg0)
    System.out.println("initialize");
    private String getParamaterValue(HashMap parameters, String key)
    System.out.println((new StringBuilder("getParamaterValue")).append(key).toString());
    String value = (parameters.get(key) instanceof ContextAware) ? (String)((ContextAware)parameters.get(key)).getObjectValue() : (String)parameters.get(key);
    return value;
    private String methodName;
    Also have a question where does it goes after export
    D:\ORCL_HOME\Oracle_IDM1\server\features or elsewhere?

  • After updating to OS X 10.5.8 my cd-drive does not work.

    I just installed OS X Leopard 10.5.8 on my 1.25 GHz eMac and the cd-drive was working great. Then after letting it install the 10.5.8 combo update the drive quit working. If I manual open it and place a cd in the drive it will read, use and eject the cd with the eject key on the keyboard. If no cd is in the drive it has to be manually opened.
    Leopard does not even have my drive listed in the disk utility. It is listed under about my Mac.
    I have found several threads on this forum with the exact same issue as I am having, but have not found a resolution to the problem. If no resolution is found I will have to reinstall Tiger.
    Any suggestions or help would be appreciated.

    Did you repair permissions after doing the update? Those updates move a lot of furniture around and I find a lot of mis-set permissions after applying most Apple updates.
    NOTE: Starting with about 10.5.6, DU started belching all sorts of meaningless lines of permission repairs. You may not be able to tellwhat's mis-set as the spurious messags tend to hide the real repairs, but let it run anyway.
    If that doesn't restore function, a PRAM ZAP may help. The computer may have lost tack of some of its devices in the update. Rare, but can happen.
    If that still gives no joy, you can add an eject icon in the menu bar. If that works then at least you avoid the manual opening. Here's how:
    (instructions are for Tiger but should work in Leo):
    Follow this path: Macintosh HD -> System -> Library -> Core Services -> Menu Extras. Inside the Menus Extras folder is a little file named Eject.menu. Double-click that file and you get a handy eject icon near the right end of the menu bar. Clicking/holding it is exactly the same function as the eject key on an Apple keyboard.

  • Mouse to switch primary and seconds buttons not working on Forms 6i

    Hi All,
    I am facing problem while i am using Form6i Application on web.
    We have a couple users that they are left hand. When they set their mouse to switch primary and seconds buttons under windows setup.
    The menus do not worked on Form6i Application, unless the user uses the keyboard.
    On Form10g it's working fine but on Form6i it's not working.
    Thanks in Advance.
    Uzair

    Hi Craig and thanks for replying,
    The way I created the roll was under my username, not the administrator user. The first time I was not able to create a roll from my user, but I did this to be able to do it: GRANT CREATE ROLL TO <MY USERNAME>
    The way I enabled the the Roles on y menu was as follows:
    1) I open menu using Forms 6i.
    2) Right click on my menu name and choose Property Palette.
    3) Under Menu Security, I choose Use Security and select "Yes".
    4) Under Module Roles, I typed a name for that role.
    5) I go to SQL and create the new Role under my username giving the role the same name I gave it on Forms. This is how I created: Create role <Role Name>
    6) Then I just assign that role to my user, like this: Grant <Rolename> to <username>
    Hope this helps!!
    Thanks again in advance!!

  • After march 25th 2011 see blank page of hotmail, gmail chat is not working

    On monday, 28th of March 2011 after starting Firefox when tried to go to gmail received warning 'This connection is untrusted' and added this site as exception (i saw this warning too many times last couple days). After that logged in to gmail, chat was not working and button 'more' was not working as well. Also, cannot login to hotmail - see blank page. I went thru gmail support and googled. Cookies cleared, addons uninstalled, refresh pressed, restarted, computer date and time is correct, completely uninstalled Firefox several times, tried versions 3.6.13, 3.6.16 and now the same situation with Firefox 4. Also checked dom.storage.enable which is true. Nothing did help. Anyway, everything working with IE fine, and, sure, everything was perfect week ago.
    After some searches found article, that was something changed with sertificates on March 25th. I think it is somehow connected to my problem. Here are the articles:
    http://www.ghacks.net/2011/03/25/microsoft-updates-windows-to-block-fraudulent-digital-certificates/
    And maybe this one:
    https://blog.torproject.org/blog/detecting-certificate-authority-compromises-and-web-browser-collusion
    Any workaround very appreciated.
    Didnt noticed anomalies with other websites yet.

    Also, when I check this post several times a day, I always see warning 'Connection is untrust'. If I close browser and reopen immediately everything is ok.

  • After updating iso 6.1.3 in my 4s my phone is not working properly

    After updating iso 6.1.3 my 4s is not working properly the main problem is touch is not working properly and battery problem also there pls anyone have some solution

    IOS 6 has had a lot of issues to date. I have a possible solution to offer but I cannot  be sure it will work. Two ideas.
    1. Reset the phone: hold the lock button and home button in at the same time for 10 seconds. This does nit erase anything, it's basically like rebooting a computer.
    2. Factory reset: Hook up to a computer and go to iTunes. Sync the phone (if possible). Once synced, in the summary screen select factory reset (or may be another name, I'm working from memory) it's right beside update software. This will completely reset the phone, you will need to restore it after the reset it complete. I don't know if this will help you, but it may. I hope you can fix it, good luck!!!

Maybe you are looking for