Plus and minus instead of mouse pointer

http://www.rwphotographic.com/#/recent/pbs
On the site above, the designer has managed to replace the mouse pointer with a plus (+) or minus (-) depending on where the mouse pointer is (either the left hand side of the screen or the right).
I'd like to know how I could achieve this via AS3, if this is a possibility.
It will still need to work when the browser is resized however.
Thanks if you can help.

This code shows either plus or minus depending over which half of green rectangle mouse is:
import flash.events.MouseEvent;
import flash.ui.Mouse;
var plus:Shape = makePlus();
var minus:Shape = makeMinus();
var sprite:Sprite = new Sprite();
var g:Graphics = sprite.graphics;
g.beginFill(0x008040);
g.drawRect(0, 0, 200, 200);
g.endFill();
addChild(sprite);
sprite.x = sprite.y = 50;
var spritVerticalCenter:Number = sprite.x + sprite.width * .5;
sprite.addEventListener(MouseEvent.MOUSE_OVER, onSpriteOver);
sprite.addEventListener(MouseEvent.MOUSE_OUT, onSpriteOut);
onSpriteOut();
function onSpriteOut(e:MouseEvent = null):void
     Mouse.show();
     plus.visible = false;
     minus.visible = false;
     stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
function onSpriteOver(e:MouseEvent):void
     Mouse.hide();
     addChild(plus);
     addChild(minus);
     stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
     onMouseMove();
function onMouseMove(e:MouseEvent = null):void
     plus.x = minus.x = mouseX;
     plus.y = minus.y = mouseY;
     plus.visible = mouseX > spritVerticalCenter;
     minus.visible = mouseX < spritVerticalCenter;
function makePlus():Shape {
     var s:Shape = new Shape();
     var g:Graphics = s.graphics;
     g.lineStyle(4, 0xff0000);
     g.moveTo( -8, 0);
     g.lineTo(8, 0);
     g.moveTo(0, -8);
     g.lineTo(0, 8);
     return s;
function makeMinus():Shape {
     var s:Shape = new Shape();
     var g:Graphics = s.graphics;
     g.lineStyle(4, 0xff0000);
     g.moveTo( -8, 0);
     g.lineTo(8, 0);
     return s;

Similar Messages

  • Plus and minus keys on wireless keyboard?

    hi there everyone. i've got a new aluminum wireless keyboard and i love it to bits. gorgeous bit of design and elegance. on the previous apple keyboard however there was a couple of handy keys next to the numeric pad for 'plus' and 'minus'. Does anyone know how i can find these on the wireless keyboard? these were particularly handy when hit with the 'command' key to increase or decrease the size of text in safari.

    excellent, thank you, i'd obviously not looked at my keyboard closely enough! cheers...

  • Plus and minus DVD format on new g5's..... Can I upgrade?

    I see on the new g5's that they list plus and minus format dvd burning cabability. Can I upgrade to that ability? The current drive is very picky about media. Memorex 8x won't work. Tdk 8x will. Tdk 16x won't . I find it very annoying. It looks like there is a multiformat drive already in my g5's. How can I make them burn both plus and minus? I am running 0s 10.4.6 Is there a better drive that is not so picky? Thanks

    What software are you using to burn with?
    If you're using software that allows you to select the burn speed (e.g. Toast), what speed are you burning at?
    Can you describe what happens when the burns don't work? Do you get an error message, does the burn just stop partway through, etc.?
    From my experience, the Pioneer is less finicky, but this is just from anecdotal evidence as I've only used Pioneer drives, with the exception of the burner in my PowerBook which is a Matsushita.
    I'm reluctant to suggest buying a new drive. Is there any particular reason that +R burning is necessary? If the students bought them and the drive doesn't like them, maybe they can exchange the unused discs. Or, it might be helpful to try several different brands (I know you've already tried Memorex and TDK). Maybe try some Maxell and Verbatim.
    The Pioneer drives can be found for between $40 and $50. One of the best things about the Pioneers is that they periodically release firmware updates to the drives to enable new media to be used and to improve burn reliability. I believe OSX 10.4.6 is the first to provide native support for a non-OEM DVR-110.

  • The plus and minus button on my headphones aren't working

    The plus and minus button on my i phone 5 headphones aren't working

    I think there are a lot of us having the same problem. Siri also doesn't work. The only thing I can use the earbuds for is turning the iPod off and on.....

  • Where are the plus and minus keys on a Pavilion dv6-3150us Entertainment Notebook?

    Where are the plus and minus keys on a Pavilion dv6-3150us Entertainment Notebook?  Joe
    Joe B.

    Its on the keyboard somewhere on top center close to the number keys. To be straight, its just below F12 key. 
    //Click on Kudos and Accept as Solution if my reply was helpful and answered your question//
    I am an HP employee!!

  • My plus and minus volume control doesn't work.. Is there any way of turning them on or off? Or is my phone faulty?

    My plus and minus volume control doesn't seem to work.
    Can I switch the volume on?

    Hi Timjazzhair,
    Go to Settings ==> Sounds and in 'Ringer and Alert' set 'Change with Buttons' to YES.
    Woops! Meg beat me to it!

  • The plus(+) and minus(-) keys to increment or decrement the date

    Hi All,
    I have a date field in which I would like to have the + and - keys to increment or decrement the date as in some windows programs.
    Thank you, Bill

    Hi Chad, Yes I know the Date Picker... that is what it has now.
    My users are keyboard users... hitting the plus or minus sign in the Num Pad is much quicker if the date is only 2-3 day plus or minus...
    We desire to have the Date Picker and have maybe a onkey event call. I was hoping to find someone that has used "onkey" for a specific element/field so it doesn't look at every key stroke in the document but just the one date element onkeyup etc......
    Thanks for the response.
    Bill

  • Accordian panel with plus and minus signs to indicate state of panel

    I want the text to show [+] next to the title of the panel when it is collapsed and [-] when it is expanded
    just like http://www.reddit.com/r/indesign/comments/1jewqq/custom_kerning_applied_to_a_single_charac ter/
    the comments on this page can be expanded or collapsed by clicking the plus or minus sign
    how do i do this?

    I've started filling the accordion with my content and the
    cookie works fine. But I see some things I'd like to have changed
    if possible?
    a) When I load the page all accordion panels flips open at
    the same time and they stay open until the page has loaded. It's
    probably not visible in the demo because it's only a few bytes to
    load there. After the page has loaded the cookied panel stays open
    and the rest of the panels close. Is it possible to hide the
    loading of the panels somehow? This is kinda messy right now.
    b) I'd like to use the cookie to control the panels but only
    during the current session. When a new session occurs I'd like to
    start with all panels closed a) (or use the script that states
    default panel). The standard accordion use a small script to set
    the default open panel. I tried modifying this script but it looks
    like the accordion is following the laws of the cookie and is now
    ignoring this script.
    Panel 4 set to be default (0, 1, 2, 3):
    <script type="text/javascript">
    var Accordion1 = new
    Spry.Widget.Accordion.prototype("Accordion3");
    </script>

  • There should be a plus and minus for zoom on the maps for iphone

    when driving having to use two hands and navigate is troublesome to say the least.  I know its cleaner and simper when not crowding the screen or maybe a prgramming issue just seems like it would be easier to use with one hand when driving sometimes if i had the buttons for zooming more safer too.  Or maybe not.   Because its making you stop or you have to take your other hand off the wheel i can do it with one hand but maybe not everyone can zoom with one hand while driving.  Just a suggestion on something apple might want to put into next maps maybe or maybe you wont even need it since now theres turn by turn.  It still neccesary for using it on a bicycle or slower moving forms of tranportation where you might need it.  Just a suggestion i thought would be helpful and maybe even safer. 

    yeah but how many people do you think in actuality use it the way you are saying.  not me when i drive im always looking for a road to see if i passed it or not and thats because i had to reroute my traffic or im lost and i turn on the map and or i passed something because the map is sometimes off etc...  It could be anyting not just the need to not touch your phone. 

  • Plus (+) and minus (-)

    This works;
    var namn = field._name;
    field.text = (namn +"_txt");
    This doesn't;
    var namn = field._name;
    field.text = (namn -"_txt");
    How to leave out "_txt" from name? I could rename my instance
    but just want to know why this doesn't work.

    "thejokerman05" <[email protected]> wrote in
    message
    news:ehgg45$ahi$[email protected]..
    > This works;
    > var namn = field._name;
    > field.text = (namn +"_txt");
    >
    > This doesn't;
    > var namn = field._name;
    > field.text = (namn -"_txt");
    >
    > How to leave out "_txt" from name? I could rename my
    instance but just
    > want to
    > know why this doesn't work.
    >
    namn is a String. Strings can be concatenated with a +
    because it makes
    sense.
    But subtracting it could mean many things like removing
    matches from the end
    of the String, or removing all matches.
    Instead there are other ways to do this, for instance...
    field.text = field._name.split("_txt")[0];

  • Suggestion in creation of domain ...Plus and minus

    Hi,
    can we use same domain for common characteristics field or separate domain? (ex: fields with domain value range - Yes or No
    Which will be the better approcah?
    Regards,
    Sri

    Hi,
    SriRAM77
    Domain fixed value range ,   Yes you can use the same domain  better then separate domain.
    check this link
    [http://help.sap.com/saphelp_nw04s/helpdata/en/e2/66708f730811d2959500a0c929b3c3/frameset.htm]
    Regards,
    Ansari.

  • Moving mouse pointer to menu dims window and shows all open windows at once

    when i'm in safari and i move my mouse pointer to the upper left corner of a window that is almost full screen, that window dims and a black bar appears in the middle of this window with a discription of it. as an example
    APPLE=SUPPORT-DISCUSSIONS-POST MESSAGE:NEW THREAD
    if i have 2 windows open one shows lower left and the other upper right and i have to click the mouse button on the window i was using to get it back and get the other behind it.
    is there a setting in preferances that causes this that i can change?

    This is what happens for one of the active corners for Exposé, if ("all windows") is the upper left corner. Take a look at "System preferences" , Dashboard & Exposé.
    Message was edited by: eddy kestemont

  • Mouse pointer invisible - intel 945GM

    Hey people, thought I would document this in case others have problems.  I have partially solved the issue, but if someone knows a better solution please contribute.  I think this is specific to the intel xorg driver but not totally sure.
    I rebooted my eeepc (Intel 945GM, using stock driver) today and when I got into X there was no mouse pointer.  I quickly found that the mouse is in fact there, you can right-click and get a menu etc, its just there is no pointer so your flying blind.
    A bit of Googling suggested it was something to do with using xrandr to enable/disable outputs, which is what I do.  At home the eeepc sits on the desk connected to my external monitor.  In my .xinitrc I have it set up so it detects when its connected to the monitor and automatically enables it (VGA) and disables the laptop screen (LVDS).
    So to try and get the mouse back I re-enabled the LVDS
    xrandr --output LVDS --auto
    The eeepc screen comes back on (in clone mode) and sure enough the mouse pointer is visible on that screen, but not on the external VGA.  After a bit of tooling around I found that if you enable both screens in extended desktop mode, the pointer is then visible on both.
    xrandr --output LVDS --right-of VGA --auto
    Once the pointer is working on both screens you can then turn off the LVDS again, and the pointer remains working on the external, everything back to normal.
    xrandr --output LVDS --off
    PART 2 - This is actually a question if anyone can help me
    In order to use dual monitors like an extended desktop, you will find that you need to set the virtual desktop size in your xorg.conf display section.  Something like:
    virtual 2304 1024
    BUT...since we now bask in the glory that is hot-plugging and hal wizardry, I don't have an xorg.conf.  Does anyone know how to set the virtual framebuffer size using xrandr, without having to use an xorg.conf?
    And while I think about it, why do we even need to set a virtual size manually really, xorg knows the dimensions of connected displays, you would think it could set a default virtual framebuffer to the width of the connected outputs, would make it much easier. /rant
    Anyway, any more info on the subject much appreciated.
    Last edited by Wittfella (2009-10-22 14:36:09)

    The cursor issue sounds like an upstream bug - you should report it to https://bugs.freedesktop.org.
    Wittfella wrote:Does anyone know how to set the virtual framebuffer size using xrandr, without having to use an xorg.conf?
    Can't be done.  The virtual fb size tells your graphics driver how big a framebuffer to allocate at X start time.  It can't be changed later.  Which is too bad, and a major limitation of randr.  I think it does set the virtual fb size correctly when it starts, but that size will be wrong when you add another monitor for example.

  • Odd GUI mouse pointer behavior

    I have noticed since Lion came out the ability to resize from any window edge has seemed to have brought with it a minor annoyance. The mouse pointer form persists as an up-pointing arrow after the pointer leaves the bottom edge of an application if it is brought down to butt with the dock. Ought it not return to the "main" form of the familiar heftier-looking black arrow pointing to an approximate 11 o'clock direction?
    Also, along the same lines I have noticed that if Stacks list-style menus overlap hyperlinks in Safari and you hover your mouse pointer over those areas of overlapping the pointer turns into the hand-with-an-index-finger-pointing type of pointer form. The clicking behavior remains true as one would expect and clicks the item in the Stack menu while leaving the stuff underneath alone.
    Does anyone else get any of this strange behavior? I am putting it in Mountain Lion because it is also in 10.8 as it was in 10.7 Lion. It was not in 10.6 Snow Leopard and I am somewhat convinced that the "any edge resizing" feature is responsible for bringing this about.

    I had to reinstall Mountain Lion and I am having the same mouse problem in Safari with a hand appearing at certain times. I never had that problem in prior iterations of OS X nor in Mountain Lion until I had to reinstall it. The hand it too large to figure out where it is when I want to insert something in text. I suppose it's the pointing index finger, but I want my arrow pointer back!

  • After upgrade I have a black display showing only the mouse pointer

    I just installed the Windows 10 Technical Preview on my Lenovo W540 laptop.  The installation appeared to to go just fine and I did not see anything that should cause any issues.  Now that it is complete, my display is black and I see the mouse
    pointer on the screen.  I can move the mouse just fine, but nothing else will display when moving the mouse.  If I hit <ctrl><alt><del> then our domain banner page will flash on the display but I can't hit the OK button to get to
    my login prompt.  Has anyone seen this before?  What can I do to resolve this issue?  Any suggestions out there?
    Wade Preston

    I just connected remotely to the Applicaiton log files via computer management.  I see that the LogonUI.exe application is failing.  I have attached the log for this error.  Anyone know what to do with this error or how to fix it?
    Here is the log:
    Log Name:      Application
    Source:        Application Error
    Date:          10/2/2014 11:07:55 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      BF03500KL.baldwin.corp
    Description:
    Faulting application name: LogonUI.exe, version: 6.4.9841.0, time stamp: 0x5413b9b7
    Faulting module name: MSVCR100.dll, version: 10.0.40219.1, time stamp: 0x4d5f034a
    Exception code: 0xc0000005
    Fault offset: 0x000000000003645a
    Faulting process id: 0x1244
    Faulting application start time: 0x01cfde5b066a2697
    Faulting application path: C:\WINDOWS\system32\LogonUI.exe
    Faulting module path: C:\WINDOWS\SYSTEM32\MSVCR100.dll
    Report Id: 44725ffb-4a4e-11e4-95d5-54ee7501cb36
    Faulting package full name: 
    Faulting package-relative application ID: 
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-10-02T16:07:55.000000000Z" />
        <EventRecordID>48596</EventRecordID>
        <Channel>Application</Channel>
        <Computer>BF03500KL.baldwin.corp</Computer>
        <Security />
      </System>
      <EventData>
        <Data>LogonUI.exe</Data>
        <Data>6.4.9841.0</Data>
        <Data>5413b9b7</Data>
        <Data>MSVCR100.dll</Data>
        <Data>10.0.40219.1</Data>
        <Data>4d5f034a</Data>
        <Data>c0000005</Data>
        <Data>000000000003645a</Data>
        <Data>1244</Data>
        <Data>01cfde5b066a2697</Data>
        <Data>C:\WINDOWS\system32\LogonUI.exe</Data>
        <Data>C:\WINDOWS\SYSTEM32\MSVCR100.dll</Data>
        <Data>44725ffb-4a4e-11e4-95d5-54ee7501cb36</Data>
        <Data>
        </Data>
        <Data>
        </Data>
      </EventData>
    </Event>
    Wade Preston

Maybe you are looking for

  • Email pdf smartform error!

    Hi, I manage to send pdf to email with attachment, but getting this error "An unrecognized token BT28.35" was found" My code:   statics:  ls_doc     type sodocchgi1,             lv_lines   type i,             ls_objhead type soli_tab,             i_o

  • I can't drag and drop files into a playlist.  Any ideas?

    As I often do, I went to drag four new files into a playlist in iTunes and suddenly they will not go in.  I just get that circle with a diagonal line across indicating that this is not possible.  Lately iTunes has been giving me all sorts of problems

  • Nokia X3 Vocabulary Problem

    hii evry1.. i bought nokia X3-00 mbl 1month back(nov 3rd)... when i went to nearest nokia care ,they updated my mbl s/w.. nw my mbl s/w version z v08.54.... cmng 2 point.. my prblm z wen im typing text its automatically gng to chinese lang.. wen im s

  • JDeveloper, JPA named query String parameter with length of 1

    Hi, I use JDeveloper 11.1.1.2.0. and have the following table: CREATE SEQUENCE COUNTRY_SEQ; CREATE TABLE COUNTRY ( COUNTRY_ID NUMBER NOT NULL, COUNTRY_NAME VARCHAR2(40), COUNTRY_CODE CHAR(2) NOT NULL, CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID)

  • Error: In initializer for 'source'

    I have a strange problem.  When I try and compile the application, I get two errors, one of which is below, but they are essentially the same.  If I edit FaqEventMapButtonSkin.mxml and update ButtonSecondaryDefault to ButtonSecondaryDefaultTEST, and