Mouse clicking amd Dragging

Hi, I have the following code so far, and when run in conjunction with other classes it creates a carousel feature.
When you click and hold on the carousel and drag up or down, the carousel moves in the relevant direction.
I am trying to change this click and drag, so instead when you click one of the polygons (which represent up and down arrows), the carousel moves up or down depending on which you click.
Can anyone help with this?!
Thanks very much!
class ScheduleBarCanvas extends Canvas implements MouseListener,
MouseMotionListener, ActionListener
* CONSTANTS *
/** Width of a slot, in pixels. */
static final int SLOT_WIDTH = 2;
/** Width of an entire day schedule bar, in pixels. */
static final int BAR_WIDTH = Slot.SLOTS_PER_DAY * SLOT_WIDTH;
/** Half of the height of a day schedule bar, in pixels. */
static final int BAR_HALF_HEIGHT = 20;
/** The width of an hour within a day schedule bar, in pixels. */
static final double HOUR_WIDTH = BAR_WIDTH / 24;
* The schedule day bars are represented as a rotatable 'wheel'. This value
* defines the 'angle' allocated to a single day bar.
private static final float DEGREES_PER_DAY_BAR = 10;
* For convenience, this value represents the number of day bars that occupy
* a 90-degree 'slice' of the schedule wheel.
private static final int DAY_BARS_PER_90_DEGREES = (int) 9;
* The maximum number of day bars that can be represented in the wheel.
private static final int MAX_BARS = 9*2-1;
* FIELDS *
* Popup menu to use for right click menu. The right click menu allows users
* to perform actions such as changing the climate for a selected period of
* time.
private final JPopupMenu rightClickMenu = new JPopupMenu();
* Determines whether 'paste day schedule' is an available option in the
* right click menu. 'Paste day schedule' should remain unavailable until
* the user has copied a day schedule bar.
private boolean allowPaste = false;
* When the user has chosen to copy a day schedule, it will be stored here.
private DaySchedule copiedDaySchedule;
* A day schedule with the default period allocations.
private final DaySchedule defaultDaySchedule;
/** X coordinate of the left end of the schedule bars. */
private int barLeftX;
/** Y coordinate of centre of schedule bar display. */
private int centreY;
/** Width of canvas, pixels. */
private int width;
/** Height of canvas, pixels. */
private int height;
/** X coordinate of last mouse click. */
private int lastMouseClickPositionX = 0;
/** Y coordinate of last mouse click. */
private int lastMouseClickPositionY = 0;
/** X coordinate of last right mouse button click. */
private int lastRightClickPositionX = 0;
/** Y coordinate of last right mouse button click. */
private int lastRightClickPositionY = 0;
/** Start time of last selected period. */
private Slot periodStartTime = new Slot(0);
/** End time of last selected period. */
private Slot periodEndTime = new Slot(0);
/** Last-pressed mouse button. */
private int pressedButton;
* While clicking and dragging to modify the end time of a period, this
* field stores the 'old' end time of the period.
private int currentPeriodEnd;
* While clicking and dragging to modify the end time of a period, this
* field stores the width of the current period. At other times, this field
* has the value 0.
private int currentPeriodWidth = 0;
* Rather than directly manipulating the window's canvas, a buffer is used.
* All updates to the display are computed 'out of sight', by writing to
* this buffer's Graphics object (see 'graphicsBuffer') and then copied to
* the canvas in one go.
private Image imageBuffer;
private Image imageBuffer2;
/** Graphics object buffer to use when updating the display. */
private Graphics graphicsBuffer;
private double animationSpeed = 0;
private double simTimeInc;
private double simTime = 0; // simulated time, HOURS from start
/** Collection of days */
private Schedule schedule;
* The set of day schedule bars visible on screen at present. As the user
* scrolls through different days, schedule bars will come in and out of
* sight, and hence will enter and leave this array.
private DayBar[] visibleScheduleBars;
/** Stores the available schedulables */
private List<Schedulable> palette;
private int barZeroDay;
/** Currently highlighted period - not currently used */
private Period selection;
/** Previously highlighted selection - not currently used */
private Period oldSelection; // button 3 selections
private Period dayDrag; // button 1 drag region
private DaySchedule daySched; // schedule affected by drag
* When clicking and dragging to change the duration of a Period, this value
* is used to store the number of the slot being dragged.
* If this is a new Period, and hence no prior boundary existed, this value
* will be -1.
private int draggedSlotBoundary;
* When you right click on a Period, the system fills this value with the
* number of the first slot in that Period. For instance, if 13:00 to 16:00
* is set to 'away', and you right click at 14:40 (or any other slot inside
* the 'away' Period), then this value will be set to the index of the slot
* 13:00.
private int firstSlotNumber;
* When you right click on a Period, the system fills this value with the
* number of the last slot in that Period. For instance, if 13:00 to 16:00
* is set to 'away', and you right click at 14:40 (or any other slot inside
* the 'away' Period), then this value will be set to the index of the slot
* 16:00.
private int lastSlotNumber;
private DaySchedule selectedDaySchedule;
private boolean createPeriods = true;
* CONSTRUCTORS *
* Setting various schedules that can be displayed
* Initialises the display of the scheduler
* Setting right click menu
ScheduleBarCanvas()
int delay = 0; // milliseconds
int period = 40; // milliseconds
final double updateFreq = 1000.0 / period; // H
visibleScheduleBars = new DayBar[20];
palette = new ArrayList<Schedulable>();
palette.add(new Schedulable(new Color(50, 50, 220))); // away
palette.add(new Schedulable(new Color(100, 180, 160))); // sleep
palette.add(new Schedulable(new Color(150, 150, 120))); // busy
palette.add(new Schedulable(new Color(200, 100, 20))); // relax
defaultDaySchedule = new DaySchedule(palette);
schedule = new Schedule(palette);
Timer timer = new Timer();
// Inner class construction for a java.util.Timer object with a
// defined TimerTask to run processes. See the java.util library
// in the Java API for details. Also refer to other java utility
// assistance classes which may be useful to you in the future.
timer.schedule(new TimerTask()
public void run()
simTimeInc = getAnimationSpeed() / (updateFreq * 200.0);
if (simTimeInc > 0.0)
{ // Advance simulation time at
simTime += simTimeInc; // current rate
repaint(); // then update the display ASAP.
}, delay, period); // schedule's init delay & repeat-call period
JMenuItem menuItem1 = new JMenuItem(
"Set climate to 'Away'", new ImageIcon("away.png")),
menuItem2 = new JMenuItem(
"Set climate to 'Sleeping'", new ImageIcon("sleep.png")),
menuItem3 = new JMenuItem(
"Set climate to 'Relaxing'", new ImageIcon("relax.png")),
menuItem4 = new JMenuItem(
"Set climate to 'Busy'", new ImageIcon("busy.png")),
menuItem5 = new JMenuItem(
"Reset day schedule", new ImageIcon("refresh.png")),
menuItem6 = new JMenuItem(
"Copy day schedule", new ImageIcon("copy.png"));
menuItem1.addActionListener(this);
menuItem2.addActionListener(this);
menuItem3.addActionListener(this);
menuItem4.addActionListener(this);
menuItem5.addActionListener(this);
menuItem6.addActionListener(this);
rightClickMenu.add(menuItem2);
rightClickMenu.add(menuItem4);
rightClickMenu.add(menuItem1);
rightClickMenu.add(menuItem3);
rightClickMenu.add(menuItem5);
rightClickMenu.add(menuItem6);
addMouseListener(this);
addMouseMotionListener(this);
* GRAPHICS METHODS *
* Updates the GUI.
* @param g graphics object to draw to.
public void update(Graphics g)
// NB: repaint() above automatically calls update(Graphics g) ASAP.
paint(g);
* Updates the display.
* @param g canvas to draw on.
public void paint(Graphics g)
float carouselRadius = 100; // Carousel radius in pixels
float degreesPerPixel = (float) (57.29 / carouselRadius);
if (currentPeriodWidth != 0)
simTime += currentPeriodWidth * (degreesPerPixel / DEGREES_PER_DAY_BAR) * 24;
currentPeriodEnd += currentPeriodWidth;
currentPeriodWidth = 0;
barZeroDay = (int) simTime / 24; // treat 1 sim sec as 1 hour
int maxDayNo = barZeroDay + MAX_BARS;
if (barZeroDay < 0 || maxDayNo >= Schedule.N_SCHEDULES)
return; // invalid day number; do nothing
Dimension dim = getSize();
int maxX = dim.width - 1, maxY = dim.height - 1;
barLeftX = maxX / 7;
centreY = maxY / 2;
if (width != dim.width || height != dim.height)
width = dim.width;
height = dim.height;
imageBuffer = createImage(width, height);
graphicsBuffer = imageBuffer.getGraphics();
graphicsBuffer.clearRect(0, 0, width, height);
graphicsBuffer.setColor(new Color(0, 0, 0));
int hour = (int) simTime - barZeroDay * 24;
float dayZeroOffsetAngle = (float) (((hour - 12) / 24.0) * DEGREES_PER_DAY_BAR);
for (int barNo = 0; barNo <= MAX_BARS; barNo++)
int dayNo = barZeroDay + barNo;
int daysEarlier = DAY_BARS_PER_90_DEGREES - barNo;
float dayAngle = daysEarlier * DEGREES_PER_DAY_BAR
+ dayZeroOffsetAngle;
float z = carouselRadius * (float) Math.cos(0);
float y = carouselRadius * (float) Math.sin(dayAngle / 57.3);
float x = z / 20;
DayBar dayBar = new DayBar(dayNo, schedule.getDaySchedule(dayNo),
graphicsBuffer, barLeftX, centreY, x, y);
visibleScheduleBars[barNo] = dayBar;
for (int barNo = 0; barNo <= MAX_BARS; barNo++)
visibleScheduleBars[barNo].paintBar(oldSelection, selection);
g.drawImage(imageBuffer, 20, 0, null);
g.setColor(Color.WHITE);
g.drawRect(40,25,375,50);
g.fillRect(40,25,375,50);
g.drawRect(40,205,375,65);
g.fillRect(40,205,375,65);
Point bigArrowPoint1 = new Point(0,0);
Point bigArrowPoint2 = new Point(0,0);
Point bigArrowPoint3 = new Point(0,0);
Point smallArrowPoint1 = new Point(0,0);
Point smallArrowPoint2 = new Point(0,0);
Point smallArrowPoint3 = new Point(0,0);
bigArrowPoint1 = new Point(100,100); //top left
bigArrowPoint2 = new Point(100,100); //middle right
bigArrowPoint3 = new Point(100,100); //bottom left
smallArrowPoint1 = new Point(100,100); //top left
smallArrowPoint2 = new Point(100,100); //middle right
smallArrowPoint3 = new Point(100,100); //bottom left
Polygon bigArrow = new Polygon();
bigArrow.addPoint(bigArrowPoint1.x+310,bigArrowPoint1.y-25);
bigArrow.addPoint(bigArrowPoint2.x+320,bigArrowPoint2.y-25);
bigArrow.addPoint(bigArrowPoint3.x+315,bigArrowPoint3.y-30);
Polygon smallArrow = new Polygon();
smallArrow.addPoint(smallArrowPoint1.x+310,smallArrowPoint1.y+105);
smallArrow.addPoint(smallArrowPoint2.x+320,smallArrowPoint2.y+105);
smallArrow.addPoint(smallArrowPoint3.x+315,smallArrowPoint3.y+110);
g.setColor(Color.black);
g.fillPolygon(bigArrow);
g.drawPolygon(bigArrow);
g.setColor(Color.black);
g.fillPolygon(smallArrow);
g.drawPolygon(smallArrow);
addMouseListener(this);
addMouseMotionListener(this);
* Sets a new percentage value for the animation speed of the application.
* @param animationSpeed desired animation speed.
void setAnimationSpeed(double animationSpeed)
this.animationSpeed = animationSpeed;
* Returns the current speed of the animation, as a percentage.
* @return the current speed of the animation, as a percentage.
private double getAnimationSpeed()
return animationSpeed;
* Finds and returns a slot based upon the specified mouse position
* coordinates.
* @param x x coordinate of selection, relative to centre-left of schedule
* bar display.
* @param y y coordinate of selection, relative to centre-left of schedule
* bar display.
* @return a Slot value corresponding to the selected slot if available. If
* no slot was selected, null is returned.
private Slot findSlot(int x, int y)
int barNumber = findDayBarNumber(x, y);
if (barNumber == -1)
return null;
int foo = (x - (int) visibleScheduleBars[barNumber].getLeftAngleX());
int bar = (barNumber * Slot.SLOTS_PER_DAY + foo / SLOT_WIDTH);
return new Slot(bar + barZeroDay * Slot.SLOTS_PER_DAY);
* Finds the day bar specified by the provided mouse coordinates, and then
* returns its number.
* @param x x coordinate of mouse position.
* @param y y coordinate of mouse position.
* @return the number of the day bar, or -1 if no day bar was found at the
* specified mouse coordinates.
private int findDayBarNumber(int x, int y)
for (int barNo = MAX_BARS - 1; barNo >= 0; barNo--)
DayBar dayBar = visibleScheduleBars[barNo];
if (x >= dayBar.getLeftAngleX() && x <= dayBar.getBarRightAngleX()
&& y >= dayBar.getBarBottomAngleY()
&& y <= dayBar.getBarTopAngleY())
return barNo;
return -1;
* EVENT HANDLER METHODS *
* This event handler is unused.
* @param evt ignored.
public void mouseClicked(MouseEvent evt)
* This event handler is unused.
* @param evt ignored.
public void mouseExited(MouseEvent evt)
* This event handler is unused.
* @param evt ignored.
public void mouseEntered(MouseEvent evt)
* This event handler is unused.
* @param evt ignored.
public void mouseMoved(MouseEvent evt)
* Called when the mouse button is released.
* 1. Displays the right click menu if the right mouse button was clicked 2.
* Updates 'last click position' fields 3. Modifies end time of current
* selection
* @param evt mouse event information.
public void mouseReleased(MouseEvent evt)
if (evt.isPopupTrigger()) // was the menu requested?
displayRightClickMenu(evt);
// Update 'last click position' fields
lastMouseClickPositionX = evt.getX();
lastMouseClickPositionY = evt.getY();
if (pressedButton == MouseEvent.BUTTON3)
{ // selecting
int barPositionX = lastMouseClickPositionX - barLeftX;
int barPositionY = centreY - lastMouseClickPositionY;
periodEndTime = findSlot(barPositionX, barPositionY);
selection.setEnd(periodEndTime);
* Called when mouse button is pressed. Updates slot with schedulable.
* @param evt mouse event information.
public void mousePressed(MouseEvent evt)
if (evt.isPopupTrigger()) // was the menu requested?
displayRightClickMenu(evt);
lastMouseClickPositionX = evt.getX();
int barPositionX = lastMouseClickPositionX - barLeftX;
lastMouseClickPositionY = evt.getY();
int barPositionY = centreY - lastMouseClickPositionY;
periodStartTime = findSlot(barPositionX, barPositionY);
if (periodStartTime == null)
return;
if (periodStartTime.getDayNumber() < 0
|| periodStartTime.getDayNumber() >= Schedule.N_SCHEDULES)
return; // boundary case.
pressedButton = evt.getButton(); // 1=left, 2=mid or wheel 3= right
if (pressedButton == MouseEvent.BUTTON1)
{ // dragging
// but maybe creating new selection too so...
oldSelection = selection;
currentPeriodEnd = barPositionY;
currentPeriodWidth = 0;
dayDrag = new Period(periodStartTime, periodStartTime);
int s = periodStartTime.getSlotNumber();
if (!createPeriods)
return;
daySched = schedule.getDaySchedule(periodStartTime.getDayNumber());
draggedSlotBoundary = daySched.findNearBoundary(s, 3);
if (draggedSlotBoundary < 0)
if (s < 0 || s >= Slot.SLOTS_PER_DAY)
return; // boundary case
// Not near a boundary, so create seed slot for new
// period
if (daySched.getSlot(s) == palette.get(0))
daySched.setSlot(s, palette.get(1));
else
daySched.setSlot(s, palette.get(0));
draggedSlotBoundary = s;
} else
Schedulable SS = daySched.getSlot(draggedSlotBoundary);
if (draggedSlotBoundary < s)
daySched.insert(SS, draggedSlotBoundary, s);
else
daySched.insert(SS, s, draggedSlotBoundary);
else if (pressedButton == MouseEvent.BUTTON3)
{ // selecting
oldSelection = selection;
periodStartTime = findSlot(barPositionX, barPositionY);
selection = new Period(periodStartTime, periodStartTime);
* Called when the mouse is moved while a button on it is held down.
* Changes the end time of the selected Period.
* @param evt information about the current mouse cursor state, e.g.
* position.
public void mouseDragged(MouseEvent evt)
lastMouseClickPositionX = evt.getX();
int barPositionX = lastMouseClickPositionX - barLeftX;
lastMouseClickPositionY = evt.getY();
int barPositionY = centreY - lastMouseClickPositionY;
if (pressedButton == MouseEvent.BUTTON1)
{ // dragging
Slot selectedSlot = findSlot(barPositionX, barPositionY);
currentPeriodWidth = barPositionY - currentPeriodEnd;
if (draggedSlotBoundary < 0 || selectedSlot == null)
return; // out of bounds
if (!createPeriods)
return;
for (int s = draggedSlotBoundary + 1; s < selectedSlot.getSlotNumber(); s++)
daySched.setSlot(s, daySched.getSlot(draggedSlotBoundary));
dayDrag.setEnd(selectedSlot); // or could use Selection instead
if (pressedButton == MouseEvent.BUTTON3)
{ // selecting
Slot selectedSlot = findSlot(barPositionX, barPositionY);
selection.setEnd(selectedSlot);
* Displays the right click menu.
* @param evt information about the current mouse cursor state, e.g.
* position.
private void displayRightClickMenu(MouseEvent evt)
// Calculate positions of mouse click relative to centre-left of
// schedule bars display.
lastRightClickPositionX = evt.getX() - barLeftX;
lastRightClickPositionY = centreY - evt.getY();
// identify bar to modify
DayBar db = null;
for (int barNo = MAX_BARS - 1; barNo >= 0; barNo--)
DayBar currentBar = visibleScheduleBars[barNo];
if (lastRightClickPositionX >= currentBar.getLeftAngleX()
&& lastRightClickPositionX <= currentBar.getBarRightAngleX()
&& lastRightClickPositionY >= currentBar.getBarBottomAngleY()
&& lastRightClickPositionY <= currentBar.getBarTopAngleY())
db = currentBar;
break;
if (db == null)
return;
// identify 'selected' section/setting
Slot t = findSlot(lastRightClickPositionX, lastRightClickPositionY);
int slot = t.getSlotNumber();
if (slot < 0)
return; // out of bounds
// find out colour of selected section
selectedDaySchedule = db.getDaySchedule();
Color colour = selectedDaySchedule.getSlot(slot).colour;
// go left/back; find earliest section with this colour
firstSlotNumber = slot;
while (true)
Color currentSlotColour = selectedDaySchedule
.getSlot(firstSlotNumber).colour;
if (!currentSlotColour.equals(colour))
firstSlotNumber++;
break;
if (firstSlotNumber > 0) // lower boundary case
firstSlotNumber--;
else
break;
// go right/forwards; find latest section with this colour
lastSlotNumber = slot;
while (true)
Color currentSlotColour = selectedDaySchedule
.getSlot(lastSlotNumber).colour;
if (!currentSlotColour.equals(colour))
break;
if (lastSlotNumber < Slot.SLOTS_PER_DAY - 1) // upper bound case
lastSlotNumber++;
else
break;
rightClickMenu.show(evt.getComponent(), evt.getX(), evt.getY());
* Called when the user selects an item from the right click menu. Changes
* the Schedulable for the selected Period to the requested value.
* @param evt an ActionEvent, providing information about the command that
* was selected from the menu.
public void actionPerformed(ActionEvent evt)
String command = evt.getActionCommand();
if (command.equals("Copy day schedule"))
if (!allowPaste) {
* If the user copies a day schedule, we must enable
* the paste option in the menu.
JMenuItem menuItem7 = new JMenuItem("Paste day schedule",
new ImageIcon("paste.png"));
menuItem7.addActionListener(this);
rightClickMenu.add(menuItem7);
allowPaste = true; // only do this once
int barNo = findDayBarNumber(
lastRightClickPositionX, lastRightClickPositionY);
DayBar db = visibleScheduleBars[barNo];
/* It's important that we copy the day schedule by value, not by
* reference. If we just copy a reference, then if we 'copy' a bar,
* changing the source bar after the copy operation will change what
* is ultimately 'pasted'.
copiedDaySchedule = db.getDaySchedule().clone();
else if (command.equals("Paste day schedule"))
int barNo = findDayBarNumber(
lastRightClickPositionX, lastRightClickPositionY);
DayBar db = visibleScheduleBars[barNo];
db.getDaySchedule().insert(
copiedDaySchedule, 0, Slot.SLOTS_PER_DAY-1);
else if (command.equals("Reset day schedule"))
int barNo = findDayBarNumber(
lastRightClickPositionX, lastRightClickPositionY);
DayBar db = visibleScheduleBars[barNo];
db.getDaySchedule().insert(
defaultDaySchedule, 0, Slot.SLOTS_PER_DAY-1);
else
* Identifies which new Schedulable was requested. This Schedulable
* will replace the selected Period's Schedulable value.
* For instance, if "Away" was selected from the menu, then we must
* fetch the "Away" Schedulable.
Schedulable schedulable;
if (evt.getActionCommand().equals("Set climate to 'Away'"))
schedulable = palette.get(2); // the 'away' Schedulable
else if (evt.getActionCommand().equals("Set climate to 'Sleeping'"))
schedulable = palette.get(0); // the 'sleeping' Schedulable
else if (evt.getActionCommand().equals("Set climate to 'Busy'"))
schedulable = palette.get(1);
else if (evt.getActionCommand().equals("Set climate to 'Relaxing'"))
schedulable = palette.get(3);
else
// Should never occur
throw new Error("Unrecognised command.");
// Now fill the selected Period with the requested Schedulable.
selectedDaySchedule.insert(
schedulable, firstSlotNumber, lastSlotNumber);
* User is able to edit schedule when boolean is set to true
* @param createPeriods sets state of interaction with day schedules
void setCreatePeriods(boolean createPeriods) {
this.createPeriods = createPeriods;
}

Here is the Apple document covering Magic Mouse faults.  Symptom number 6 seems the one to check out.  Is this a longstanding or a recently developed fault?
And, of course, is it still under the 12 month warranty.
One thing to pay particular attention to is the proximity of electronic items such as cradles for phones and the like which if active, can interfere with the signal.
Troubleshooting wireless mouse and keyboard issues

Similar Messages

  • Scripting a mouse click and drag

    does anyone know how to script a mouse click and drag. I tried XTools. No luck. What about Cliclick. I had tons of success with TextCommands but I dont know how to get OSAX plugin code to work. Thanks in advance.
    I am trying to move a desktop clock (QuartzClock) from the center of the screen to the side.

    I tried (unsuccessfully) to find a mouse move and click solution in Applescript.
    My search brought me to this site: http://www.geekorgy.com/index.php/2010/06/python-mouse-click-and-move-mouse-in-a pple-mac-osx-snow-leopard-10-6-x/
    The following python script will move an object from position 60.100 to 60.300
    #!/usr/bin/python
    import sys
    import time
    from Quartz.CoreGraphics import * # imports all of the top-level symbols in the module
    def mouseEvent(type, posx, posy):
    theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
    CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
    mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclickdn(posx,posy):
    mouseEvent(kCGEventLeftMouseDown, posx,posy);
    def mouseclickup(posx,posy):
    mouseEvent(kCGEventLeftMouseUp, posx,posy);
    def mousedrag(posx,posy):
    mouseEvent(kCGEventLeftMouseDragged, posx,posy);
    ourEvent = CGEventCreate(None);
    currentpos=CGEventGetLocation(ourEvent); # Save current mouse position
    mouseclickdn(60, 100);
    mousedrag(60, 300);
    mouseclickup(60, 300);
    time.sleep(1);
    mousemove(int(currentpos.x),int(currentpos.y)); # Restore mouse position
    See also:
    http://developer.apple.com/mac/library/documentation/Carbon/Reference/QuartzEven tServicesRef/Reference/reference.html
    http://developer.apple.com/graphicsimaging/pythonandquartz.html
    Tony

  • Mouse click and drag through turntable animation

    Hi all,
    First - thanks for taking the time to look through and possibly helping me with this question.
    I'm just getting to grips with flash cc actionscript 3.0 - so I apologise in advance to my not so technical jargon.
    In the past I have used actionscript 1.0 to create an interactive html file that contains a turntable animation of a 3D model. Users can mouse click and drag to the left or right to 'spin' the model around - however what they are really doing is scrubing through the timeline which contained 360 images of it from 360 degrees. Similar ideas can be found here: Interactive Thyroidectomy
    Now annoying I can't use the old code any more as I'm working in the latest flash cc actionscript 3.0
    So how do I do the same thing but in actionscript 3.0?
    So I've worked this bit out so far
    On my main stage I have two layers - actions layer and another layer with my movie clip (movieclip_mc)
    In the actions layer so far:
    movieclip_mc.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
    movieclip_mc.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
    function onMouseDown(event:MouseEvent):void
      movieclip_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
      //I should put something in here about mouseX  - but no idea what
    function onMouseUp(event:MouseEvent):void
      movieclip_mc.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
    function onMouseMove(event:MouseEvent):void
    //I have to put something in about total frames - width of movieclip_mc etc but I'm not sure how   
    // this is what someone else did on another forum - but I'm not sure what it means:
         var delta:int = backgroundClip.mouseX - clickedMouseX;
       var wantedFrame:uint = (clickedFrame + delta * clip.totalFrames / backgroundClip.width) % clip.totalFrames;
       while (wantedFrame < 1)
      wantedFrame += clip.totalFrames;
      clip.gotoAndStop(wantedFrame);
    Also I think i need something in the beginning like.....:
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    var clickedMouseX:int;
    var clickedFrame:uint;
    var backgroundClip:Sprite = getChildByName("background") as Sprite;
    var clip:MovieClip = getChildByName("animation") as MovieClip;
    clip.stop();
    clip.mouseEnabled = false;
    .....but I'm a bit confused about what all of it means
    So I understand the principle but no idea how to actually make it work - Could anyone help explain it to me or help with the code?
    Thanks so much to anyone who can offer some help
    Catherine

    Hi Ned,
    sorry to bother you again on this subject -
    the script...
    function onMouseMove(event:MouseEvent): void {
      movieclip.gotoAndStop(Math.round(mouseX/movieclip.width*(movieclip.totalFrames-1))+1 )
    worked fine - but when you click and drag on the movie clip it didn't always get to the end of the movie and never carried on through the frames back to the beginning like i wanted it to (such as this one does Interactive Thyroidectomy)
    So I went back to the older 2.0 script and played with it a bit to be :
    function onMouseMove(event:MouseEvent): void {
      changeDistance = movieclip.mouseX - startX;
      travelDistance = startFrame + changeDistance;
      if (travelDistance > movieclip.totalFrames) {
      movieclip.gotoAndStop (travelDistance % movieclip.totalFrames);
      } else if (travelDistance < 0) {
      movieclip.gotoAndStop (movieclip.totalFrames + (travelDistance % movieclip.totalFrames));
      } else {
      movieclip.gotoAndStop (travelDistance);
    .... which almost works but it is very stuttery to mouse over and then it has this output error..
    mouseDown
    ArgumentError: Error #2109: Frame label 2.3500000000000227 not found in scene 2.3500000000000227.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 3.6499999999999773 not found in scene 3.6499999999999773.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 4.949999999999989 not found in scene 4.949999999999989.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 6.25 not found in scene 6.25.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 7.600000000000023 not found in scene 7.600000000000023.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 8.899999999999977 not found in scene 8.899999999999977.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 11.5 not found in scene 11.5.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 12.850000000000023 not found in scene 12.850000000000023.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 14.149999999999977 not found in scene 14.149999999999977.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 15.449999999999989 not found in scene 15.449999999999989.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    ArgumentError: Error #2109: Frame label 16.75 not found in scene 16.75.
      at flash.display::MovieClip/gotoAndStop()
      at flashdoc_fla::MainTimeline/onMouseMove()
    mouseUp
    I've obviously put some code in the wrong place - could you help me find out what it might be?
    I haven't labelled any frames odd numbers such as 15.4499999999999989 or labeled scenes than number either.
    I can send you my scene if that would help?
    Thanks very much for your time Ned
    (p.s Or maybe if it is easier you might offer some guidance as to how i can change the action script
    function onMouseMove(event:MouseEvent): void {
      movieclip.gotoAndStop(Math.round(mouseX/movieclip.width*(movieclip.totalFrames-1))+1 )
    to allow it to be more like Interactive Thyroidectomy

  • Hello  Simple problem - don,t know how to solve it.  With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was de

    Hello
    Simple problem - don,t know how to solve it.
    With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was defective and went to get a new Magic Mouse after lots of frustration. Today, I have an edit to do it it does the SAME thing !!
    I was like ????#$%?&*(???
    Opened all the lights and taught I've trow the new mouse to the garbage and was using the defective mouse again... no !! - ??
    Actually, the bran new mouse is doing the same thing. What I understand after investigating on the motion and watching carefully my fingers !! -  is that when I click I have to keep my finger at the EXACT same place on the mouse... drag and release and it's fine. If I click by pushing on the mouse and my finder is moving of a 1/32th of a millimeter, it will release and my selection will be to redo. You can understand my frustration ! - 75$ later... same problem, but I know that if I click with about 5 pounds of pressure and trying to pass my finger through the plastic of the mouse, it you stay steady and make it !
    The problem is that scrolling is enable while clicking and it bugs.
    How to disable it ??
    Simple question - can't find the answer !

    Helllooo !?
    sorry but the Magic Mouse is just useless with the new Adobe Premiere CC and since I'm not the only one but can't find answer this is really disappointing. This mouse is just fantastic and now I have to swap from a USB mouse to the Magic Mouse every times I do some editing. My USB mouse if hurting my hand somehow and I want to got back to the Magic Mouse asap. Please - for sure there is a simple solution !
    Thanks !!

  • Cannot click and drag with bluetooth mouse?

    I have installed bluetooth mouse and works fine but cannot click and drag using the mouse in any applications. will highlight stuff and cursor moves fine but then cannot drag using the mouse. Any ideas?

    I was trying with this code which I got from this website as I am beginner of AS3.
    var images:MovieClip = images_mc;
    var offsetFrame:int = images.currentFrame;
    var offsetX:Number = 0;
    var offsetY:Number = 0;
    var percent:Number = 0;
    images.addEventListener(MouseEvent.MOUSE_DOWN,startDragging);
    images.addEventListener(MouseEvent.MOUSE_UP,stopDragging);
    function startDragging(e:MouseEvent):void
    images.addEventListener(MouseEvent.MOUSE_MOVE,drag);
    offsetX = e.stageX;
    offsetY = e.stageY;
    function stopDragging(e:MouseEvent):void
    images.removeEventListener(MouseEvent.MOUSE_MOVE,drag);
    offsetFrame = images.currentFrame;
    function drag(e:MouseEvent):void
    percent =  (e.stageX - offsetX)/images.width;
    percent =  (e.stageY - offsetY)/images.height;
    var frame:int = Math.round(percent*images.totalFrames) + offsetFrame +1;
    while (frame>images.totalFrames)
      frame -=  images.totalFrames;
    while (frame<=0)
      frame +=  images.totalFrames;
    images.gotoAndStop(frame);
    This has to rotate in top also i.e., I also have images sequence placed with top view also.
    If I use keyboard, it has to work with arrow keys also and also with mouse interactivity.

  • Mouse not clicking and dragging

    My mouse pointer responds well to moving around the screen and double ckicking etc. However when I try to click and drag it 'loses' the object (file name or card in Freecell) or will not select all that I shift& drag. All the drivers are up to date. I have removed, waited and then replaced the Bluetooth USB fitting in the back of the computer and the batteries are fresh. Any Ideas?
    HP TouchSmart 520-1010ukH
    Microsoft mouse model MG-0982
    Windows 7
    This question was solved.
    View Solution.

    Hello again @itsmagicvi,
    If you have tried a different mouse on your computer and it is not happening to that mouse I suspect that your Microsoft Mouse is the problem and suggest you contact Microsoft on their forums at Microsoft Community as they may have addressed this issue with their hardware before.
    I hope I have answered your question to your satisfaction. Thank you for posting on the HP Forums. Have a great day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

  • Mouse will not perform click and drag

    My Magic Mouse will not perform click-and-drag function anymore after Mavericks.

    Problem solved thanks to Eric Cote:
    https://discussions.apple.com/message/15696875#15696875:
    "you may want to trash your preference files under:
    Users/<your user name>/Library/Preferences/com.apple.driver.AppleHIDMouse.plist
    then reset the mouse prefs"
    Thank you Eric!

  • Automator - How do I: Mouse Click, Move Windows, and more

    Hello,
    I am attempting to create my own Automator programs and for a while I had some that worked nicely. I have recently been tweaking my iMac so that it can "think" on its own (by automator of course) and do things for me. However, I've run across a block with Mavericks (I believe it's due to Mavericks).
    1. How can I get Automator to register a mouse click? "Watch me do" does not seem to want to work for me at all. I also would prefer if it would just be a registered mouse click, but not actually use the mouse (I know this is possible) so that if I'm doing something and it runs, it won't disturb my mouse and I can keep working.
    2. How can I register a keyboard stroke? Same as above
    3. How can I have automator move windows? I have two monitors and there are times when I may want it to move a window from one mintor to another
    The following is a list of all the things I'm attempting to accomplish at the moment (with other things when I think of them) with automator (either through applications, folder actions, or ical actions):
    1. Register a mouse click at a given area or on a given element in a safari page
    2. Register a keyboard stroke in a given program (be able to focus on a program and then do the keystroke)
    3. Move windows from one location to another
    4. Full-screen and Un-full-screen iTunes at certain times of day
    5. Download all purchased items on iTunes that aren't on the computer (sometimes iTunes doesn't download stuff if it was downloaded on my MacBook Pro first)
    6. Automatically voice read reminders (that I've set in Reminders) each day at a given time (I can use loop to repeat it to make sure I hear it all)
    I'll think of more of course, but the mouse click, keyboard stroke, and moving windows is the big thing I'm trying to figure out how to do. Can anyone help?
    Also, I am not a computer tech. I am tinkering with this because it's fun and helpful, but an answer of "just use applescript" or "just use java" will likely just give me a headache. I know that it's going to be one of those codes, but I'm hoping someone has a "base" code that can be copied and pasted that's just a standard click that I can adjust for where I need to click and what process I need to click on.
    If there is an Action Pack that includes a "Register Mouse Click" and/or "Register Keyboard Stroke", then that would work great, but the only action packs for automator I've seen that work with Mavericks is for photoshop.

    You're asking for a lot in one post.  It would be better to break your requests down a bit. 
    For example, to deal with mouse clicks, you can use the Automator Action Run Shell Script with this python script:
    import sys
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
            theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
            CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
            mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclick(posx,posy):
            mouseEvent(kCGEventLeftMouseDown, posx,posy);
            mouseEvent(kCGEventLeftMouseUp, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # Click the "Apple"
    mouseclick(25, 5);  
    # 1 second delay       
    time.sleep(1);        
    # Restore mouse position
    mousemove(int(currentpos.x),int(currentpos.y))
    It will look like this in Automator:
    To drag something (i.e. a window, a file icon) from position 40,60 to 60,300:
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
               theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
               CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
               mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclickdn(posx,posy):
               mouseEvent(kCGEventLeftMouseDown, posx,posy);
    def mouseclickup(posx,posy):
               mouseEvent(kCGEventLeftMouseUp, posx,posy);
    def mousedrag(posx,posy):
               mouseEvent(kCGEventLeftMouseDragged, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # move mouse to upper left of screen
    mouseclickdn(40, 60);
    # drag icon to new location
    mousedrag(60, 300);
    # release mouse
    mouseclickup(60, 300);
    # necessary delay
    time.sleep(1);
    # return mouse to start positon
    mouseclickdn(int(currentpos.x),int(currentpos.y));
    For keystokes in AppleScript (which can be added to Automator with the Run Applescript Action) see: http://dougscripts.com/itunes/itinfo/keycodes.php

  • Click and Drag feature to resize brush in PS 5

    Besides using the bracket keys to resize brushes, you are supposed to be able to hold down the Alt and Control key to drag sideways to make a brush larger or up and down to make it softer. This is on Windows.
    For some reason, when I do this command, my cursor changes to moving a selection and leaving a copy.
    When I hold down just the Alt key, I get the eye dropper tool and when I hold down just the Control Key, I get the move - four way arrow.
    I must have changed something in the keyboard shortcuts, but I don't see the option to change that command back. My Brush Resize shortcuts still work the the two bracket keys.
    Any help would be appreciated.
    M. Jackson

    Okay. I wasn't using the right mouse click as directed.
    http://adobephotoshopsecrets.blogspot.com/2012/01/dynamically-resize-brush-in-photoshop.ht ml
    It seems to work fine with just the Alt-Right Mouse drag and no need for the Control key?
    I was trying to program my Art Pen to use the commands on the front toggle button.
    Thanks to all.
    M. Jackson

  • Mouse Clicks/Positons in Pictures!

    Even a guru learns new things...
    I just discovered the use of a picture control/indicator to detect mouse positions and clicks! What a wonderful thing. I have LabVIEW 6.0.2, and have, up to now, not known about this. To all those out there who I recommended to use the mouse click API for Windows, I apologize. This is such a marvelous way to get Mouse information. It's easy, efficient, and completely held within LabVIEW.
    If anyone is wondering what I am talking about, go to Help>Examples in LabVIEW and go to the Examples>Advanced Examples>Picture Control Examples>Mouse Control.vi to see what I mean. I didn't realize that if you dropped a picture control (even as an invisible object!) on the front panel that you could use prop
    erty nodes to get x and y positions, and also the left, right, shift left or right, and third mouse button click information.
    Of course, I hear that this may all be somewhat obsolete in LabVIEW 6.1, but for those still using 6.01 or earlier, it's a great tool that means you don't have to mess with API, MFC or dlls.
    Any comments or questions?

    Hi,
    This is ideal for some applications, you can even build drag/drop functions
    into a picture control using this. But there are some backdraws (or one very
    big one);
    The picture control needs to be the control on front.
    The picture control needs to cover the entire area you need information on.
    This implies that normal functions of controls and indicators cannot be
    used, not even simply clicking on a button...
    It also makes the screen updates take a lot more proccessor time, because
    controls/indicators are overlapping. In the example for instance, the charts
    are not clear to read, because they're flickering.
    Regards,
    Wiebe.
    "Labviewguru" wrote in message
    news:[email protected]..
    > Even a guru learns new things..
    >
    > I just discovered the use of a picture control/indicator to detect
    > mouse positions and clicks! What a wonderful thing. I have LabVIEW
    > 6.0.2, and have, up to now, not known about this. To all those out
    > there who I recommended to use the mouse click API for Windows, I
    > apologize. This is such a marvelous way to get Mouse information.
    > It's easy, efficient, and completely held within LabVIEW.
    >
    > If anyone is wondering what I am talking about, go to Help>Examples in
    > LabVIEW and go to the Examples>Advanced Examples>Picture Control
    > Examples>Mouse Control.vi to see what I mean. I didn't realize that
    > if you dropped a picture control (even as an invisible object!) on the
    > front panel that you could use property nodes to get x and y
    > positions, and also the left, right, shift left or right, and third
    > mouse button click information.
    >
    > Of course, I hear that this may all be somewhat obsolete in LabVIEW
    > 6.1, but for those still using 6.01 or earlier, it's a great t
    ool that
    > means you don't have to mess with API, MFC or dlls.
    >
    > Any comments or questions?

  • Mouse clicks retina

    Since upgrading to the latest 10.8.2 update, left mouse clicks via the track pad or usb mouse and the mouses position on screen are not recognized. to remedy the issue, I often have to open and close the laptop's display multiple times before the computer recogized position or left clicks. Right clicks are always recognized.
    I do many presentations using my machine - this is super frustrating!
    In addition, sometimes the mouse click will get stuck in the down position - regardless of mouse device plugged in.
    So I unable to release objects that are being drag'n dropped. Browser windows especially.

    I'm assuming you have already rebooted the unit at some point and tested. If you have then I would also look at resetting the SMC and testing again. If there is still a problem then I would test in a new user on the Mac and see if the issue ocurrs there also.
    If it does then boot to your Recovery Partition and test it there. If none of this makes any difference then you may have to look at reinstalling the OS to see if that makes a change. It sounds HW based right now but it could quite conceivably be SW related as the issue only started after an update.
    If you do end up reinstalling the OS then test it right away in 10.8 and make sure everything is fine. If it is then you could go online and manually download 10.8.1 and make sure it's fine there also. If it is again then I would possible avoid 10.8.2 as it would appear at that point that it was the cause of the issue.
    If you do all of the above and even after the reinstall there is a problem then you would need to try erasing the HD and reinstalling. If after that there is still an issue then it is a HW problem and you will need to take the Mac into an Apple Store or Service Provider to get it serviced.
    Regards,

  • How can I code for a click and drag to progress forward/backward in timeline

    I'm working on a project, the goal is to have a .swf animation like this.
    The functionality I'm looking for is:
    1. I need my animation to make one full rotation and stop,
    and then
    2. I need to fix my AS3 so you have to CLICK/HOLD/DRAG to progress forward and backward through the timeline, but only when your holding the mouse button down.
    Currently the code progresses the frame forward and backward in relation to the mouseX position.
    Here is my current code:
    import flash.events.MouseEvent;
    var startPosition:Number=mouseX;
    var delayTime=10;
    gotoAndStop(1);
    stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouse);
    function onMouse(e:MouseEvent):void{
        stage.removeEventListener(MouseEvent.MOUSE_MOVE,onMouse);
        var currentPosition:Number=mouseX;
        if(mouseX-startPosition<=0){
            nextFrame();
        }else{
            prevFrame();
        setTimeout(setListener, delayTime);
    function setListener(){
        startPosition=mouseX;
    stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouse);
    any help would be appreciated,
    Thanks.

    Found a thread much like this one that solved all my problems
    Here the link to anyone who might be pulling their hair out trying to figure this out in the future
    http://forums.adobe.com/thread/570903?tstart=0
    Thanks Adobe Forums

  • The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?

    I have recently switched from a PC to a MacBook Pro.
    I have a large number of documents and photographs on a multiterrabite external drive, backed up on a second multiterrabite external drive.
    Both external drives are formatted for MacIntosh. This has been verified by agents at an Apple store and also at Best Buy in two different cities.
    This is the problem:
    The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?
    Also, the MacBook Pro will not allow me to rename multiple documents or photographs. I can click-and-rename a single one, but this is impossibly time consuming. I can batch-rename in iPhoto, but when I transfer the photographs to the external drive, the rename does not transfer.
    I’m reduced to using my wife’s Toshiba to cut-and-past, rename, and transfer documents. It works perfectly. Is there any way to do this on the MacBook Pro?
    Thanks!
    Roderick Guerry
    [email protected]

    Roderick Guerry wrote:
    The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?
    No, this is a philosophical difference between Apple and Microsoft. Apple believes that it's dangerous to cut a file in case the user never pastes it; in that case the file is lost. Microsoft seems to not have this problem (if I remember Windows correctly) because they don't delete the originating file if it's cut but never pasted.
    Even though Macs have a lot of keyboard shortcuts, philosophically Macs have traditionally been mouse-first. This applies to file copy operations. In your case, what a Mac user would do is open the source window, open the destination window (on your second drive), and then Command-drag the selected files from the source to destination window. This is because a normal drag would leave the originals behind, while adding the Command modifier key tells OS X that this is a Move, not a Copy, so don't leave the originals behind.
    (In addition there are different rules for drag-copying within the same volume or between different volumes. If you drag between two folders on the same volume, the files are moved. If you drag between different volumes, the files are copied unless you hold down Command to delete the copies on the source volume.)
    Roderick Guerry wrote:
    Also, the MacBook Pro will not allow me to rename multiple documents or photographs. I can click-and-rename a single one, but this is impossibly time consuming. I can batch-rename in iPhoto, but when I transfer the photographs to the external drive, the rename does not transfer.
    Two problems in this case. First, batch file renaming is not built into OS X unless you build something with Automator. However, there are many utilities that can do batch file renaming which you can find at macupdate.com or on the App Store. Since I work with media I often batch rename using one of the media managers I have lying around like Media Pro or Adobe Bridge (comes with Photoshop).
    iPhoto is a database front end designed to shield the file system from the consumer and let them concentrate on creativity and sharing. As such it is often a poor choice for managing files directly. When you "transferred the photographs" chances are you moved the originals, not the ones iPhoto edited which are stored in a hidden folder.
    Roderick Guerry wrote:
    I’m reduced to using my wife’s Toshiba to cut-and-past, rename, and transfer documents. It works perfectly. Is there any way to do this on the MacBook Pro?
    There will not be a way to do it exactly like Windows. As described above, there are ways to do it "the Mac way." If it is possible to remove judgment on which way is "better" you might find the Mac way to be acceptable, but of course sometimes we simply prefer what we're used to.

  • Mail does not respond to mouse clicks properly

    This bug in Mail started in Lion, and has continued (or possibly worsened in some instances) in Mountain Lion.  Has anybody heard of a fix?
    Basically Mail acts like it is freezing, but in fact is not handling mouse clicks properly.
    1) If Mail is "behind" another active app window, clicking in the content area of the Mail window will not activate the window until you click a SECOND time.
    2) Once you get Mail to respond by clicking it the second time, if you click back and forth between it and the window in front (e.g. between safari and mail, the clicks DO register, but Mail acts as if the click position is offset from where you actually click.  The offset seems to vary and I haven't found a consistent link between the offset and where I click in mail or the other window, or the relative positions of the two windows.
    3) When you try the 2) trick on elements that can scroll, you realise that as well as an offset, Mail is trying to "drag" instead of respond to a click, so the list of mail folders pulls and bounces back, or the list of mail scrolls, or sometimes if everything lines up, an image of an envelope appears and moves as if you are trying to drag an email from one place to another.
    4) Clicking on the title/button/toolbar of Mail ALWAYS brings it to the front...
    5) If you bring Mail to the front by repeatedly clicking on the content area (and yes, sometimes it takes more than one click...) and as the FIRST thing you do after activating the window, click one of the buttons in the toolbar (e.g. the trash or delete button), it will depress, and stay down, as if you have done a "press and hold" instead of a "click".  Clicking on the button again will complete the action, but clicking elsewhere in the title bar will release the button and the action will not occur, just as if you had held the mouse button down and dragged off the button before releasing, which is appropriate behaviour IF you had held the mouse button down in the first place...
    6) If you activate Mail by clicking in the content area, then clicking a second time in the content area, then continue to single click around the content, it behaves as if it is one step behind you, responding as if the LAST click is the click you just made.  Interestingly the "button down state" seems to persist, because for instance clicking on a succession of emails will highlight each email in turn, but the content of the email on the right will not update with each click, only updating when you "break out of the cycle" with a double click or a title bar click.
    These are all REPRODUCIBLE, even after a restart.
    They ONLY happen in Mail.
    I have tried mouse, track pad, turning off bluetooth, so I don't think these things are related.
    SO...
    I THINK that MAIL, since Lion, has an issue with its event handler, where MouseUp events are either lost or mishandled, so that clicks are being registered as drags, or the "button down" state is not updated or something...
    With the above description I feel the Mail programming team should be able to track down the bug in minutes and fix it.
    Apple - feel free to get in contact with me and I will let you access my machine via remote desktop or teamviewer or something to see the bug in action.
    It is time to fix this annoying behaviour.
    Message was edited by: jaffle
    Worked out that 2 and 6 are related - the offset isn't an offset at all - it is the thing you last clicked on!

    Okay, I tried deleting the Finder preferences first (along with a handful of other preference files that I knew were no longer needed), and it seemed to help--at first. But eventually, all the same problems started happening again, so I concluded that it was necessary to just start with a fresh (empty) preferences folder. As you know, this is a pain to deal with, but I limited my pain by moving all the old preferences files into a folder on the Desktop rather than simply deleting them. That way, I could just put back any missing preferences that were too hard to recreate. Restoring all of my preferences with new (uncorrupted) prefs files will be an ongoing process, but the good news is that this effort (so far) seems to have solved the problem. Mail is responding to all my clicks, even when I switch between different apps and different spaces.  :-)
    Now that things are working correctly, I notice that when I switch between apps and/or spaces, the selected app (or the frontmost app in the new space) will show an active state for its window, whereas before, the selected app didn't update to show that it was active--it kept the inactive state for its window. I'm no expert, but it seems to me that this might have something to do with the windowserver process, so it might make sense for the next person who stumbles on this thread to start by deleting any preferences files that begin with com.apple.windowserver. Just a hunch, but it's worth starting there before you do a complete flush of all your preferences.
    Thanks again for the help--hopefully this workaround will be persistent. Fingers crossed!

  • HELP - mouse click no longer working - Tiger bug?

    Hi Guys,
    I had a weird issue with Tiger (10.4.10) on my PowerBook G4 this evening. I was dragging a file to the trash, and "dropped" it onto the dock by mistake, just missing the trash. I was slightly to the left of the trashcan. I expected the icon to jump back to the desktop, as the place I had dropped it was invalid, but to my surprise, as I moved the pointer across the screen with the mouse button unclicked, a ghost version of the icon was still attached to the mouse pointer.
    I was unable to click on anything, as the OS still believed for some reason that I was dragging this icon around. I used the keyboard to reboot the laptop, and when it came back up, the mouse click was not working - I can drag around, but can't click on anything. This is with the on board trackpad. I also have a bluetooth apple mouse, which exhibits exactly the same behaviour.
    I've rebooted several times (and shutdown and removed the battery), zapped the PRAM. Nothing has helped. I've tried logging in as a different user, but the click still doesn't work with the on-board or external mouse. It's like something within the OS has been corrupted, but I don't know what I can do. I have loads of data on the laptop, so I am not rebuilding. There is something on the help pages about resetting my PowerBook PMU, but I don't think this should be required.
    This is a major, urgent issue for me, as I can't use the laptop until I figure out how to resolve this.
    Anyone - please help
    Thanks,
    Robin

    Thanks for the feedback. Since resetting the PMU fixed the problem, it's not a bug but some conflict in the original setup.
    If you want to report this to Apple, either send Feedback or send bug reports and enhancement requests to Apple via its Bug Reporter system. Join the Apple Developer Connection (ADC)—it's free and available for all Mac users and gets you a look at some development software. Since you already have an Apple username/ID, use that. Once a member, go to Apple BugReporter and file your bug report/enhancement request. The nice thing with this procedure is that you get a response and a follow-up number; thus, starting a dialog with engineering.

Maybe you are looking for

  • Bridge CS4 won't open RAW files from Canon 70D

    I have Photoshop/Bridge CS4 which used to read CR2 Raw files fine from old Canon 30D@.  I've just purchased a Canon 70D.  Bridge CS4 will read the MOV video files fine, but not the Raw CR2.  I've downloaded and installed Adobe DNG Converter 8.5, but

  • Restoring tigger from cold backup.

    Hi I have one problem..... recently i have drooped 1 trigger by mistake of one of my user in database. Now the problem is... we never take the logical backup of that DB. Backup mechanism of the database is Cold Backup and size is *2TB*. Now i have to

  • Max HDD capacity in Satellite 2415-S205

    Hi! What max HDD can I use in Satellite 2415-S205 Thanks in advance.

  • Texts disappear from screen

    Hope someone can help.  For some reason, my text screen states "No entries in this view".  If a search a contact, their dialogue of texts appear.  I only see texts if a search a specific contact.  I went to my carrier and they are unable to fix.  The

  • Cuando imprimo no puedo cerrar

    Me explico: En un archivo de word (por ejemplo)cliqueas con el boton de la derecha en imprimir y el ordenador automáticamente te abre el word, imprime y luego cierra el word. Con adobe reader no me ocurre esto: una vez que ha impreso, se queda el ado