images in menus
Has anyone had any success inserting images in button menu contents for pulldown/cascading menus? Is this possible? John J. Theobald ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
re: Showing/Hiding Images on mouseLeave...
Igor de Oliveira Couto wrote some time ago: Dear Revolution Masters, I'm trying to implement a simple button that should use 3 different images: 'idle', 'over' (when the cursor in on top of the button), and 'down' (when the mouse is down on the button). Because the shape of the button is irregular, and I want the transparent bits to be ignored for mouse events, rather than specifying the images as icons in a button control, I used IMAGES. My idea was to setup the 3 images on a card, on top of each other, and simply show/hide each one in response to the appropriate mouse events. So I started by putting the 'idle' image on the card, and then the 'over' image on top of that, making sure the 'loc' properties of both was exactly the same (ie, they were exactly on top of each other). Each picture is exactly the same as the other, just using different colours... Now, I went into the scrip of the 'idle' picture, and typed: on mouseEnter show image over hide me end mouseEnter Then, I went into the script of the 'over' image, and did the opposite: on mouseLeave show image idle hide me end mouseLeave Now, what is happening when I use the browse tool is a bit of a puzzle: it goes like this: The card is displaying the 'idle' image. I move the cursor into the image, and presto, I see the 'over' image. I also know that the 'idle' image HAS been hidden - I can check with the message box... Now, I slowly move the cursor OUTSIDE the image, and... nothing. The 'over' image behaves as if it has NOT received the 'mouseLeave' message... I move the cursor back onto the 'over' image, and move it back out - now for the second time - and, presto, it works: it hides the 'over' image and shows the 'idle' image. The crunch of the matter is: I have to 'leave' the image TWICE for it to work... EVERYTIME! All I can deduct is that for some reason, the first time the mouse leaves the 'over' image, no 'mouseLeave' message is being sent to it! Only after the cursor has re-entered the image, and then proceeds to leave again, does it work... Am I missing something embarrassingly simple? Did I not read the documentation properly? Is this a behaviour that others have noticed? Is it a bug? Any help would be greatly appreciated! Kind Regards, -- Igor de Oliveira Couto -- [EMAIL PROTECTED] -- Igor, I ran into this problem on MC 2.4.3 while developing. I searched the archives and saw your posting along with numerous responses but no clear solution. Here is how I solved the problem, for those that may (or may not) be interested. I chased the problem like many others by trying to get the button to do what I wanted on the mouseLeave. Then it occured to me, if I am leaving one object, I must be entering another so... I simply put a transparent graphic behind my freeform shaped button. This graphic extends beyond the borders of my button. I then put this handler in the graphic. on mouseEnter put image normalstate into image goback end mouseEnter goback is the name of my freeform button, normalstate is the image I want displayed when I do a mouseLeave. Since leaving the button does not generate a mouseLeave (as you discovered), entering the transparent graphic DOES generate a mouseEnter and the opportunity to change the graphic. You could, of course, reference a file, imagedata (and maskdata if needed),or just a hidden image as I do. All of which were recently discussed in another thread. Sorry if this is old news, but since I did not see a solution posted, I thought I would pipe up. Regards, John Theobald ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Showing/Hiding Images on mouseLeave... IMPROVED
John J. Theobald wrote: erik hansen wrote: I simply put a transparent graphic behind my freeform shaped button. This graphic extends beyond the borders of my button. I then put this handler in the graphic. on mouseEnter put image normalstate into image goback end mouseEnter goback is the name of my freeform button, normalstate is the image I want displayed when I do a mouseLeave. Since leaving the button does not generate a mouseLeave (as you discovered), entering the transparent graphic DOES generate a mouseEnter and the opportunity to change the graphic. if the mouse enters the transparent graphic from the card, NOT from freeform btn goback? = [EMAIL PROTECTED]http://www.erikhansen.org __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution When the mouse enters the transparent graphic from the card, it naturally sends the same put to the freeform button. But, the normalstate is what already exists, so it does a put that is not needed. In my case I use imported images, so it is a memory copy, no disk I/O. IMHO this is negligible overhead while accomplishing the desired result. If you wanted to eliminate the put, just check the state of the image. Either way, the handler has to do some processing. John Theobald ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution Upon further experimentation, I found I did not like the solution I provided above because very fast mouse movements over the freeform graphic could potentially leave it in an undesireable state. I imagine this is due to the system mouse polling and it's inability to trap events under very fast movement and missing the mouseEnter on my surrogate graphic. So, I decided to write my own mouseLeave handler called checkMe for the freeform button that is 100% consistent and accurate and involves no surrogate graphics. I submit it as an improved and IMO more elegant solution to the mouseLeave issue. Any enhancement suggestions welcomed. on mouseEnter put image activestate into me send checkMe to me in 10 ticks # Check the mouseLoc for leave end mouseEnter on checkMe if within(me, the mouseLoc) then send checkMe to me in 10 ticks # Check back if still within else # otherwise put image normalstate into me # back to normal because we left end if end checkMe I should have done more testing before suggesting my previous solution, apologies to the list. John J. Theobald ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Stupid windowshape tricks
Scott Rossi wrote: Recently, Richard Gaskin wrote: Is there any cool hack to make resizeable windows from a custom windowShape? If you're talking about draggable, on-the-fly resize, that would be cool. Otherwise, I think the best you can do is simple a toggle action -- click and use the masked image you want as the new shape. Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design Email: [EMAIL PROTECTED] Web: www.tactilemedia.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard You can simply set the rect of the stack, but this crops based on the new rect. Not very pretty. You're really talking about two different parameters, shape and size. I have created odd shaped windows (very cool by the way Mr. Raney) and I have scripted hidden title bars to grab and move the window. But dynamically resizing the window means you would have to provide for resize handles to scale the image used for the shape and reset the windowShape once the resize was complete. Very messy ... not to mention the problems you'll run into with any holes (transparent areas) in the window, maintaining proportions, now gray masked areas, and controls that disappear because the visible window is no longer supporting them. If a hack could overcome these obstacles, that would definitely exceed my definition of cool. Maybe a small palette of pre-defined window shapes would make better sense. IMHO, if you go to the trouble to create a custom-shaped window, you probably don't want users resizing it and themselves into trouble. Unless of course Mr. Raney is working on something like... set the vector_based_odd_shape of this stack to insert formula here ... one never knows Regards, John J. Theobald ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard