Search Results

Search found 5385 results on 216 pages for 'mighty mouse'.

Page 49/216 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • How to use keyword this in a mouse wrapper in right context in Javascript?

    - by MartyIX
    Hi, I'm trying to write a simple wrapper for mouse behaviour. This is my current code: function MouseWrapper() { this.mouseDown = 0; this.OnMouseDownEvent = null; this.OnMouseUpEvent = null; document.body.onmousedown = this.OnMouseDown; document.body.onmouseup = this.OnMouseUp; } MouseWrapper.prototype.Subscribe = function (eventName, fn) { // Subscribe a function to the event if (eventName == 'MouseDown') { this.OnMouseDownEvent = fn; } else if (eventName == 'MouseUp') { this.OnMouseUpEvent = fn; } else { alert('Subscribe: Unknown event.'); } } MouseWrapper.prototype.OnMouseDown = function () { this.mouseDown = 1; // Fire event $.dump(this.OnMouseDownEvent); if (this.OnMouseDownEvent != null) { alert('test'); this.OnMouseDownEvent(); } } MouseWrapper.prototype.OnMouseUp = function () { this.mouseDown = 0; // Fire event if (this.OnMouseUpEvent != null) { this.OnMouseUpEvent(); } } From what I gathered it seems that in MouseWrapper.prototype.OnMouseUp and MouseWrapper.prototype.OnMouseDown the keyword "this" doesn't mean current instance of MouseWrapper but something else. And it makes sense that it doesn't point to my instance but how to solve the problem? I want to solve the problem properly I don't want to use something dirty. My thinking: * use a singleton pattern (mouse is only one after all) * pass somehow my instance to OnMouseDown/Up - how? Thank you for help!

    Read the article

  • Maintaining Mouse Control in Embedded swfs (i.e. parent / child ) Flash cs4 AS3

    - by garydev
    Hello to all, I have an issue that is driving me nuts. I have an AS3 application that performs a calculation based upon user's input to determine a result. The purpose is to predict the results of a horse's coat color based on the genetics. The results are given in a 3d model swfs that are loaded into the "shell's" UILoader Component and they rotate. I have an example of this here: http://www.provideoshow.com/coatcalculator/coat_calculator.html As you can see this works fine with an "auto-rotate" feature. The problem is that my client wants the 3d models to be rotated by the user's mouse. I have the 3d models rotating with the mouse but they only work when they are stand alone swfs. They break when they are loaded into the shell. Some research informs me that the issue is in the stage properties and the parent not receiving them from the child. I've gotten some advice that I need to pass a reference to the shell's stage and preferably in the init function. This is the code I have in the child which is loaded as a class public function Main_master_withmouse() { if(stage) { _stage = stage; init(stage); } } protected function init(rootStage:Stage):void { if(rootStage) { _stage = rootStage; } else { _stage = this.stage; } sceneWidth = _stage.stageWidth createChildren(); startRendering(); } I can't figure out what to put in the parent to pass the reference to its stage. Any help is greatly appreciated. Thank you in advance

    Read the article

  • jquery help assigning multiple mouse events using a .each() to hide/show icons and show background c

    - by Ronedog
    Need some help assigning a mouseover event to display some icons that start out hidden. For every <li> in the ul, I have icons. When the user mouses over the <li> I want the span tag with a class called "icons" to be displayed. When the mouse out event occurs remove the class and/or just hide the span. The problem for me is how to assign event so just the span tag and its contents appear and disapear when the mouse hovers over the <li>. Heres the HTML: <ul id="nav"> <li>Cat 1 <span class="icons"> <div>stuff here</div> </span> </li> <li>Cat 2 <span class="icons"> <div>stuff here</div> </span> <ul> <li>Sub Cat 2A <span class="icons"> <div>2A stuff here</div> </span> </li> </ul> </li> </ul> Heres my jquery code. $('#nav li').each(function(){ //Add Background Shading o Mouseover to all Rows in the menu $(this).mouseover(function(){ $(this).addClass("background_grey").removeClass("icons"); }) $(this).mouseout(function(){ $(this).removeClass("background_grey").addClass("icons"); }); }); Thanks for the help.

    Read the article

  • Drawing continuously in drawing application

    - by user146780
    I was wondering how drawing applications draw the entire time the mouse is down without having empty gaps. What I mean is, for example if the program only drew circles at the mouse's X, y coordinate, then if the mouse went too quicly it would seem like a bunch of little circles rather than a nice continuous line. How can this be done without constantly drawing a short straight line between where the mouse was 0.001 seconds ago and where the mouse now is. Thanks

    Read the article

  • Flex: CursorManager does nothing when `stage.mouseChildren = false`?

    - by David Wolever
    I've found that if I use the CursorManager to set a cursor — CursorManager.setBusyCursor() — then set stage.mouseChildren = false, the cursor set by CursorManager is replaced by the "default" mouse cursor the next time the mouse is moved. I'm setting stage.mouseChildren = false so that, while the mouse is being dragged, other "stuff" on the stage won't get mouse events (eg, so that mouse-over affordances aren't triggered if I'm in the middle of a drag). Is there some way I can work around this?

    Read the article

  • Splitting list into a list of possible tuples

    - by user1742646
    I need to split a list into a list of all possible tuples, but I'm unsure of how to do so. For example pairs ["cat","dog","mouse"] should result in [("cat","dog"), ("cat","mouse"), ("dog","cat"), ("dog","mouse"), ("mouse","cat"), ("mouse","dog")] I was able to form the first two, but am unsure of how to get the rest. Here's what I have so far: pairs :: [a] -> [(a,a)] pairs (x:xs) = [(m,n) | m <- [x], n <- xs]

    Read the article

  • Blind As a Bat in Multi-Monitor Hell &ndash; Free Program Inside!

    - by ToStringTheory
    If you know me personally, then you probably know that I am going blind thanks to a rare genetic eye disease.  My eye disease has already been a huge detriment to my eyesight.  One of the big things to suffer is my ability to see small things moving fast right in front of me.  On a multi-monitor setup, this makes finding the cursor absolute hell. The Problem I’ll keep this short, as I’ve basically already told you what the problem is.  On my three monitor development computer, I am constantly losing the mouse during the day.  I had used the Microsoft accessibility mousefinder (press CTRL, and it pings around the mouse).  The problem with this is, there is only an effect around 50-100 PX around the mouse, and it is a very light gray, almost unnoticeable.. For someone like me, if I am not looking at the monitor when I click the CTRL button, I have to click it multiple times and dart my eyes back and forth in a futile attempt to catch a glimpse of the action…  I had tried other cursor finders, but none I liked… The Solution So what’s a guy to do when he doesn’t like his options?  MAKE A NEW OPTION…  What else should we as developers do, am I right?  So, I went ahead and made a mousefinder of my own, with 6 separate settings to change the effect.  I am releasing it here for anyone else that may also have problems finding their mouse at times. Some of its features include: Multiple options to change to achieve the exact effect you want. If your mouse moves while it is honing in, it will hone in on its current position. Many times, I would press the button and move my mouse at the same time, and many times, the mouse happened to be at a screen edge, so I would miss it. This program will restart its animation on a new screen if the mouse changes its screen while playing. Tested on Windows 7 x64 Stylish color changing from green to red. Deployed as a ClickOnce, so easy to remove if you don't like it. Press Right CTRL to trigger effect Application lives in notification area so that you can easily reach configuration or close it. To get it to run on startup, copy its application shortcut from its startmenu directory to the “Startup” folder in your startmenu. Conclusion I understand if you don’t download this…  You don’t know me and I don’t know you.  I can only say that I have honestly NOT added any virus’ or malware to the package. Yeah, I know it’s weird Download: ‘ToString(theory) Mousefinder.zip’ CRC32: EEBCE300 MD5: 0394DA581BE6F3371B5BA11A8B24BC91 SHA-1: 2080C4930A2E7D98B81787BB5E19BB24E118991C Finally, if you do use this application - please leave a comment, or email me and tell me what you think of it. Encounter a bug or hashes no longer match? I want to know that too! <warning type=”BadPun”>Now, stop messing around and start mousing around!</warning>

    Read the article

  • How can I get text under mouse pointer WebBrowser control?

    - by Alexander
    I'm currently working on WYSIWYG editor using .net WebBrowser control and I need to implement spell checking. My question is how can I get text under mouse pointer when I right click on the misspelled word to show all spell suggestions? Tried to wrap every misspelled word in html label with javascript event, but there seems to be the problem in invoking C# code from javascript.

    Read the article

  • How to attach to the jQuery Autocomplete plugin's mouse events?

    - by Tommy B
    My problem is this: I need to update some text in a div with the value of what the mouse pointer is hovering over in the autocomplete drop down list. Can it be done easily, or do I have to make fundamental changes to the Autocomplete plugin? I am using the jQuery Autocomplete plugin version 1.1 by Jörn Zaefferer. Any and all help will be greatly appreciated!

    Read the article

  • How to open tab on mouse over using jquery without using iframe and putting all content in same page

    - by jitendra
    I just want to open another tab without refreshing and on mouse over like this http://fnagel.github.com/jQuery-Accessible-RIA/Tabs/mouseover.html . Is it possible with these things. Pages url should be change like as it now. I want to keep content in separate page on clicking on another tab it should open without refreshing i don't want to open tab content as a iframe I liked the idea of this http://jonplante.com/demo/tabs-1-2/?js=on but page url is not changing so other pages cannot be bookmarked

    Read the article

  • What's the best way to tell if the mouse is over a form or not?

    - by cyclotis04
    I figured out how to capture mouse clicks over the entire form, but this method doesn't translate well for MouseEnter and MouseLeave. My form layout is made up from many Panels and TableLayoutPanels so there's no all-encompassing control I can monitor events for, and obviously a MouseLeave event for a button doesn't mean the cursor left the entire form. Has anyone figured out a good way to get around this?

    Read the article

  • How to add a cross-browser mouse wheel function to a div in javascript?

    - by Shaunwithanau
    I am trying to stop the default mouse wheel event that is called on the window and on a div and call my own function instead on the div. I need this to be cross-browser (without the use of a library. I know I need to use an eventListener and I think have to use both onmousewheel and DOMMouseScroll (for FF) but I think am getting caught up in the implementation somewhere. I appreciate any and all help.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >