Mouse position based alpha

The script is little buggy and cant seem to figure it out.
When I mouse over set boundary of x,y, mouse position triggers
easing alpha from 0 to 100%.
Following bugs seems to happen:
- On continuous mouse over with in that position, it fades
away on its own and ceases to work until i go in and out of that
area repeatedly.
- On mouse out, there is a pause that depends on how long I
have I have it mouse over.
- Sometimes, after mouse over, it doesnt fade away on mouse
out.
I have made the links absolute so i could control multiple
movie. And with in these movies, there are buttons that has its own
separate actions (loadmovie).
take a look at the script and let me know of any suggestions.
Thank you
speed = 30;
testmovie.onEnterFrame = function() {
if (_root._xmouse>20 && _root._xmouse<150
&& _root._ymouse>290 && _root._ymouse<327) {
testmovie._alpha += speed;
} else if (testmovie._alpha>0) {
testmovie._alpha -= speed;
};

Try this, you keep adding to the alpha value on your mouse
over even when it is past 100.
testmovie.onEnterFrame = function() {
if (_root._xmouse>20 && _root._xmouse<150
&& _root._ymouse>290 && _root._ymouse<327) {
if(testmovie._alpha< 100){
if((testmovie._alpha + speed) > 100){
testmovie._alpha = 100;
} else {
testmovie._alpha += speed;
} else if (testmovie._alpha>0) {
testmovie._alpha -= speed;
};

Similar Messages

  • Rotate matrix by mouse position.

    Hey guys I have been banging my head against this problem for the past few hours.  I have a rectangle object created, I want the rectangle's rotation to follow my mouse cursor. ( I am easily able to do this).  Where things get hard is that I want the rectangle to rotate around it's bottom right corner, to do this I've found that I need to use a matrix transformation.  At this point I am able to have my rectangle rotate around the bottom right point, but I cannot figure out how to have it follow my mouse cursor as well while rotating.  The reason being that with a matrix you can only tell it a amount of radians to rotate (matrix.rotate) rather than just being able to set its current rotation.... Here is my code
    var point:Point=new Point(myRectangle.x+myRectangle.width/2, myRectangle.y+myRectangle.height/2);
    function rotateObject( event:Event ):void
              var m:Matrix=myRectangle.transform.matrix;
                                  m.tx -= point.x;
                                  m.ty -= point.y;
                                  m.rotate (45*(Math.PI/180));
                                  m.tx += point.x;
                                  m.ty += point.y;
                                  myRectangle.transform.matrix=m;
    addEventListener( Event.ENTER_FRAME, rotateObject);
    So with the current code it is constantly rotating around the bottom right corner, I have tried changing the "45" to "Math.atan(mouseX/mouseY), but again it seems that would only work if i could set the rotation of the matrix to that rather than telling it how much to rotate by....
    Any thoughts or ideas would be much appreciated, thanks!

    can you not calculate the new rotation based on the mouse position and the rotate by the difference with the current rotation on your rectangle?
    function rotateObject( event:Event ):void
              var newRot:Number = Math.atan(mouseX/mouseY);
              var rotationDelta:Number = myRectangle.rotation - newRotation
              var m:Matrix=myRectangle.transform.matrix;
                                  m.tx -= point.x;
                                  m.ty -= point.y;
                                  m.rotate (rotationDelta*(Math.PI/180));
                                  m.tx += point.x;
                                  m.ty += point.y;
                                  myRectangle.transform.matrix=m;

  • Interesting way to detect array index from mouse position

    Ever programmed something and then been surprised it works? This was the first time for me. Wrote a bit of code with the intention of identifying the array index clicked from the mouse position for use in a 'mouse down?' event and it worked first time. Then I went back and realised I had been half asleep and it doesn't even use the mouse position- but as if by magic it works!
    VI snippet below. For some reason LabVIEW modifies the array reference when I create a snippet, so you'll need to change that array reference for one pointing to array 2. <= Anyone able to raise a CAR against this?

    In the past I've used this VI.  I think it is quite similar to yours and I could probably simplify based on what you have done.  One thing my VI does is it tries to take into account the scrollbar size if one is being shown for the array.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Coordinates to Index.vi ‏20 KB

  • Mouse position gets reset randomly from slide to slide

    Hi,
    I have a software demo that I'm working on (Captivate 5). From slide to slide, usually Captivate uses the start position of the mouse based on the end position of the mouse on the previous slide. But sometimes it seems to lose that position, and starts the mouse at the top left of the screen. Is there any way to change that starting position, or fix this little bug?
    Thanks,
    Joel

    I'm having a similar problem.  I've found that my mouse position changes to top left on all slides immediately following a FMR slide.  I've tried to manually reposition the mouse origin by drag-and-drop and right-click/align to..., but neither work.
    I've installed the 12/10 patch.
    Any suggestions?
    Thanks.

  • Zooming image from mouse position(like in  windows vista photo gallery)

    hello all;
    here's my situation, hope someone can help..
    i wanna Zoom an image, which zoom from my mouse position
    like in windows photo gallery in windows vista
    so i do this..
    g2.translate(iMoux,iMouy);       
            g2.scale(zoom, zoom);       
            g2.translate(-iMoux,-iMouy);       
            g.drawImage(icon.getImage(), iSposx, iSposx, d.width/2-iValue, d.height-iBawah, null);
            g.drawImage(icon2.getImage(), d.width/2, iSposy, d.width/2-iValue, d.height-iBawah, null);the problem come when i move my mouse to the different location (like from top right to bottom left)
    the zoom image displayed in the screen like jump from latest location to new location
    anybody can help me...a clue how to do that?
    thx appreciate your help guys
    mao
    Edited by: KingMao on 31 Mei 08 14:27

    Hi Frank.
    Thanks for the response.
    Agreed, the pertinent question is why can't my colleague edit the JPG exported by Aperture. It's probably also worth pointing out, the same problem occurs with JPGs exported from iPhoto.
    The Windows software usually plays nicely with JPGs by all acounts, just not the ones I send - which I do via eMail or my public space on Mobile Me incidently.
    So, another key question is: all settings being equal (color profile, quality, etc.) are the JPGs as produced by iPhoto and Aperture indistinguishable from those produced by other apps on other platforms - i.e. does the use of JPG enforce a common standard?
    If that is the case, I suspect ours might be a permissions issue.
    According to the Microsoft support page on editing in Windows Live Photo Gallery, the inability to edit a picture is commonly caused by unsupported file type, or read-only attribute set on the file.
    Unfortunately, he and I are not in the same place, and he's not particularly au-fait with this type of problem solving. Hence, before involving him, I'd like to know:
    1. it's possible (i.e. someone else does it), and,
    2. what's involved (at my end and/or his).
    Thanks again,
    PB

  • System not sensing mouse position

    Starting today, my computer (iMac G5 PPC) no longer senses the position of my mouse pointer. For instance:
    - The dock doesn't magnify when the mouse is in it
    - None of the corners activate things like screensaver, expose, desktop
    - When I select a menu in the menu bar, moving the mouse over another menu item doesn't open that menu.
    In other words, OSX simply has no clue where my mouse pointer is located as I move it for all those neat automatic things. Yet, I can still use the mouse to click on items to make them work, then OSX knows where the mouse is.
    I've rebooted several times to no effect, but did notice something. As apps start up, the instant a window opens, OSX will sense the mouse position for that brief moment. For example, putting the mouse over the dock doesn't magnify, but when an app window appears, the dock will magnify that very instance. Moving the mouse out of the dock area doesn't unmagnify the dock, it's stuck in that state until either another window opens, causing OSX to sense the new position, or I click any mouse button which all gets OSX's attention and senses the mouse position.
    The pointer never changes when I'm over things like Links.
    Strange stuff. The mouse moves fine, it's just not being detected as it moves.
    Now, yesterday I installed a new ScanSnap scanner with the ScanSnap Manager software and Acrobat Standard ver. 7. But the mouse didn't have this behavior yesterday, or even this morning. This strange problem just appeared out of the blue mid-day today.
    I've since used Disk Utility and Onyx, and re-installed the 10.4.9 update. I switched to another user account, no difference, so it's definitely system wide.
    This doesn't stop me from using my iMac, but I just don't know how to fix this mouse issue besides a OSX re-install.

    Ok everybody, I finally got proper behavior, it's just too bad I'm not sure of the procedure.
    When I go to bed I usually run the mouse pointer to the upper left corner to activate the screensaver. Of course it didn't work. But I also knew that clicking a button causes the mouse to be sensed, so I was pushing some of the buttons while in the corner to see if I could get the screensaver going.
    Well, after doing this, everything is back to normal operation again. So, I fixed it totally by accident. Makes me wonder if there's some features that are turned on and off somehow by doing whatever it was I did up in that corner.
    Just so you know, I use a Logitech Cordless Optical Trackman. I swapped to the original Apple corded mouse but that made no difference.
    I never had a chance to try the suggestions since I just read them before posting this.
    Anyway, I hope I don't do again whatever it was that caused the behavior, but I am going to store this info in DEVONthink just in case something like this happens again.
    Anyway, it would still be interesting if someone could shed some light on this fix I accidently found. Perhaps some hidden capabilities/features? Or just dumb luck?

  • Structural Authorisation & Position Based Role Mapping ( Indirect Roles)

    Hi
    I have few queries on Structural Authorization & Position Based Role Mapping (Indirect Role Assignment).
    This is a public sector implementation. We are migrating from the traditional based (assigning roles to users) to Indirect role assignment.
    1. Can we integrate both structural authorizations and position based role mapping in one system?
    2. If we implement structural authorizations and position based role mapping in a single system, then do we need to assign the role to the chief position or it would automatically have the authorizations which are assigned to the users below chief position.
    3. First step do we need to create the users in SU01 / SU10 or can we create the entries in PA30. Which one comes first or both independent.
    4. If the user moves from one position to the another position then there would need to be a grace period of shift over of Roles. Where do we maintain the shift over value of days. Do we need to maintain in both.
    Any help or suggestions on the above would be appreciated.
    Thanks and Regards
    Arun R

    Hi
    1. Can we integrate both structural authorizations and position based role mapping in one system?
    Yes you can.  Structural authorisations and position based role mapping can be assigned to the same org plan in SAP.
    2. If we implement structural authorizations and position based role mapping in a single system, then do we need to assign the role to the chief position or it would automatically have the authorizations which are assigned to the users below chief position.
    No, the SAP role is unique to the postion it is assigned to. But remember not all employees will be assigned to a position - in this case you have to assign the sap role directly to the user in SU01/SU01
    3. First step do we need to create the users in SU01 / SU10 or can we create the entries in PA30. Which one comes first or both independent.
    Create user in SU01.SU10 first before creating infotype 105 in PA30.
    4. If the user moves from one position to the another position then there would need to be a grace period of shift over of Roles. Where do we maintain the shift over value of days. Do we need to maintain in both.
    *When a users assignment in the org structure changes then you must run RHRPROFL0 to update the user assignment to the new position.   
    Also the number of days an employee can have access to their previous data is controlled by the parameter is called ADAYS - tx OOAC .  SAP currently defaults this to 15 days and this is used  to control the number of days that the employee can still access the data they created even though they are assigned to a different organisation with different authorisations.
    Hope this helps.
    Charmaine

  • Preview of Fixed Position Based eText template displays the formatting

    Hi,
    I am trying to create an EFT template using the eText Fixed Position Based instructions. I copied an existing Fixed Position Based template and made the changes that were needed. When I hit the Preview link, it displays the payments in the formatted template, not in the output that I'm trying to create by using the template.
    Can anyone tell me what step I'm missing? I have created other types of templates and they preview fine.
    Thanks

    There is no difference between DELIMITER_BASED and FIXED_POSITION_BASED
    you can pick up the fixed and convert it into delimiter based,
    allowed columns are MaximumLength,Format,Data,Tag,Comments. delete the rest of the columns.
    And for DELIMITER_BASED templates,After every data field row,you have to insert a delimiter row and put appropriate field delimiters in separate rows between the fields.

  • MAC OS X + stage.fullScreenSourceRect + renderMode set to GPU = problem with mouse position

    When setting stage.fullScreenSourceRect, stage.displayState to StageDisplayState.FULL_SCREEN_INTERACTIVE; and renderMode to GPU, mouse position is read incorrectly. This is not only for mouseX and mouseY position, but also all the mouse interactions with Sprites, Buttons etc are not working correctly.
    Anybody know a solution for this issue?
    Here is the bug reported, but there is no response yet.
    https://bugbase.adobe.com/index.cfm?event=bug&id=3486120
    Greg.

    Bump up.
    Anybody has the same problem and have an idea how to fix it? Or please just check if you have the same problem.. I'm going to submit my game "Amelia and Terror of the Night" (successfully added to iOS store) to MAC App Store but can't do it while this problem appears.
    I am disappointed nobody  even verified the bugs I submitted at  the bugbase.adobe.com for AIR 3.5 and 3.6
    thanks
    Greg

  • Position Based Security

    Hi All,
    How to find out whether the security implemented is position based or role based. and in position based is there any difference in delaing with authorisation changes,  compared to roled based security.
    Can some one please let me know the information.
    Regards,
    Sandhya

    Hi,
    the difference is on how you assign the roles to users. Position based means that roels are assigned according to the position the user has in the org-structure.
    Roles are assigned to the position and each user who is assigned to the position gets those roles assigned.
    You can identify such roles as they are assigned indirectly (blue colour in SU01 and PFCG(tab users)) and if hr-org is activated and maintained in your system.
    Administrators should know of how they assign roles in your system. Just ask them.
    b.rgds,
    Bernhard

  • Hwo to "track the mouse position"

    I m a java newbie, and need to write a small program to track the mouse position.
    basically, it opens a small window, and tell you the current mouse x, y coordinate. when mouse moves, hte x, y changes...
    by the way, how can i compile it to .exe file, after i finished coding.
    i try this way, but so many errors.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class mouseWin {
    public static void main(String[] args)
              protected int last_x=0, last_y=0;
              mouseMoved(MouseEvent e);
    JFrame frame = new JFrame("Mike's Mouse");
    JLabel X = new JLabel("x: " + last_x + "y: " + last_y);
    frame.getContentPane().add(X);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
         public mouseMoved(mouseEvent e)
              last_x = e.getx();
              last_y = e.gety();

    please help.
    i rewrite the code, but still cannot get it work
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.EventListener;
    public class mouseWin implements MouseMotionListener
    public static void main(String[] args)
                   int last_x;
                   int last_y;
                   last_x = 0;
                   last_y = 0;
                   JFrame frame = new JFrame("Mike's Mouse");
                   JLabel X = new JLabel("x: " + last_x + "y: " + last_y);
              frame.getContentPane().add(X);
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   frame.pack();
                   frame.setVisible(true);
         public void mouseMoved(MouseEvent e)
              last_x = e.getx();
              last_y = e.gety();
              JLabel X = new JLabel("x: " + last_x + "y: " + last_y);
    }

  • Mouse position on screen

    is there any way to get the mouses position on the screen (not a window)?
    Stephen

    Component c = (Component)e.getSource();
    Point p = e.getPoint();
    SwingUtilities.convertPointToScreen(p, c);
    System.out.println(p);

  • Mouse position capturing

    I was wondering if there is a way to capture the mouse position w/o the use of a frame or jframe? I already know how to use the MouseListener on the JFrame/Frame, but that is no help to me since I'm not using a frame at all. Any suggestions????

    What is your goal. This will work -- (the window is 1 pixel!) -- because the robot starts a "drag" and
    swing has mouse capture during drag, but as soon as the use clicks, it's over...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class X {
        public static void main(String[] args) throws AWTException {
            JWindow w = new JWindow();
            Container cp = w.getContentPane();
            cp.addMouseMotionListener(new MouseMotionListener() {
                public void mouseDragged(MouseEvent e) {
                       System.out.println(e.getPoint());
                public void mouseMoved(MouseEvent e) {
            w.setBounds(new Rectangle(0,0,1,1));
            w.setVisible(true);
            Robot rob = new Robot();
            rob.mouseMove(0,0);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseMove(100,100);
    [/code[

  • Detect Mouse Position?

    I can't (within actionscript 3) determine where the mouse is
    relative to the flash player window.
    I can get stage.mouseX and stage.mouseY but those coordinates
    are in relation to the size of the entire ORIGINAL stage at compile
    time.
    I need to know where the mouse is in relation to the window
    playing the swf, which is significantly smaller than the original.
    That is the play screen has been resized.
    If I zoom way in and scroll to the right edge of the stage
    and mouseover a spot on the right edge, then trace the mouse
    position (in a mouseover event proc) it shows me a number that is
    the width of the ORIGINAL stage. It seems to be completely
    oblivious to the play window.
    Is there any way at all to determine where the mouse is
    relative to the play window?
    For example,
    if the original stage is 1350 and the play window is 540 and
    I'm zoomed WAY in and scrolled all the way to the right and
    I put the mouse directly in the middle of the window,
    I need something that tells me (in actionscript 3) that the
    mouse's x coordinate is at 270, NOT 12XX (somewhere near the end of
    the orginal size of the stage).
    Is this possible in Flash C3??

    Hi there!
    I don´t know if it´s right but have you tried
    localX
    localY
    from the occuring MouseEvent?
    Hope that helps :)
    CU
    Ingo

  • Convert mouse position to image position

    Using a zoomed IMAQ image in an image control, I want to recover the position of the mouse in the co-ords of the underlying image. LastMousePositionX (and Y) give the info I want but they are one click in the past and not the current position. Amazingly, there doesn't appear to be an equivalent CurrentMousePositionX. I can't seem to find the info I need to do the conversion manually. The mousedown event returns the current mouse position and I can get the position in the image container by subtracting off its left and top position. But to convert this to the image position I need to know both the zoom and where the images origin is relative to what is displayed. I can't seem to find that origin position in the list of property nodes. The only thing I can seem to come up with is to extract the info from teh image information string, but this seems like an incredibly poor way to extract such obvious information - espeically since the info must be calculated to put in the string anyway. Can anyone help with this?

    Hi,
    I am confused why you get the mouse position one click in the past because it seems to work ok for me. I've had to use four of the image properties to recreate the effect using the mousemove event, but this seems to give the same values as the Last Mouse Position property so I think it does what you want. I couldn't see an origin property so I did the conversion using the position given at the image center. I wanted to post a snippet here but I'm new to posting and couldn't seem to get it to work for the whole block diagram, so I'm using a screenshot instead. I hope this helps in some way.
    Will
    Attachments:
    mouse position test.vi ‏58 KB

Maybe you are looking for

  • Apple TV does not show up on TV screen

    Had my Apple TV for a few months, been used lots. Recently it no longer shows up on my TV, I have an LG TV which just flashes no signal across the screen. On a few occasions I've been able to unplug everything, plug it all back in and it would work p

  • System Message Shows in  Future Date

    Dear Experts, In Our SAP BI System , The System Message SM21 shows in Current & future date both problem messages SAP Server OS and SAP BI Application Time and date both are in sync The BI system which is connected to ECC PRD also having a sync Remot

  • Can I backup my iPad with Time Capsule

    I have recently set up my new TC and need to know if it can be configured to automatically backup my iPad. I rarely use anything other than my iPad.

  • The Mapping to Node COMPONENTCONTROLLER.1.ATT_NAME Has Not Been Completed

    Have you ever met such problem ? It's very strange , sometime it occured and sometime not .

  • SGA_MAX_SIZE and SGA_TARGET how to set minimum for pools

    Hello, we are on 10.2.0.4, Solaris 5.10. We are using ASMM, so SGA_TARGET and SGA_TARGET size are set. Hence, buffer cache, shared pool, large pool and java pool are automatically sized. However, we do not have any minimum values for those. How do I