Mouse panning

hi... my mouse panning not working properly..
my script is---
onClipEvent(load){
    thwidth = this._width;    //Variable for image width
    stwidth = Stage.width;   //Variable for stage width
    speed = 30;
//    The above variable is speed.
//    The higher the value, the slower the image moves.
onClipEvent(enterFrame){
    this._x -= (_root._xmouse-(stwidth/2))/speed;
    //Above line moves the image
    if (this._x>=(0+(thwidth/5))){
        this._x = (0+(thwidth/5));
    //If image reaches the end, then stop it.
    if (this._x<=5){
        this._x =5;
    //Same for opposite side.

The following enterFrame should work if the registration for the movieclip is in the upper left corner:
onClipEvent(enterFrame){
    this._x -= (_root._xmouse-(stwidth/2))/speed;
    //Above line moves the image
    if (this._x>=0){
        this._x = 0;
    //If image reaches the end, then stop it.
    if (this._x<= stwidth-thwidth){
        this._x = stwidth-thwidth;
    //Same for opposite side.

Similar Messages

  • Mouse panning issues in Flipview

    Hi,
    I have a problem in mouse panning issues in WinJS Flipview control.
    Here is my sample:
    https://skydrive.live.com/redir?resid=533F417A2E04AEC4!1009
    My problem is: I can zoom images in flipview and panning, zooming or scrolling them via finger touch.
    So, is there a simple way to enable mouse panning, scrolling?
    I think it is useless to zoom if the user cannot drag image by mouse if there is no touch device.
    Thanks so much.
    Nick

    I think adding MSGesture is a fine idea. What you're experiencing here is just a difference in the native workings of touch and mouse, so you have to manually compensate for these differences.
    Because panning and pinch/zoom in touch mode give you behaviors that are not directly translatable to mouse actions, the mouse does not interpret similar actions unless you ask it do.
    Panning with a finger is the most natural thing to expect for touchmode, but it does not directly translate into click and drag, and for that reason, mouse does not pan.  However, you can just add the event so that you get the same behavior.  It's
    extra work, but you have to take into account that not all developers want the same behavior.  For example, I expect that someone will say "I don't want to pan when I touch the screen, I want to draw a line, like I can with a mouse.  How do
    I disable this behavior?"
    I hope this clears things up for you.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • HT1338 My new magic mouse will not one finger scroll left and right

    I am up to date with software but after connecting my new magic mouse it will not one finger scroll left and right. It does scroll up and down. Any ideas on what may be wrong??

    I don't have a Magic Mouse, but there is probably a setting that enables and disables horizontal scrolling.  Look on System Preferences Mouse pane.

  • New Mighty Mouse scrolling problem

    My just-out-of-the-box Mighty Mouse will not scroll horizontally nor 360. It can't be dirty yet, and the posting referring to artnum=303446 gives instruction for what is way out of my league in the event that someone wants to recommend that approach.

    Sorry that I wasn't more clear. What I meant is that the Mouse pane in Keyboard & Mouse is new or at least different for the wireless MM. Those of us with the wired MM have two check boxes Vertical scrolling and Horizontal scrolling, while those of you with the wireless have that new pulldown menu.
    Did software come with the new wireless MM or is it just activated and made available when the new wireless MM is detected? There was a post the other day and the guy linked to a screenshot of the wireless Mouse pane. He was wondering how the rest of us could get this new pane. I said maybe it would show up one day in an OS X update. Maybe it already has, but we can't access it without a wireless MM.

  • Toggle mighty Mouse button 3

    I need some way of easily toggling the action of the third button (clicking the scroll wheel) on a might mouse.
    I have to access several programs on a remote site via a java citrix server that can only be accessed via a secured web web site (don't ask! security gone mad).
    For these programmes - effectively PC and X11 programmes run through a web portal - I need the middle mouse button to act as a "button 3".
    Most of the time, I'd like it to activate dashboard.
    My first thought was that I could have a simple AppleScript sitting in the dock that would determine what the button was currently set to, and toggle to to other setting. I can't use USB Overdrive, as that would only set the button push for the application (in this case FireFox) - and I need it set only for particular actions within FireFox (it's not even for a particular page).
    I've tried modifying a selection of applescripts I've come across, but I'm obviously missing something (I'm done virtually no applescripting) and get a variety of errors - I think based on the fact that I can't find how to reference the pop up menu for the button 3.
    So far I have:
    -- activate System Preferences Keyboard & Mouse pane
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.keyboard"
    end tell
    tell application "System Events"
    get properties
    tell process "System Preferences"
    -- activate the "Mouse" tab - seems to be a radio button
    click radio button "Mouse" of tab group 1 of window "Keyboard & Mouse"
    delay 1
    -- ** this is where I need to get the current value of the third mouse button and then set it to the other state **
    end tell
    end tell
    -- and close system preferences again
    tell application "System Preferences"
    quit
    end tell
    Can anyone help me fill in the missing (vital!) bit of code?
    Or show a better way of doing it.
    Ideally I would also switch the actions of the F9, F10, F11 & F12 to F1, F2, F3 & F4 as well (these are used by the programs concerned) - but I can leave these permenantly set without too much hassle at the moment
    Thanks

    0 replies...really?  Sad face.  Congrats, Mac.  You are becoming the new Windows.  I wonder who will arise to take the place in the market that Apple used to occupy?  You know, that place where computers, devices, and software just plain worked?  Where Operating Systems were tested thoroughly before release?  Ah, those were the days.  Shame on you, Apple.

  • Magic mouse right click issue

    I just bought the new iMac 3 weeks ago with the magic mouse which I LOVE. But in the past week I have lost the right click function 3 times now. It acts like the right click option is turned off, which I verified and tried to reset and set back which didn't work.
    The only way to reactivate the right click function is to reboot the machine entirely. I also tried to turn off and back on the mouse which didn't work and I had to get another mouse to even reboot after that!
    The only thing that has changed is that I installed VMWARE fusion (which is hella cool!) and transferred my old XP image to. It seems to stop working after i have been using my XP or Win7 virtual machine after a while. Not always the case but the only thing I can think of that has changed or I am doing differently.
    Any help on the subject would be great! Even a work around to get it working again without rebooting the machine would help.
    Thanks in advance for you help!
    Jay

    I'm not sure what all of those startup items do, but since none are obvious suspects, what you may want to do is remove them all (except iTunes Helper). In order to add them back later, you can right-click on each item and select +Reveal in Finder+, to see where the item is located. Note down the locations.
    After you remove them from the +Login Items+ list, restart (or log out and log back in). Those login items should not be running anymore. See if that resolves the Magic Mouse issue. If it did not, you can add the items back. If it did resolve the problem, I guess you'll have to find the culprit by going to the locations noted earlier and starting one item up at a time, until the Magic Mouse problem returns.
    Separately (you can try this first), when I make a change to my mouse settings (although I don't have a Magic Mouse), this is the preference file that changes
    <user home folder>/Library/Preferences/com.apple.driver.AppleHIDMouse.plist
    In case that file is corrupted in some way that prevents the right click from being set, move it to the Desktop. Then go to System Preferences Mouse pane and set it up as desired, including the right click. A new preference files should be created. See if the mouse now works properly.
    Those are the two approaches I would take initially, checking the login items and the most obvious user preference file.

  • Wireless Mighty Mouse right click not responding

    I was happily using Final cut Pro but noticed that the right click on the mighty mouse wasn't working. I checked my settings of the mouse and confirmed that 'secondary button' was selected, but no right click was picked up in any application.
    Rebooted Mac with no effect. Switched right button to 'Expose' but that wouldn't work either.
    Solution: Took batteries out of mouse and reinserted. All now resolved.

    Have you shut down (powered off) the Mac and restarted since this problem occurred? Have you turned OFF Bluetooth and turned it back ON? Have you checked the strength of the two batteries in the mouse?
    The buttons not working does not sound like a typical cleaning or hardware issue (although the scroll ball not scrolling is probably a cleaning issue). It may be a software problem.
    First, go to System Preferences +Keyboard & Mouse+ pane Mouse tab, and make some changes to the settings of the buttons that do not work. Change them any to a different setting. See if each change takes effect. If it does, change it back to the way it was before. This will rewrite the preference settings, and hopefully get those buttons working again.
    I would also do the usual general trouble-shooting actions. Run Disk Utility and use the +Repair Disk Permissions+ routine. Then restart using the reset PRAM command.
    http://support.apple.com/kb/HT1379

  • Mouse/Trackpad Scroll Options Not Independent

    I'm using 10.7 on a MacBook (late 2008 Unibody). 
    I am getting used to "natural" scrolling with the trackpad (slide up/page down) with Lion, and understand the reasoning behind it (to match iOS--I have an iPhone, so I'm already familiar the the slide up/page down scrolling).  However, because of the behavior of scroll wheels on many computers I encounter frequently and habit, I want to keep my scroll wheel with the traditional setup (scroll wheel down/page down).
    When I go into System Preferences->Mouse and uncheck the "Move content in the direction of finger movement when scrolling or navigating" box, the mouse returns to traditional scrolling (down/down).  Unfortunately, my trackpad now starts behaving in the same manner (down/down), even though the "Scroll direction: natural" box in the remains checked under the Trackpad pane (it should operate up/down with that setting, but doesn't).  If I quit System Preferences and then relaunch it, the "Scroll direction: natural" box is now unchecked, even though I did nothing to it.  If I recheck it, and then immediately go to the Mouse pane, the "Move content in the direction of finger movement when scrolling or navigating" box remains unchecked.  However, both trackpad and the mouse now use the "natural" (up/down) scrolling, when only the trackpad should.  If I quit and relaunch System Preferences, the box in the Mouse pane is now checked, even though I did nothing to it. 
    It seems that the scroll preferences for the mouse and trackpad should and were meant to be separate and independent, since they each have the box under their individual panes, but they are not operating separately.  Are there any ways to fix this so I don't have to change the preferences every time I switch from the trackpad to the mouse?

    done, logged as a bug, did not recieve a defect id, only got the following message:
    Thank you for your feedback on Mac OS X.
    We cannot respond to you personally, but please know that your message has been received and will be reviewed by the Mac OS X Team. If we need to follow up with you on your ideas for improving Mac OS X, we will contact you directly.
    We appreciate your assistance in making Mac OS X better.
    Mac OS X Team
    Apple

  • Using Arrow Keys to Move Pointer - Mouse Keys?

    Hello, I am trying to use Universal Access on a new MacBook Pro.
    Ideally, I would like to move the screen pointer by holding the function key (or some command type key) and the directional arrows - instead of using the mouse. Is there a way to map the keys to do this?
    I tried to turn on Universal Access and turning on Mouse Keys, but there are no instructions in the Help section that tell you which keys move in what directions. Anyhow, after confirming that it was on, no keys would move the pointer or do any mouse functions.
    Thank you!

    Hello Saksiri-san,
    Mouse Keys are controlled by the numeric keys which form a secondary keypad in the block: J->1, K->2, L->3, ;->-, U->4, I->5, O->6, P->*, 7->7, 8->8, 9->9, 0->/. M gives 0 and / gives +, all on an English-language keyboard of course. The movement is U or 4 to the left, O or 6 to the right and so on. The I or 5 key gives the mouse click.
    Once Mouse Keys are on, you will normally need to use the fn key as well as those in the secondary numeric keypad to move the mouse. This can be avoided by setting the default option to "software functions" in the Keyboard tab of the Keyboard and Mouse pane of System Preferences.
    HTH
    Archie

  • Possible to change mouse sensitivity with automator?

    For regular computing, I use my magic mouse. For gaming, I use a different mouse with more controls.
    Each time I switch between mice, I have to change the mouse sensitivity under system preferences. I'd like to autmoate this with a hot key. Possible to do with automator?

    OK, found a nifty applescript for this. Just change the 5 in the first line to 0-9, depending on what you want to set the mouse sensitivity to be. I created another script which increases mouse sensitivity. Then I created a hotkey combination to change my mouse sensitivity settings very quickly based on which mouse I'm using.
    If you don't know how to set this script up, follow the instructions in this helpful comment here: https://discussions.apple.com/thread/2488007?start=0&tstart=0. But instead of having the application run in just iTunes, as the comment suggests, have it run in "all applications."
    Here's the script:
    set trackingValue to 5
    --Open and activate System Preferences
    tell application "System Preferences" to activate
    --Attempt to change settings using System Events
    tell application "System Events"
        tell process "System Preferences"
             try
                  --Open the "Keyboard & Mouse" pane
                  click menu item "Mouse" of menu "View" of menu bar 1
                  delay 2
                  set value of slider "Tracking Speed" of window "Mouse" to trackingValue
                  --end tell
             on error theError
                  --An error occured
                  display dialog ("Sorry, an error occured while altering Keyboard and Mouse settings:" & return & theError) buttons "OK" default button "OK"
             end try
        end tell
    end tell

  • Cannot Access Keyboard and Mouse Preferences

    For some reason I've had lots of problems accessing the Keyboard and Mouse preference pane of the System Preferences.
    Prior, I could open the pane, and whenever i switched between keyboard, mouse and trackpad, I would get overlap. Basically, bits and pieces from each setting wouldn't disappear when the new device (either keyboard, or trackpad, or mouse, etc) was selected, so everything would look mumble-jumbled.
    Now, however, I can't even open the settings. I've rebooted, Repaired permissions and relaunched finder, but have had no luck. When I click on the Keyboard and mouse Button, all I get is a message in the title bar of the window itself saying: "Loading Keyboard & Mouse..." with no effect. Any ideas???

    I was having the same problem too. I deleted some preference file (sorry I can't remember which one, I found it here on the forums) and it started working. Sort of... Now I can actually open up the "Keyboard and Mouse" pane, but when I click on the mouse button I don't have the correct options.
    I have a 2-button wheel mouse connected, but I don't have the option to assign the wheel button a function. I can't assign the left and right buttons functions either. The only option is to make the "Primary mouse button" left or right. It also has controls for tracking speed, scroll speed, and double-click speed. But I've lost the ability to assign the buttons to the functions I want them assigned to.
    The even stranger part is that the buttons do what I want them to do still. My right button acts like a right-click (control-click) even though it doesn't show on the mouse preferences.
    I want to be able to change the wheel button so that it doesn't activate my Dashboard but I can't. If I press too hard while scrolling up or down with the wheel the Dashboard is activated. It's so annoying...

  • Spinning ball and mouse pointer icons look really low res!

    Why do the spinning ball and mouse pointer on my 24" look graphically low res?
    I know it's only a minot point but it kind of spoils the beautiful look of the screen.
    Tc

    Go to System Preferences/Universal Access/Mouse. Toward the bottom of the Mouse pane is the slider for the cursor size set to normal?

  • Wired Mighty Mouse lacks Scrolling Options

    Hello,
    Is there a way to enable zoom-scrolling on a wired Mighty Mouse?
    I was reading Mac Help on mouse settings and noticed a feature that I've never noticed before: Scrolling Options. Help claims that this feature allows to customize the scroll-ball behaviour, including 360 degree scrolling and zoom-scrolling. Alas, I failed to find this feature in my Keyboard & Mouse pane.
    I searched on Google, and it seems that this feature was introduced in the new driver that ships on a CD with the new wireless Mighty Mouse. Look here: http://tinyurl.com/pyx7s.
    Will this new driver work with the wired Mighty Mouse? if yes, where can I get this driver?
    —barmalutka
      Mac OS X (10.4.7)  

    The Zoom function appears to be giving the wireless MM access to the Universal Access System Preference "Zoom" feature.
    The MM already has 360° scrolling. I sense that the pulldown menu you see in the System Preference Pane for the new wireless MM probably gives you control to limiting the direction of the scrolling to left-right, or up-down and possibly diagonally.
    Who knows, if we are lucky the new MM System Preferences may appear in a future OS X update.
    Until then these 3rd party mouse System Prefs are available;
    SteerMouse
    USB Overdrive

  • Why is my desk top moving when i move my mouse

    why is my desk top moving when i move my mouse

    Turn off Zoom from the Universal Access and Keyboard & Mouse panes of System Preferences.
    (96210)

  • How to restore scrolling and preference options for magic mouse?

    My Apple Magic Mouse has lost the ability to scroll the way it used to. When I open the mouse pane in System Preferences, the magic mouse options and video examples no longer display; just scrolling and tracking speed. I changed batteries, then also switched mice with a colleague, but still no horizontal or inertia scrolling, etc. I have tried restoring the PRAM several times, trashed the preference logs, etc, even reinstalled the system software.
    I'm using a MacBook Pro withSnow Leopard. I had previously downloaded USB Overdrive, and read somewhere that it could be the cause. I got rid of USB Overdrive, but my mouse still doesn't behave the way it used to. Any suggestions?

    I got rid of USB Overdrive
    And all its preference files?  Repaired permissions?
    Disconnect all peripherals from your computer.
    Boot from your install disc & run Repair Disk from the utility menu. To use the Install Mac OS X disc, insert the disc, and restart your computer while holding down the C key as it starts up.
    Select your language.
    Once on the desktop, select Utility in the menu bar.
    Select Disk Utility.
    Select the disk or volume in the list of disks and volumes, and then click First Aid.
    Click Repair Disk.
    Restart your computer when done.
    Repair permissions after you reach the desktop-http://support.apple.com/kb/HT2963 and restart your computer.

Maybe you are looking for

  • Acrobat Pro 9.0 question

    How do I install acrobat pro 9.0 on a windows 8 pc. someone sent me instructions earlier but they did not work for some reason.

  • Problem in dropdown list display in module pool

    Hi All,    One of the fields of  my module pool program is a drop down list. I am able to populate the values to the list but when i select any value, it doesnot come to the field. Can any one help me out in this ? Thanks in advanve ... Ranjita

  • TOC highlight issue

    Hi, I am using RH8.0.2. When i click on the hyperlink text it navigate to the correct page,but in the TOC content the topic which is displayed is not highlighted.Insteed it remain  the  page from where it is clicked remain highlighted. For example: A

  • I have lost my I pod devices and I can't find it anywhere what do I do??

    I have lost my iPod 5 32 gb and I can not find it i have looked everywhere and had no luck what shall I do ??

  • Java in Browser on Motorola Droid one

    Can someone tell me how and if I can get Java and Java Scripting added onto my Droid Browser?? Is there a soution to this?? I need and want to use www.gotomypc.com to access my home PC but I get the error essage that I am not using a java enabled bro