MouseEvent.CTRL_MASK is being masked as MouseEvent.SHIFT_MASK

I am working on a legacy Java App that was written in the 1.1 era. We have recently upgraded enough components and keywords so that the applet is now compiling and executing under JDK 1.5 but it seems that the CTRL + Mouse click action is being masked as a SHIFT + Mouse click on our table model. I have added the snippet that I am using to verify this.
Does anyone know of a reason for this behaviour or have come across it in their own upgrades to 1.5
Thnx,
int mod;
if ((mod = e.getModifiers()) > 0) {
  switch (mod) {
     case MouseEvent.CTRL_MASK:
          System.out.println("Got CTRL Click");
          break;
     case MouseEvent.ALT_MASK:
          System.out.println("Got ALT Click");
          break;
         //CTRL + Click always resolves to this case event
     case MouseEvent.SHIFT_MASK:
          System.out.println("Got SHIFT Click");
          break;
} else {
     System.out.println("Mod is: " + mod);
}

My apologies, seems as though my test case is obviously flawed. With no default case, seems my debugger is stopping on shift click because I am not checking for the right type of variable.
Thnx anyway,
Admins please delete this post

Similar Messages

  • MouseEvent not being recognised!?

    but1.addEventListener (MouseEvent.CLICK,play1) ;
    function play1 (event:MouseEvent) :void{
    gotoAndStop("Wales 1") ;
    This is my code but the MouseEvent is not recognised please could you give me some advice - thank you

    then you didn't change your publish settings.
    and you can't change your publish settings to use as3 so you can't use as3 code with flash 8.
    either upgrade or use as2.

  • MouseEvent?

    Problem Code:
    box.addEventListener(MouseEvent.MOUSE_OVER, onBoxOver);
    box.addEventListener(MouseEvent.MOUSE_OUT, onBoxOut);
    function onBoxOver(evt:MouseEvent):void{
    evt.target.play(boxUP);
    function onBoxOut(evt:MouseEvent):void{
    evt.target.play(boxDOWN);
    OUTPUT:
    ArgumentError: Error #1063: Argument count mismatch on
    flash.display::MovieClip/play(). Expected 0, got 1.
    at mikeumus_fla::MainTimeline/onBoxOver()
    ArgumentError: Error #1063: Argument count mismatch on
    flash.display::MovieClip/play(). Expected 0, got 1.
    at mikeumus_fla::MainTimeline/onBoxOut()
    Hey Everybody,
    I'm using actionscript 3.
    I have boxUP, and boxDOWN MCs ready and exported to
    actionscript. I named the instance of box on the stage to and
    instance name of box.
    The site that I'm reffering to is
    Mikeumus.com. If you go there
    you'll notice a subtle black rectangle with no fill at the bottom
    of the .swf. That is the box that is referred to in the code. I
    just want it to pop slide up and down when moused, in and out of.
    The .swf is huge as hell too and for a reason i cannot explain. It
    plays a song coming from youtube's servers, and all the video files
    on it have been compressed multiple times on AE and Adobe's CS4
    Media encoder. The background .flv that I'm sure you'd like to
    point out as being the source of the huge file size is actually
    only 418.1 kb! And the others are all within the 200 kb range, so
    wtf!?!?!
    Thank you for your time and consideration.
    Peace and Love,
    Mikeumus

    mikeumus,
    > There is a right and a wrong way to do things.
    True, but unlike studies of morals or ethics, what's right
    and wrong in
    Flash is ultimately more focused on making greater or less
    work for
    yourself, depending on the version of ActionScript and Flash
    Player you're
    targetting -- and there's always a balance to strike.
    > This is my featured portfolio site for my Web Design
    start-up,
    > so i need to do it right. And what I mean by doing it
    write (in
    > my opinion) is not using the gotoAndPlay method, but I
    am
    > still grateful for the helpful comments.
    You lost me on that one. If you need to send a particular
    timeline
    (that is, a particular movie clip) to a frame or frame label,
    then it isn't
    a question of best practices: you'll simply have to use
    either the
    MovieClip.gotoAndPlay() or MovieClip.gotoAndStop() method,
    and when you do,
    you'll have to pass in a parameter that dicates the
    destination frame or
    frame label. If you only want to *play* a particular
    timeline, then
    naturally the MovieClip.play() method is your choice.
    > I've spoken with a Flash professor friend of mine(not on
    this exact
    > issue yet) and she says that the professional
    actionscripters keep
    > everything on one frame ...
    You'd be surprsied! ;) But yes, this is definitely
    considered best
    practice.
    > ... and simply load alllll of their MovieClips onto the
    stage
    Not sure about that one. What do you mean by "load" in that
    statement?
    Do you mean loading external SWFs at runtime?
    > This version of the code proves to be lacking something
    as well:
    >
    > box.addEventListener(MouseEvent.MOUSE_OVER, onBoxOver);
    > box.addEventListener(MouseEvent.MOUSE_OUT, onBoxOut);
    >
    > function onBoxOver(evt:MouseEvent):void{
    > boxUP.play();
    > }
    >
    > function onBoxOut(evt:MouseEvent):void{
    > boxDOWN.play();
    > }
    The above code assigns two event handlers to the box
    instance. On mouse
    over, the custom function onBoxOver() is triggered; on mouse
    out, onBoxOut()
    is triggered. The onBoxOver() function instructs a movie
    clip, whose
    instance name is boxUP, to play. The onBoxOut() function
    instructs a
    separate movie clip, whose instance name is boxDOWN, to play.
    In other
    words, when you move your mouse over box, the boxUP movie
    clip plays. When
    you move your mouse away from box, the boxDOWN movie clip
    plays. I have no
    idea if that's what you're after.
    My hunch is that you want *box* to play, and that you want
    box to jump
    directly to two locations in its own timeline when it does.
    (I could be
    flatly wrong, of course!) If so, then you'll need to target
    box itself
    inside those functions:
    function onBoxOver(evt:MouseEvent):void{
    box.gotoAndPlay("boxUP");
    function onBoxOut(evt:MouseEvent):void{
    box.gotoAndPlay("boxDOWN");
    Again, this assumes that the box instance has two frame
    labels in its
    timeline, and that those labels are named "boxUP" and
    "boxDown". Is that
    what you're after?
    In this case:
    > function onBoxOver(evt:MouseEvent):void{
    > play(boxUP);
    > }
    ... it's never going to work, because the play() method does
    not accept
    parameters. Parameters are (sometimes optional) values you
    place between
    the parentheses of a function or method.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • MovieClip Filter Causing issues with EventListeners (mouseEvent.ROLL_OVER)

    Hello,
    I have been working on a flash photo gallery for the web. It loads thumbnails from an xml file into a loader which is then made the child of a movieclip.
    The thumbnails are animated and triggered with mouse events of ROLL_OVER and ROLL_OFF. I have this working, or appearing to, when the movieclip containing the loaded thumbnail has no filters applied to it.
    I want add a drop shadow on the ROLL_OVER event and remove the drop shadow on the ROLL_OFF event. I also have this working, however my problem arises when I mouse over the very edge of the movieclip. This cauese the ROLL_OVER and ROLL_OFF function to fire in rapid succession, creating a flashing dropshadow. This looks aweful and I really have no idea what would be causing this issue.
    Thanks in advance for any advice!
    Regards.

    Thanks for the reply.
    I also found it difficult to believe that the filter was causing issues with the roll over/out events. I will expand on the example code you provided so you get an idea of what I am trying to accomplish and where my issues arise.
    EDIT: I should add that the issue is only present when I tween AND add a filter. If I only add a filter or if I only tween I have no issues but the combination or adding a filter and tweening causes the OVER/OUT events to fire rapidly.
    //This code does not result in a flashing animation
    myClip.addEventListener(MouseEvent.ROLL_OVER, overClip);
    myClip.addEventListener(MouseEvent.ROLL_OUT, outClip);
    function overClip(e:MouseEvent):void
       myTween =  new Tween(myClip, "scaleX", Regular.easeOut, myClip.scaleX, 1.5 , 3, true);
       myTween =  new Tween(myClip, "scaleY", Regular.easeOut, myClip.scaleY, 1.5 , 3, true);
    function outClip(e:MouseEvent):void
       myTween =  new Tween(myClip, "scaleX", Regular.easeOut, myClip.scaleX, 1 , 3, true);
       myTween =  new Tween(myClip, "scaleY", Regular.easeOut, myClip.scaleY, 1 , 3, true);
    //However if i add these lines of code to add and remove a filter I can observe the flashing effect when the mouse is near the edge of the moveclip
    myClip.addEventListener(MouseEvent.ROLL_OVER, overClip);
    myClip.addEventListener(MouseEvent.ROLL_OUT, outClip);
    function overClip(e:MouseEvent):void
       myClip.filters = [myDropShadowFilter];
       myTween =  new Tween(myClip, "scaleX", Regular.easeOut, myClip.scaleX, 1.5 , 3, true);
       myTween =  new Tween(myClip, "scaleY", Regular.easeOut, myClip.scaleY, 1.5 , 3, true);
    function outClip(e:MouseEvent):void
       myClip.filters = [];
       myTween =  new Tween(myClip, "scaleX", Regular.easeOut, myClip.scaleX, 1 , 3, true);
       myTween =  new Tween(myClip, "scaleY", Regular.easeOut, myClip.scaleY, 1 , 3, true);
    Is there something obviously wrong with this approach to adding a filter/tweening? I am fairly new to flash.
    Thanks again!
    Message was edited by: Dafunkz

  • Dont detect MouseEvent as2 to as3.

    Hello. I transform a as2 game to as3. transform all the code and the game start but dont detect any MouseEvent associated to a MovieClip. In stage yes but not in any MovieClip. This is one example of my code...
    Code: 
    wheelmain.wheel.addEventListener(MouseEvent.MOUSE_DOWN, onWheelDown);
    wheelmain.wheel.addEventListener(MouseEvent.MOUSE_UP, onWheelUp);
    wheelmain.wheel.addEventListener(MouseEvent.ROLL_OUT, onWheelRollOut);
    wheelmain.wheel.addEventListener(MouseEvent.CLICK, onWheelReleaseOutside);
    function onWheelDown(e:MouseEvent)
         trace("Boton del raton pulsado.");
         //sndPotencia.start();
         potenciaRuletaOn();
    wheelmain.wheel exists and is a MovieClip. The movie dont show nothing to console.
    Anybody help me?.
    thanks!.

    Sorry for my bad english.
    Well, if i change one of the lines and type this:
    wheelmain.wheel.addEventListener(Event.ENTER_FRAME, onWheelDown);
    when the output console write:
    Boton del raton pulsado.
    Boton del raton pulsado.
    Boton del raton pulsado.
    Boton del raton pulsado.
    That means that the object is displayed and accessible, but for some strange reason it seems that no stage Movieclip dispatches any mouse event.

  • As2 to as3 the class or interface 'MouseEvent' could not be loaded

    im using as2 but the scripts are supposed to be in as3
    here's the code in as3:
    for (var i:int=0; i<10; i++){
              var newFood:mcFood=new mcFood();
              newFood.buttonMode=true;
              newFood.x = (Math.random()*510);
              newFood.y = (Math.random()*310);
              if(newFood.x>550){
                        newFood.x -=530;
              if(newFood.y>550){
                        newFood.y -=530;
              addChild(newFood);
              newFood.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed);
              newFood.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);
    function mousePressed(myVar:MouseEvent):void{
              myVar.target.startDrag();
    function mouseReleased(myVar:MouseEvent):void{
              myVar.target.stopDrag();
              if(myVar.target.hitTestObject(star)){
                        myVar.target.x = -300;
                        myVar.target.y = -30;
    could anyone transform this into as2?

    Basically Sir I do not have any background in using the as2. Since I started using the as3.
    Hmm actually the code up there works fine, but when I add the character to the as3 and try to run it, it says that the the button will be ignored.
    https://www.dropbox.com/s/l88ztx7o9qipbbw/asasasa.fla

  • String to MouseEvent is it possible??

    Hi all
    Just wondering if anyone knows how (if it is possible) to cast a string as a MouseEvent. I am capturing a mouseevent but have to transport it as a string, and at the end i need it to be converted back to a mouseevent.
    Any ideas?

    Thanks again....but i don't see how translatePoint will help. I can't get the mouseevent to the rotateModel method in anyway except as a string(because it goes through the server).
    I don't know if this will help but here is some of the code
    public void mouseDragged(MouseEvent mouseevent) {
              if (mouseevent.getModifiers() == 16)
                   rotateModel(mouseevent);
              if (mouseevent.getModifiers() == 4)
                   zoomModel(mouseevent);
              mousex = mouseevent.getX();
              mousey = mouseevent.getY();
    private void rotateModel(MouseEvent mouseevent)
    if(!render)
                   System.out.println("MouseEvent - "+mouseevent);
                   System.out.println("Mousexy - "+mousex + " " +mousey);
                   if(mousex < mouseevent.getX())
    j += mouseevent.getX() - mousex;
    if(j < 360)
    cmt.rotY(angle[j]);
    } else
    j -= 360;
    cmt.rotY(angle[j]);
    } else
    j -= mousex - mouseevent.getX();
    if(j >= 0)
    cmt.rotY(angle[j]);
    } else
    j += 359;
    cmt.rotY(angle[j]);
    if(mousey < mouseevent.getY())
    k += mouseevent.getY() - mousey;
    if(k < 360)
    cmt1.rotX(angle[k]);
    } else
    k -= 360;
    cmt1.rotX(angle[k]);
    } else
    k -= mousey - mouseevent.getY();
    if(k >= 0)
    cmt1.rotX(angle[k]);
    } else
    k += 359;
    cmt1.rotX(angle[k]);
    cmt.mul(cmt1);
    gc.clear();
    gc.setAppearance(new Appearance());
    gc.setModelTransform(cmt);
    gc.setAppearance(app);
    gc.draw(data);
    canvas.swap();
    I have changed rotate model to accept mouseEvtX and mouseEvtY
    private void rotateModel(int mouseEvtY, int mouseEvtX)
    and each mouseevent.getY() or .getX() to mouseEvtX or EvtY accordingly
    and the mouseDragged writeline to
    rotu.writeLine("ROTATE " + MEvtX() + " " + MEvtY() + "\n");
    and in a loop that waits for commands i have
    int MGX = Integer.parseInt(tok.nextToken());
                        int MGY = Integer.parseInt(tok.nextToken());
                        rotateModel(MGX, MGY);

  • The class or interface 'MouseEvent' could not be loaded

    I am creating a swf file that would get populated with images
    and text taken entirely from an XML file from the local folder. All
    i need to do now is manouver between the images using a click of a
    button. Say there are some images lined up one below the other and
    there would be a button on screen.. on click of which the focus has
    to shift from one image to the other. To achieve this functionality
    i have created a Movie Clip that would act as the BG for the Images
    to show that the image is in Focus. I check the current location of
    the Movie Clip on cick of the button and then set the next location
    of the Bg movie clip accordingly.
    The Functionality of moving/changing coordinates of the movie
    clip on click of a button works fine when done separately in a new
    file, but when combined with the code where the XML gets parsed and
    the Imges are set on the UI, it gives me an error -- "The class or
    interface 'MouseEvent' could not be loaded"
    I'm adding my code below
    RPNext_btn.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(event:MouseEvent):void {
    trace("here");
    var XCo = SwatchBGRght_MC.x;
    var YCo = SwatchBGRght_MC.y;
    trace("X coordinate::"+XCo);
    trace("Y coordinate::"+YCo);
    if(YCo==145){
    //SwatchBGRght_MC.y = 282.2;
    if(YCo==282.2){
    //SwatchBGRght_MC.y = 419.4;
    if(YCo==419.4){
    //SwatchBGRght_MC.y = 145;
    __________________________________

    Well, I guess I'll have to see the code, that is NOT
    functioning, to track this error down.

  • MouseEvent.RELEASE_OUTSIDE is null!

    It was announced that the RELEASE_OUTSIDE mouse event was brought back in Flash Player version 11.3.
    But the RELEASE_OUTSIDE constant in the MouseEvent model is not initialized with any value: public static const RELEASE_OUTSIDE : String;
    Any idea what's going on here?

    Out of curiosity I tried it myself on Windows and when I use the debugger (CTRL+SHIFT+ENTER) it works. If I just use the player (CTRL+ENTER) I get an error.
    Here's the single frame script I used:
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    var s:Sprite = new Sprite();
    s.graphics.beginFill(0x0,1);
    s.graphics.drawRect(0,0,100,100);
    s.graphics.endFill();
    addChild(s);
    s.addEventListener(MouseEvent.RELEASE_OUTSIDE, handleOutside);
    function handleOutside(e:MouseEvent):void
              trace("Release outside");
    When I tried to do this with a regular (non-debugger) player I got this error:
    TypeError: Error #2007: Parameter type must be non-null.
              at flash.events::EventDispatcher/addEventListener()
              at ReleaseOutside_fla::MainTimeline/frame1()
    Since Stage3D and AIR I've become very used to this rodeo.. You must use the debugger, not the standard player.

  • Issue with a class extending EventHandler MouseEvent

    Hello all,
    I originally had a nested class that was a used for mouseEvents. I wanted to make this it's own class, so I can call it directly into other class objects I have made, but for some reason it isn't working and I'm getting an eror
    here is the code:
    public class MouseHandler implements EventHandler<MouseEvent>
        private double sceneAnchorX;
        private double sceneAnchorY;
        private double anchorAngle;
        private Parent parent;
        private final Node nodeToMove ;
       MouseHandler(Node nodeToMove)
           this.nodeToMove = nodeToMove ;
        @Override
        public void handle(MouseEvent event)
          if (event.getEventType() == MouseEvent.MOUSE_PRESSED)
            sceneAnchorX = event.getSceneX();
            sceneAnchorY = event.getSceneY();
            anchorAngle = nodeToMove.getRotate();
            event.consume();
          else if (event.getEventType() == MouseEvent.MOUSE_DRAGGED)
              if(event.isControlDown())
                  nodeToMove.setRotationAxis(new Point3D(sceneAnchorY,event.getSceneX(),0));
                  nodeToMove.setRotate(anchorAngle + sceneAnchorX -  event.getSceneX());
                  sceneAnchorX = event.getSceneX();
                  sceneAnchorY = event.getSceneY();
                  anchorAngle = nodeToMove.getRotate();
                  event.consume();
              else
                double x = event.getSceneX();
                double y = event.getSceneY();
                nodeToMove.setTranslateX(nodeToMove.getTranslateX() + x - sceneAnchorX);
                nodeToMove.setTranslateY(nodeToMove.getTranslateY() + y - sceneAnchorY);
                sceneAnchorX = x;
                sceneAnchorY = y;
                event.consume();
          else if(event.getEventType() == MouseEvent.MOUSE_CLICKED)
            //  nodeToMove.setFocusTraversable(true);
               nodeToMove.requestFocus();
               event.consume();
                         nodeToMove.setOnKeyPressed((KeyEvent)
    ->{
         if(KeyCode.UP.equals(KeyEvent.getCode()))
             nodeToMove.setScaleX(nodeToMove.getScaleX()+ .1);
             nodeToMove.setScaleY(nodeToMove.getScaleY()+ .1);
             nodeToMove.setScaleZ(nodeToMove.getScaleZ()+ .1);
             System.out.println("kaw");
             KeyEvent.consume();
         if(KeyCode.DOWN.equals(KeyEvent.getCode()))
             if(nodeToMove.getScaleX() > 0.15)
             nodeToMove.setScaleX(nodeToMove.getScaleX()- .1);
             nodeToMove.setScaleY(nodeToMove.getScaleY()- .1);
             nodeToMove.setScaleZ(nodeToMove.getScaleZ()- .1);
             System.out.println(nodeToMove.getScaleX());
             KeyEvent.consume();
         nodeToMove.setOnScroll((ScrollEvent)
                 ->{
             if(nodeToMove.isFocused())
                        if(ScrollEvent.getDeltaY() > 0)
                            nodeToMove.setTranslateZ(10+nodeToMove.getTranslateZ());
                        else
                            nodeToMove.setTranslateZ(-10+nodeToMove.getTranslateZ());
           ScrollEvent.consume();
    }This is the class where I call it.
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.Box;
    * @author Konrad
    public class Display extends Pane
        Box b;
        PhongMaterial pm = new PhongMaterial(Color.GRAY);
        public Display(Double x, Double y,Double width, Double height)
             super();
             b = new Box(width, height,10);
             setPrefSize(width,height);
             relocate(x, y);
             b.setMaterial(pm); 
             b.addEventFilter(MouseEvent.ANY, new MouseHandler(this));
             getChildren().add(b);
    }There is no red dot stating the class doesn't exist, or anything is wrong, but when I run it I get an error.
    here is the error:
    C:\Users\Konrad\Documents\NetBeansProjects\3D\src\3d\Display.java:29: error: cannot find symbol
             b.addEventFilter(MouseEvent.ANY, new MouseHandler(this));
      symbol:   class MouseHandler
      location: class DisplayThis is another class from the one that it was originally "nested" in(sorry if I'm not using correct terms). The other class, as well as this, produce the same error(this one was just smaller and eaiser to use as an example).
    The code is exactly the same.
    Originally I thought that the MouseEvent class wasn't an FX class, so I switched it and thought it worked, tried it on the Display class it didn't, tried it on the first one and yeah still didn't, so not too sure what happened there :(.
    Thanks,
    ~KZ
    Edited by: KonradZuse on Jun 7, 2013 12:15 PM
    Edited by: KonradZuse on Jun 7, 2013 12:38 PM
    Edited by: KonradZuse on Jun 7, 2013 12:39 PM

    Last time that was the issue I was having for a certain case; however this seems to be different, here is the list of imports for each class.
    MouseHandler:
    import javafx.event.EventHandler;
    import javafx.geometry.Point3D;
    import javafx.scene.Node;
    import javafx.scene.Parent;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.MouseEvent;Display:
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.Box;draw:
    import java.io.File;
    import java.sql.*;
    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.geometry.Rectangle2D;
    import javafx.scene.Group;
    import javafx.scene.PerspectiveCamera;
    import javafx.scene.PointLight;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.control.Menu;
    import javafx.scene.control.MenuBar;
    import javafx.scene.control.MenuItem;
    import javafx.scene.control.TextField;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DataFormat;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.Pane;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.PhongMaterial;
    import javafx.scene.shape.TriangleMesh;
    import javafx.stage.FileChooser;
    import javafx.stage.FileChooser.ExtensionFilter;
    import javafx.stage.Screen;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import jfxtras.labs.scene.control.window.Window;
    import org.controlsfx.dialogs.Action;
    import org.controlsfx.dialogs.Dialog;Edited by: KonradZuse on Jun 7, 2013 2:27 PM
    Oddly enough I tried it again and it worked once, but the second time it error-ed out again, so I'm not sure what the deal is.
    then I ended up getting it to work again in the draw class only but when I tried to use the event I get this error.
    J a v a M e s s a g e : 3 d / M o u s e H a n d l e r
    java.lang.NoClassDefFoundError: 3d/MouseHandler
         at shelflogic3d.draw.lambda$5(draw.java:331)
         at shelflogic3d.draw$$Lambda$16.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
         at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
         at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
         at javafx.event.Event.fireEvent(Event.java:202)
         at javafx.scene.Scene$DnDGesture.fireEvent(Scene.java:2824)
         at javafx.scene.Scene$DnDGesture.processTargetDrop(Scene.java:3028)
         at javafx.scene.Scene$DnDGesture.access$6500(Scene.java:2800)
         at javafx.scene.Scene$DropTargetListener.drop(Scene.java:2771)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$3.run(GlassSceneDnDEventHandler.java:85)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler$3.run(GlassSceneDnDEventHandler.java:81)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(GlassSceneDnDEventHandler.java:81)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(GlassViewEventHandler.java:595)
         at com.sun.glass.ui.View.handleDragDrop(View.java:664)
         at com.sun.glass.ui.View.notifyDragDrop(View.java:977)
         at com.sun.glass.ui.win.WinDnDClipboard.push(Native Method)
         at com.sun.glass.ui.win.WinSystemClipboard.pushToSystem(WinSystemClipboard.java:234)
         at com.sun.glass.ui.SystemClipboard.flush(SystemClipboard.java:51)
         at com.sun.glass.ui.ClipboardAssistance.flush(ClipboardAssistance.java:59)
         at com.sun.javafx.tk.quantum.QuantumClipboard.flush(QuantumClipboard.java:260)
         at com.sun.javafx.tk.quantum.QuantumToolkit.startDrag(QuantumToolkit.java:1277)
         at javafx.scene.Scene$DnDGesture.dragDetectedProcessed(Scene.java:2844)
         at javafx.scene.Scene$DnDGesture.process(Scene.java:2905)
         at javafx.scene.Scene$DnDGesture.access$8500(Scene.java:2800)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3564)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3379)
         at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3331)
         at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1612)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2399)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:312)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:237)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:354)
         at com.sun.glass.ui.View.handleMouseEvent(View.java:514)
         at com.sun.glass.ui.View.notifyMouse(View.java:877)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
         at java.lang.Thread.run(Thread.java:724)
    Caused by: java.lang.ClassNotFoundException: shelflogic3d.MouseHandler
         at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:353)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         ... 50 more
    Exception in thread "JavaFX Application Thread" E..........After the E comes a bunch of random stuff with drag and drop and such (since I'm dragging an item, and then creating it and giving it the event in question).
    Line 331 is                      b.addEventHandler(MouseEvent.ANY, new MouseHandler(b));

  • DisplayObject.alpha problem on MouseEvent

    Hello,
    I have a button (VehiclesButton) which on rollover I want it to trigger a mouse event so an image(VehiclesCentral) to the side of it (I've just set the alpha to 0 so its invisble, but its on the stage) will have its alpha increased to 100 and become visible
    VehiclesButton.addEventListener(MouseEvent.MOUSE_OVER,test);
    function  test(e:MouseEvent):void
    VehiclesCentral.DisplayObject.alpha = 100 ();
    When I publish this though I get no compiler errors, only an error when I actually go onto it and rollover the button. I get the following error message:
    TypeError: Error #1006: value is not a function.
    at QualityPortal_fla::MainTimeline/test()
    (Quality Protal_fla is the file name I am working on).
    Thanks
    Sean

    Try:
    VehiclesButton.addEventListener(MouseEvent.MOUSE_OVER,test);
    function  test(e:MouseEvent):void
         VehiclesCentral.alpha = 1;

  • Multiple Button MouseEvent Listeners not working in continuation in as3?

    Hi,
    I've multple buttons following this drag structure to scale in different direction various corners of the rectangle:
    scale_bottomRight.addEventListener(MouseEvent.MOUSE_DOWN,scaleBottomRight_Start);
    function scaleBottomRight_Start(mEvent:MouseEvent):void
    /*code*/
              mEvent.target.startDrag(true,new Rectangle(scale_bottomRight.x,scale_bottomRight.y,100,100));
              addEventListener(Event.ENTER_FRAME, update_BottomRight);
    function update_BottomRight(event:Event):void
    /*code*/
      scale_bottomRight.addEventListener(MouseEvent.MOUSE_UP, scalebottomRight_Stop);
      function scalebottomRight_Stop(event:MouseEvent):void
                event.target.stopDrag();
      event.target.buttonMode = false;
    scale_bottomRight.buttonMode = true;
    However, after the dragging few buttons, other drag buttons don't work and first button flickers ....... i think not removing eventListeners is the problem.... can anyone guide me what i may be doing wrong and if remove eventListener is the problem, do i need to call them on EXIT_FRAME function (as i don't have one) or within somewhere else?

    Try this:
    scale_bottomRight.buttonMode = true;
    scale_bottomRight.addEventListener(MouseEvent.MOUSE_DOWN, scaleBottomRight_Start);
    function scaleBottomRight_Start(e:MouseEvent):void
              e.target.startDrag(true, new Rectangle(scale_bottomRight.x, scale_bottomRight.y, 100, 100));
              stage.addEventListener(MouseEvent.MOUSE_UP, scalebottomRight_Stop);
              addEventListener(Event.ENTER_FRAME, update_BottomRight);
    function update_BottomRight(e:Event):void
    /*code*/
    function scalebottomRight_Stop(e:MouseEvent):void
              stopDrag();
              stage.removeEventListener(MouseEvent.MOUSE_UP, scalebottomRight_Stop);
              removeEventListener(Event.ENTER_FRAME, update_BottomRight);
              e.target.buttonMode = false;

  • HELP WITH MouseEvent."OffCanvas"

    Basically I need a function which will go to frame40 when the mouse goes off the canvas,
    we could say
    function ABC(event:MouseEvent):void {
    gotoAndStop(Frame40);
    MOVIECLIP.addEventListener(MouseEvent.XYZ, ABC);
    XYZ will be the action where the mouse goes off canvas.
    The problem is I have not found a function 'offcanvas'

    HEY THERE,
    Thanks for the code, it contain no errors but it still does not work, I have decided to sealed this thread since I have merely been requesting a code to replace XYZ in the Event.MOUSE_XYZ.
    I understand that there might be a longer code to replace XYZ in case you have more suggestions, you can post here at
    http://forums.adobe.com/message/3491892#3491892 as in this thread I go in more detail.
    I guess that there are some major problems in FLASH CS5 with mouse events in which is important, it becomes even more important when it comes to this same code to trigger a function when the cursor leaves the canvas.
    Obviously we are going to find a better way to solve this problem but I hope Adobe team realize the coding errors with mouse events in FLASH CS5.

  • Actual target for MouseEvent.CLICK - spark skins

    Hello,
    I have a question about Event Listeners and targeting events.
    In my AIR app for mobile I need to click / tap on a number of s:Image objects.
    At first I added to each of them an Event Listener linked to an Event Handler. Then, trying to optimize my code, I moved the Event Listener to the container object as suggested in various optimization resources I found online.
    The problem was that the event.target property was not the clicked image, but a s:Group. I eventually figured out that the s:Group was part of the skin of the s:Image, and I fixed the problem by using the target.owner property, but this behavior really created a lot of confusion. I couldn’t find anything about it on the Adobe development resources, as they just insist on (and explain quite well) the difference between the target and currentTarget properties.
    Below you can find a simple representation of my workaround, but I was wondering if:
    1) This was actually caused by some mistake I made, and if it could be more easily avoided;
    2) There is a better or more efficient workaround than the one I came up with;
    3) The topic is discussed somewhere in the documentation.
    Thanks a lot!
    import spark.components.Image;
    private var image1:Image;
    private function initComponent():void
         image1 = new Image();
         image1.source = "assets/aaa.png";
         image1.id = "thisIsTheImage";
         addElement(image1);
         addEventListener(MouseEvent.CLICK, clickHandler);          // 1
    //   image1.addEventListener(MouseEvent.CLICK, clickHandler);     // 2 - the old one
    private function clickHandler(event:MouseEvent):void
         trace("event.currentTarget \t\t\t" +              event.currentTarget);
         trace("event.target \t\t\t\t" +                   event.target);
         trace("event.target.owner.owner \t\t" +           event.target.owner.owner);
         trace("image1.imageDisplay.displayObject \t" +    image1.imageDisplay.displayObject);
         if(event.target.owner.owner is Image){
              // do something
    console:
    event.currentTarget                     TestApp0.ViewNavigatorApplicationSkin2.navigator.ViewNavigatorSkin4.contentGroup.TestView33
    event.target                            TestApp0.ViewNavigatorApplicationSkin2.navigator.ViewNavigatorSkin4.contentGroup.TestView33.SkinnableContainerSkin35.contentGroup.thisIsTheImage.ImageSkin43.Group44
    event.target.owner.owner                TestApp0.ViewNavigatorApplicationSkin2.navigator.ViewNavigatorSkin4.contentGroup.TestView33.SkinnableContainerSkin35.contentGroup.thisIsTheImage
    image1.imageDisplay.displayObject       TestApp0.ViewNavigatorApplicationSkin2.navigator.ViewNavigatorSkin4.contentGroup.TestView33.SkinnableContainerSkin35.contentGroup.thisIsTheImage.ImageSkin43.Group44

    Hey,
    thanks a lot!
    What about using SpriteVisualElement?
    By looking at ther inheritance chains it should be lighter than Image but heavier than BitmapImage:
    Image SkinnableComponent UIComponent FlexSprite Sprite DisplayObjectContainer InteractiveObject DisplayObject EventDispatcher Object
    SpriteVisualElement FlexSprite Sprite DisplayObjectContainer InteractiveObject DisplayObject EventDispatcher Object
    BitmapImage GraphicElement EventDispatcher Object
    I'd like to use it over BitmapImage beacause it inherits from InteractiveObject and is therefore clickable.
    Would this be a good idea?

  • Problem to MouseEvent Listener

    Hey
    Guys
    I have a problem for firing MouseEvent.MOUSE_OVER event.
    Here is the Case
    I have three layer
    first layer have circle_mc,and other
    second layer have big movie clip which have a border for the circle_mc, and other
    with instance name border_mc,
    and my code is here
    circle_mc.addEventListener(MouseEvent.CLICK, movieC);
    function movieC(evt:MouseEvent):void
    trace("MovieClip is Clicked);
    but it does not work,
    Please help me to solve this.
    thanks

    when i change the layer it works
    But i don't want to change the layer
    thanks

Maybe you are looking for

  • How to customize blob column text displayed in a report

    Hi All, I have a table with column File_name (varchar2) and file_content (blob). Report generated by the APEX allows me to show report with two different column File Name || File Content aaaa Download (link) bbbb Download (link) I would like to show

  • Using AND combined with OR conditions on filterclause

    We are writing a PRC portlet to return all documents based on a properties search.We have two properties (names are arbitrary) lets call them prop1 and prop2.I need to construct the following query Need all cards where ( (prop1=1 or prop1=2 or prop1=

  • Wifi slider is frozen and i need it on

    my wifi slider will not slide so that can have access to my wifi .

  • Kmail / Akonadi Problem, not sending mails

    Hello, Today I found my KMail unable to send e-mail, while receiving is fine. On clicking "Send", it just hangs, the e-mail is not going in "Outbox", nothing happens at all, and after a while alert box appears: There were problems trying to queue the

  • SAP PI Node

    Hi, My soruce xml is as following: I have to create this target structure: How can i make this? Thanks, Nurhan