Gradual Movement on a mouse over

I'm trying to move a movie clip which has my main content in
by having it scroll when a button (the button is independent to the
clip I'm moving) is moused over, so that if the "up" button is
moused over it will slowly move the movieClip in that direction.
At present I have code (attached) that responds to my mouse
being over a button by moving my movieClip (contentArea) unless the
movie clip's x value is already at 0, in which case it stops.
However, it does this all in one go, so it instantly is
setting x to 0.
Does anyone know how I could make this gradual, so say for
every second the mouse is over the scroll area the movie clip would
move a set number of pixels that way? Or am I over complicating
things and there is an easier way to do this? It has to be mouse
over as opposed to clicking as I want it to be intuitive.
I'd be really grateful if anyone could help,
Thanks
Peter

This is good, but how do you find out the correlation between the mouse point and the text position. For example:
If the TextArea displays:
This is a test.
You might get the following if you put your mouse over "test".
Mouse x=261 y=0
Text position = 14
My question is how do I determine that x=261 and text position=14 is "test".
Thanks,
Ashish

Similar Messages

  • Why Does Spry Horizontal Menu Bar Move On Mouse Over In IE 6?

    Greetings:
    www.marketscholar.com
    Can someone please take a look at the pages in this site and
    help me figure out why the menu moves around the page when
    moused-over in IE6? It works fine for me on IE7.
    I am new to DWCS3, Spry, etc. and don't have the first clue
    how to fix this.
    Thanks in advance for any help.
    Glenn

    It sounds like the path to the support files - SpryMenuBar.js and/or SpryMenuBarHorizontal.css - is not correct.
    Gramps

  • Imported movie of hard disc not working. Blank square and when mousing over

    I have imported about 150 gig of mp4 video into my iMovie event library and no problems until now. The mp4's are stored on my external hard drive (1000gig) and add up to around 105 gig in total. iMovie is also stored on this hard drive. When I import into my event library everything was fine but now I have hit a point where any more mp4's come up in the event library as a blank file, when I mouse over them a still shot comes up of another pre-imported video that has nothing to do with that video and the file plays sound but there is no footage. I still have 50 gig of footage to import before I can start editing my movie.
    I still have 750 gig free space on my external drive and I am using a Macbook with 4 gig of memory and 48 gig of 119 still available on my Mac hard drive, is this the problem? Does anyone have any solutions ?

    Thanks again Tom, I worked out your clue, being "whoa" as to meaning I shouldn't have moved iMovie onto my hard drive, I have moved it back to my Mac and everything seems to be working fine now, fingers crossed. I am really getting good at importing now, but don't think you'll be rid of me just yet as I have a lot of editing to start in the near future!

  • Images in Table move on Mouse Over

    I made a simple table-based photo gallery.  
    On mouse-over, a coloured bar appears at the bottom of the selected image.  At the same time the image moves upwards slightly, presumably the same distance as the width of the coloured bar.  
    Depending on the position of the image within the table, either one or more rows within the table move at the same time.
    I received some feedback from a viewer that they do not like this movement of the table
    Can you suggest any way to make the table more stable, i.e. remain still during mouse-over.
    See: http://www.eyta.org.uk/photos.html

    First, I don't like table-layouts.  They're last century's layout approach.  Nobody uses table-layouts anymore.  We use CSS floats now.
    Photo Layout example:
    Alt-Web Templates :: CSS Semi-Liquid, Photo Proof Sheet
    Secondly, if you're adding a border on hover, you need to add similar same sized border for the non-hover state.  Otherwise the jumping is inevitable owing to how the CSS box-model works.
    Example CSS:
    a {text-decoration:none; border-bottom: 1px solid #FFF}
    a:hover {border-bottom: 1px solid #000}
    Nancy O.

  • Cannot not click on menu that appears when i right click my taskbar, as the right click menu dissapears when i move mouse over to the right click menu

    PROBLEM: RIGHT CLICK CONTEXT MENU DISAPPEARS WHEN TRYING TO LEFT CLICK AN OPTION
    Hi,
    Im using Windows 7, and i could always
    go down to my TaskBar and Right Click
    Icons, and active icons, which would bring up
    the standard Right Click Menu list.
    PROBLEM
    As soon as i moved my Mouse away from
    the bottom Window 7 Task Bar to go a couple
    of millimeters above to left click an option on
    the Context Menu i opened with my right click,
    The whole Menu disappears, and this happens in
    Firefox version 29.01, other programs in Firefox,
    and other such as Skype.
    When i was running Firefox 28
    i didn't have this problem, can you help me out.
    Thank You
    Kev Borg

    '''PROBLEM'''
    '''RIGHT CLICK MENU DISAPPEARS WHEN YOU MOVE YOUR MOUSE TO LEFT CLICK A MENU OPTION ON THE RIGHT CLICKED MENU.'''
    ''''''YOU CAN'T BECAUSE AS YOU MOVE YOUR MOUSE TO THE MENU YOU JUST RIGHT CLICKED TO OPEN DISAPPEARS BEFORE YOU GET A CHANCE TO LEFT CLICK YOUR CHOICE.''''''
    '''SOLUTION'''
    '''1]''' GO TO '''CONTROL PANEL''' AND CLICK TO VIEW MENU
    '''2] ''' GO TO "'''EASE OF ACCESS CENTRE'''" AT THE TOP.
    '''3]''' LEFT CLICK ON MENU ITEM "'''EASE OF ACCESS CENTRE'''"
    '''4]''' AFTER YOU LEFT CLICK ON "'''EASE OF ACCESS CENTER'''" IT APPEARS.
    '''5]''' LOOK DOWN THE LIST TILL YOU FIND "'''MAKE THE MOUSE EASIER TO USE'''"
    '''5]''' THE TOP SECTION SHOWS YOU HOW TO CHANGE YOUR MOUSE COLOURS ETC.
    '''6]''' SCROLL DOWN TILL YOU SEE THIS HEADING "'''MAKE IT EASIER TO MANAGE WINDOWS'''"
    '''7]''' RIGHT UNDER THAT MENU THERE IS CHECK BOX,
    "'''ACTIVATE A WINDOW BY HOVERING OVER IT WITH YOUR MOUSE"
    '''8] MAKE SURE THERE IS NOT A TICK IN THAT OPTION BOX, IF THERE IS UN TICK IT AND APPLY AND CLICK OK TO SAVE.
    And now you should have No More Problems with your Right Click Menu disappearing when you move your mouse over to the menu to left click a menu item on that right clicked menu.
    SOLUTION FIXES PROBLEM.
    Thank You and i hope this answer my help any other people who have had this frustrating problem.
    cheers KiwiKev

  • Runtime Images are being loaded only when i move Mouse Over them

    Hi ,
    I am displaying Images on to a Datagrid at Runtime .
    The isssue is that Images are being loaded when i move mouse over the rows of DataGrid
    Please tell me , how to resolve this issue ??
    Thanks .

    If you know the size of the images, have the renderer return measuredWidth
    and measuredHeight that reflects the size of the image (or approximate
    size).  There should be past discussions on this topic.

  • With the newest auto update version of firefox there is now a white bar that pops up when you move your mouse over that area. i want that gone, how?

    when you move your mouse underneath the address bar a white bar pops up, this makes it so you can't click buttons or links on websites, like login buttons for example. also when in full screen mode you can no longer mouse over tabs at the top of the screen, only that white bar shows up. that prtty much kills full screen usage for me. so that popup white bar and the full screen with the white bar without tabs has just about ruined firefox for me. anyway to fix this would be great.

    '''''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]'''''
    <BR>While you are in safe mode;<BR>
    '''''Firefox Options > Advanced > General'''''.<BR>
    Look for and turn off '''Use Hardware Acceleration'''.
    ===============================================
    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!

  • I recently downloaded 2 movies in iTunes on my windows PC and movies will not play, they will open up to the main menu, mouse overs work as well as extra features.  However the main movies will not let you play.

    I recently downloaded 2 movies in iTunes on my windows PC and movies will not play, they will open up to the main menu, mouse overs work as well as extra features.  However the main movies will not let you play. On mouse over in itunes the 'play' buttion is not enabled, yet is however enabled on previously downloaded movies.

    For me I have follow several of the help articles. When I play the movie in iTunes the screen is black with no audio, the timer status says it is playing (although it does not work all the time). I am able to play and have audio on the extras. I tried to use just QuickTime to play the movie and that as well does not work. I have started iTunes in safe mode and when the movie would begin to play, iTunes crashes and I have to restart. I have tried fresh clean installs of iTunes as well as QuickTime with no luck.
    It looks to be a QuickTime problem however I cant verify that. Any help would be great.

  • Specific region mouse over effect(Button 1 fades out and Button 2 fades in).

    Dear All -
    I am new to Flash CS5 and building Flash navigation bar with buttons on it.
    Below is my problem description that I want to solve with your help.
    I have a rectangular bar and placed one small button(Button 1) on this bar. Also, I have similar button(Button 2) with some graphics on it which is of similar size as to previous Button 1.
    Button 1 - Without graphic.
    Button 2 - With graphic on it.
    What I want is that, whenever mouse is taken over Button 1 placed on the rectangular bar, it should fade out and simultaneously Button 2 should fade in. I want only button region to be sensitive to this mouse over effect and not the complete rectangular bar.
    Kindly let me know how can I define the specific region(button region only) to be sensitive to mouse over effect in flash, and how to place Button 1 and Button 2 in layers so that both are at the same positition(so that there is no displacement of button detected).
    Thank You,
    Saurabh Khanna.

    Hello -
    Thank you for the reply. Button 1 does not have glowing effect, whereas Button 2 has a glowing effect. So what I wanted is that when initially Button 1 is loaded during page load, when I mouse over Button 1, Button 1 would fade out and Button 2 sitting behind Button 1 would automatically look like fade in(due to gradual fad out of Button 1 on top of Button 2).
    I could do this now, and would like to Thank you for your reply.
    I did this by creating movie clip on "Over" event of Button 1 and changing its Alpha property. But now what I want is how to gradually fade out, means when I remove my mouse from over button, then Button 2 should fade out gradually which will automatically make Button 1 fade in gradually.
    I could not find the "Out" event just like we have "Over" event for Button, so I assume this can only be done using ActionScript somehow.
    Let me know if I am going correct with my assumption, and possibly if you could help me achieve the remaining half(fading out gradually when mouse is removed from the button).
    Thank You once again for your reply.
    Thank You,
    Saurabh Khanna.

  • Spry Menu bar mouse-over?

    Hi there,
    I have created a spry menu bar and it's almost finished but I am having trouble with these 2 things:
    1. Only the buttons that have submenus change when the mouse pointer moves over it. This happened when I applied a background image to the buttons.
    2. I don't want the background image to be applied to the submenu items. I want those to have just 1 color and another color when the mouse pointer moves over it. (If this last part isn't possible, I would just like the first part to happen: I want it to have a color and not the background image that I applied)
    Could you please have a look at my CSS and tell me what I did wrong? Or what I should add?
    Thank you very very much.
    EC
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    padding: 0;
    list-style-type: none;
    font-size: 155%;
    cursor: default;
    width: auto;
    font: "Bell MT";
    margin: 0;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 90%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: 204.8px;
    float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    z-index: 1020;
    cursor: default;
    width: 204.8px;
    position: absolute;
    left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 204.8px;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    position: absolute;
    margin: 0 0 0 0;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    left: auto;
    top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
    border: 1px solid #151515;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #EEE;
    padding: 0.5em 2.5em;
    color: #C3C2C2;
    text-decoration: none;
    background-image: url(Skyline/images/Background%20Menu%202.png);
    background-repeat: repeat-x;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    background-color: #414040;
    color: #C3C2C2;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #414040;
    color: #C3C2C2;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-image: url(Skyline/images/Background%20Menu%202.png);
    background-repeat: repeat-x;
    background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    background-repeat: no-repeat;
    background-position: 95% 50%;
    background-color: #414040;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    background-image: url(SpryAssets/SpryMenuBarDownHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    background-image: url(SpryAssets/SpryMenuBarRightHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;

    http://foundationphp.com/tutorials/sprymenu/customize2.php
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Why does moving the mouse over an IMAQ image display slow the GUI down so much?

    I have a large application with several vi's running simultaneously under labview 8.6.1.  When I mouse over an image display control in one of the vi's, everything slows down a shocking amount in all the other vi's.  The windows task manager does not show a large increase in CPU use.  My pc is has a quad cpu with 4GB of RAM, and the CPU and memory loads do not appear to be terribly taxing to the system.  However, many of my vi's apparently come almost to a standstill if I just move the mouse in a circle around my image control.
    This looks like it is largely a GUI display issue.  If I make a new vi and put a while loop in it that only displays the iteration loop number to an indicator, I can see the iterating occurring, then stopping totally when I mouse inside the image display control.  When I stop moving the mouse inside the control, or when I move it outside the control, the interation loop number jumps up, as if it had been incrementing behind the scenes the whole time.  So only display of the interating was halted.
    This problem occurs even if the vi with the image control is not executing.  If the vi with the image control is open but not running, and I mouse over the image on it, the other guis all come to a screeching halt.
    Does mousing in the image display control really utterly crush all other guis in all other labview windows?  Is this an issue inherent to the image display control?  If so, is there anything I can do about this? 
    Also, this issue is not entirely limited to display.  I started looking at it in greater detail because this issue also exposed what I think is a race condition in my code.  I have a vi that acquires an image from a ccd and puts it into an IMAQ image.ctl.  This image then gets passed up to a vi up the call chain, and is put on a queue and sent over to be de-queued by a vi that has the image display control.  Here's the kicker:  when I mouse over the image display control, the image successfully gets acquired inside the subvi, and if I probe the wire leading to the output IMAQ image display.ctl, I see the image.  If I simultaneously probe the wire coming out of the subvi one level up the call chain, the image gets lost about half the time.  This only happens if I am mousing in the image display control IN A TOTALLY DIFFERENT AND SEPARATE VI.  If I bump up the priority of the ccd image acquisition vi to 'highest priority', the problem only happens about 1% of the time, and I really have to mouse around to make it happen.  Still, it's disturbing that mousing in the GUI in one window results in a failure of a separate subvi to simply pass an image up the call chain.  I understand that IMAQ images are referenced rather than passed by value, but I don't see why there should be a failure to pass the image up the call chain.  I've looked for a race condition, but can't find one.
    Eric

    I have finally been able to replicate the behavior that you are seeing on another computer once the image was large enough.  Here are a few notes about this behavior:
    First. The UI only slows down when the images are large, 16 bit images.  The reason why this is unique to 16 bit images is that they can only be displayed on the front panel as 8 bit images.  The workaround that Weiyuan suggested to change the 16 bit display mapping hints towards the root of the problem...that any time a mouse runs over the indicator, Windows asks the entire image to re-draw (having a separate indicator overlapping the image will create the same behavior).  With a 16 bit image, not only does the image have to re-draw on the screen but the 16 bit pixels need to be mapped to 8 bits.  When setting the 16 bit display mapping to Full Dynamic, this requires mor computation/pixel than 90% dynamic or one of the other mapping schemes.
    This is expected behavior if your program is running and you're trying to display a large 16 bit image.  To fix this behavior there are a couple options:
    Change the 16 bit display mapping to something other than full dynamic.  You can choose which 8 bits to display or if you want to map the bits. 
    Resize the image just for viewing purposes on your front panel (since you aren't going to view every single pixel of you image on the screen). You can use the IMAQ Resample.vi to do this.  This will allow you to take your 1500x1500 pixel image and only display a 500x500 pixel version.
    If you are interested in viewing small details of the large image, consider just displaying a smaller region of interest at a time.
    Let me know if any of these solutions work for you.  Good luck on your application.
    Zach C.
    Field Engineer
    Greater Los Angeles

  • One more nugget: Chart zoom with the "Mouse Over" effect

    Hello all.
    Just read my signature first, it might explain a lot. I do not intend to compete with Darren and I don't think this "nugget" (at least it supposed to be one) will amaze any of the LV veterans and this forum is rich of them. But maybe it will bring some new ideas to some of you or maybe it will be useful for some LV beginners (like me). It is very likely, my code will have some lapses, but please be gentle pointing that out to me. If you feel a need, you can always optimize the code and develope it further. Just don't forget to share!
    So back to the point.
    I am developing a project using LV. In my program there is a waveform chart which has to show 4 plots. Depending on the length of the X Scale, it sometimes gets hard to see the plots clearly because of their density.So I decided that I need a tool, which would zoom the chart in. And this is what I have came up with after a few "Google" searches to check which part of the bike is already invented and also a bit of programming by myself. 
    Maybe you guys (at least the veterans) know the BetterVIEW Consulting LV example where they have implemented the Mouse Over effect. So a part of their example has been used in this tool and part of the credit must go to them. I thank them a lot
    This tool uses a cluster and its property of visibility to show/hide the cluster depending on if the current position of the mouse cursor is in the desired range or not. The program also gets the image of the chart and returns the subset of the image. The subset is taken for the area arounf the mouse cursor. So if you move the mouse, the zoomed in area will also chage in response. After that, the subset of the image is zoomed in for better view. 
    The user might chage the zoom factor during the execution. Also it is possible to turn the zoom option On or Off if you don't wish to see it for the moment. 
    This is how the front panel looks like:
    And this is the image of the block diagram (see the attached files for the vi, the VI Snippet tool distorts the code too much, so I haven't added it):
    I haven't found anything the same in the forum. Yet I'm a newbie here and I don't have that much experience surfing it. If it wouldn't be something new (in the forum, not necessarily to some of you personally), just ignore the thread. I hope this was worth your time and your attention. 
    Good coding
    Message Edited by Giedrius.S on 02-11-2010 12:46 PM
    While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that...
    Chart zoom with "Mouse Over" effect
    Attachments:
    Zoom.vi ‏198 KB
    Mouse_pos.vi ‏20 KB
    Check_pos.vi ‏18 KB

    Very nice Giedrius.
    It takes guts to "step up to the chalk board" so I will do what i can to give you some ideas to think about. This is similar to the type of feedback I offer durring our in-house code reviews.
    1) The floating property nodes outside the loop are not sequenced by wires so they could execute after the loop starts. Sometimes this could cause weird errors. Seq with the error cluster.
    2) Property nodes can be re-sized so you can apply more than one property setting in the same call. Property node have to execute in the UI thread (which is single threaded) so using a single nodes will force a single context switch rather than one for each.
    3) Setting the same property repeatedly in a loop just burns CPU. THe Scale min for both X an Y can be moved outside the loop ?
    4) THe Wait Until Next ms" function does not get used in any of my code. It is not a way to get a fixed wait but rather a random wait. If you code completes 1 ms after the next multiple, the delay is double less 1 ms. If you have multiple loops using them and it f the delay for each are not unique prime numbers, then the "Wait until next ms multiple" is a good (cough cough) way of getting them all to wake up at the same time and fight for the CPU.
    5)An Event Struture to monitor mouse enter/leave and mouse move (this would have to be a sepearte loop) is easier on the CPU than polling.
    6) Is that math in the case to handle the Chart position on the FP? If so then using the property nodes for the chart to find its postion will let you code adapt to GUI changes.
    7) Right to left wires are not well recieved.
    8) A Bundle by Name is prefered over a "Bundle" since it is self documenting. I know the Picture function so I can see that is the rectangle you are specifying but reader not famliar with that function would not be able to "READ" the code without poking at it.
    9) THe event structure would also help with setting the Zoom factor. Only poke it when you have to.
    That is all that comes to mind at the moment.
    Again thank you!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Mouse over - how to select text

    Hi all,
    I trying to build a function that when the mouse is moved over a text, then that text is selected and some actions are performed. At the moment I am using the g.drawstring() to place the text inside a jPanel, remember the XY coordinate of that text and then, when the mouseMoved event is trigger I compare the mouse position with the original drawing coordinate. It works fine if the string is single character, but it gets very complicated when the string is made up of several words "Hello Java" and I would like to select only the "Hello" or the "Java", as I don't know in advance the XY coordinate of the second word, as the font is not proportional (what I am doing now, is search for the " " and set boundaries of each individual word within the string...a bit cumbersome, but kind of works
    My Question is:
    is there a better way to place the string on the panel, other than the g.drawstring() that can make reading and identifying much easier? perhaps, placing the string inside some kind of other component which the mouse that 'identify' to be over more easily?
    thanks for the help
    P.S. I have read some posts, which address specific questions; mine is more a question on best architecture/availability of Java.components/API that can be used to do my task in the best way.

    thanks for your reply.
    I am basically trying to draw a node and edge pattern, where the nodes are the text strings and the edges are simple lines. posX and posY are the coordinate of where to strings are drawn. Now, what I would like to do is to move the mouse over and highlight (for exampl) the string but only single words, not the whole string (which could be, for exampl, "Hello Java"), so highilighting either Hello or Java, depending on where the mouse is. But I need to place the string (or the JLabel or JText) at specific posX, posY coordinates inside my JPanel.
    protected void paintComponent(Graphics g) {
    super.paintComponent(g);
    /** SOME CODE*/
    Font font = new Font("Arial Unicode MS", Font.PLAIN, 20);
    g.setFont(font);
    g.setColor(Color.black);
    g.drawString(textString panelXSize/2-posX, panelYSize/2-posY);
    g.drawLine(panelXSize/2, panelYSize/2,panelXSize/2-posX, panelYSize/2-posY);
    }

  • MOUSE-OVER MENUS & iWEB:   my crippled site

    For hours and hours, over the last several months, I've been working with a brilliant programmer who managed to write html/java script/CSS code that created mouse-over menus on my iWeb site. With the help of two additional programs - mass-replace-it and key-maestro, with one stroke, iweb properly exported to a local folder, mass-replace-it introduced my mouse-over code into all html files which were then uploaded to Go-Daddy via an ftp program.
    The result: a 95% near-hit––however, due to our inability to achieve 100% fully functional mouse-over/pull-down menu code, we both finally gave up.
    No joke, this has been one of the deepest disappointments of my adult years.
    Here's the link:
    www.petersolon.com
    I plan to keep up my crippled site for the nest 24 - 72 hours, hoping someone out there can convey why, when any one of a number of pages (for instance, go to "mission" which is one of the Intro pages) - in fact, when most pages, are refreshed, once, twice, 3 or 4 times (particularly in Firefox) - suddenly, entire navigation strings jumps down and beneath the line they should be straddling. In other words, for some unknown reason, again primarily (but not entirely) in Firefox (yes, we're using the latest version) refereshing page several times, at some point, pushes the primary navig. menus to a spot they should not move to.
    We tried every trick in the book, introducing older programming gimmicks like fixed tables, lengthening the "place-holder" iWeb entities that welcome/introduce the appropriate code for each page, getting the iWeb header out of the way, etc, etc - and yet, refresh 1, 2, 3 or 4 times whop/wham: primary nav menus jump down 100 pixels or so, below the very line they should be over - as if some "onload" or java script command or some unfathomable interaction between firefox and iWeb won't allow it to work.
    If anyone can help.....please––we came so close. Finally, programmer gave up due to sheer exhaustion, lack of options, as did I...
    Thanks so much in advance, Peter
    MacBook Pro   Mac OS X (10.4.9)  
    MacBook Pro   Mac OS X (10.4.9)  

    It's a font rendering problem, and it's a repeat-able
    problem in firefox, and to some degree in other
    browser also. I see it in firefox and safari on vista
    machine.
    Try to set monospace font size to something big like
    16-point, and minimum font size to none; play with
    font settings. You will see the problem.
    Cyclosaurus, I really appreciate your taking time to see if it reproduces.
    But it's not a font rendering problem--that much I know.
    In iWeb generated sites - probably sites generated by other software as well - upon refresh, there's often a slight bounce or movement and then movement back--this is for text, graphics, whatever. ("onload" command (??).
    On my site, in the code - only upon refresh (which is the really weird part) - there's something about the positioning of the primary nav string and its relationship to the pink graphic. At one point, each indiv primary navigation menu would "jump over" the pink graphic. However, we "tied" the indiv. primary nav menus to each other using a fixed table, (I'm not a programmer but from what I've heard, I guess this was a programming strategy that was common prior to css.) Anyway, now the whole string either jumps over the pink line - or doesn't - and - again, upon refresh - it also jumps back to its proper position. When it jumps back to its proper position (relative to pink graphic), mouse-over menus work fine.
    It seems to be related to primary nave string's position vis a vis pink graphic - and (weirdly) refresh.
    We tried removing the "on-load" command from iWeb's code but that didn't work. Tried removing height commands - but that didn't work. Tried removing all elements from a typical page, one by one - but that didn't work.
    Any further help would be appreciated...thank you much again....
    Peter
    Peter
    MacBook Pro Mac OS X (10.4.9)
    MacBook Pro Mac OS X (10.4.9)

  • Mouse over solution for jdk1.0

    hi all,
    I am interested in making the equivalent of a mouse over solution for a java applet.
    Basically I'll have approximately 100 Rectangle objects representing images on the applet.
    When the person moves the mouse over these 100 rectangle objects, i'll use contains() method to determine if the mouse is over the object in question.
    If true, the image will be changed to represent the mouse over event .
    I thought for a msecond about looping through all the rectangle objects each time the mouse moves. but that seemed impractical since the mouse can move pretty quickly.
    It seemed to me the best option was to extend the Rectangle object and put an event listener on it . so that the Rectangle object can be triggered at the same time or individually as needed in response to the mousemove event .
    Does anyone have any thoughts about that ?
    does anyone know how I would possible implement something like that for java 1.0
    thanks
    stev

    it seems like I have to extend Component some how to get access to enableEvents method.
    Here is my class
    class ListeningRectangle extends Rectangle{
         public ListeningRectangle(int w, int x, int y, int z, Component c){
              super(w,x,y,z);
              c.enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
         public void mouseMoved (MouseEvent me) {
         System.out.println("event has been received by rectangle");
    I am using this class in conjunction with a java applet (targetted to 1.0-1.1 ).
    I'm passing a reference of the applet in to create this ListeningRectangle like this
    new ListeningRectangle(a,b,c,d,this);
    my objective is to have about 100 different rectangle areas defined on the java applet.
    and when the person moves the moves the mouse of the applet rapidly, only the appropriate ListeningRectangle object would respond.
    any ideas on how to get this done ? ?
    The full code is below
    stephen
    ================================
    full source code below
    import java.applet.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestEventHandler extends Applet implements Runnable{
         ///variables
         public static Color bgColor = Color.blue.darker();
         private Thread thread;
         public Graphics offGfx;
         private Image offImg;
         private Image basicOffImg;
         public static int xlen;
         public static int ylen;
    public ListeningRectangle lr;
         ///methods
         public void init(){
         xlen = size().width;
         ylen = size().height;
         basicOffImg = createImage(xlen, ylen);
         offImg = basicOffImg;
         offGfx = offImg.getGraphics();
         setBackground(bgColor);
         offGfx.setColor(bgColor);
         offGfx.fillRect(0, 0, xlen, ylen);
         offGfx.setFont(new Font("Arial, Helvetica, Helv", 1, 15));
         FontMetrics fontmetrics = offGfx.getFontMetrics();
         offGfx.setColor(Color.white);
         String s = "pleaseWait";
         offGfx.drawString(s, xlen / 2 - fontmetrics.stringWidth(s) / 2, ylen / 2);
              lr = new ListeningRectangle(20,20,50,50,this);
              offGfx.fillRect(20,20,50,50);
         public void start(){
         if(thread == null)
              thread = new Thread(this);
              thread.start();
         public void run(){
              while(thread != null){
         try
              Thread.sleep(100L);
              catch(InterruptedException _ex) { }
         public void stop()
              if(thread!=null)
         thread = null;
         public void update(Graphics g){ paint(g);}
         public void paint(Graphics g){
         g.drawImage(offImg, 0, 0, null);
    public boolean mouseDrag(Event event, int i, int j)
    if(true)
    return false;//means ripple
    } else
    return true;//means do not ripple for jvm1.0
    public boolean mouseMove(Event event, int i, int j)
    if(true)
    return false;
    } else
    return false;
    class ListeningRectangle extends Rectangle{
         public ListeningRectangle(int w, int x, int y, int z, Applet c){
              super(w,x,y,z);
              c.enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
         public void mouseMoved (MouseEvent me) {
         System.out.println("event has been received by rectangle");
    }//end of class

Maybe you are looking for