Question

Button rollover stays in downstate after being clicked.

Asked by: annas

When Creating a text based button in Fireworks, I want the button, after being clicked, to return to to the upstate instead of being locked into the downstate. how can I do this?
Annas

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-05-15 at 01:49:51ID20990337
Tags

button

,

rollover

,

fireworks

,

clicked

Topic

Adobe Fireworks

Participating Experts
4
Points
100
Comments
31

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Rollover and Stay - is there such a script
    I use a javascript at present which allows me to effect rollover or mouseover buttons - and it serves me well. However I'm looking for a script which will rollover but remain on the second image - is there such a beastie?
  2. Rollover images staying after clicking on it!
    Hi! i have used the Swap Image to have a rollover, but when the person click on it, i would like that this roll-over image stay there so they can know that they are on that section. So it's not in the onMouseOver and not in onMouseOut i think eh? Any idea how i can do that...
  3. Fireworks MX 2004=> How can I make the rollover ima…
    Hello all, I'm totally new to both Experts-exchange and Fireworks. My problem is, I have created a menu of rollover images in Fireworks using Button Symbols. First I copied my "homepage_up.png" file onto the "up" state of the button then copied "homep...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: itwerxPosted on 2004-05-15 at 04:03:48ID: 11074854

Hi annas,
I don't think that this is doable in Fireworks. (Of course I may be wrong and if anyone knows how, please correct me.) You might want to try doing this by modifying a simple "Rollover" JavaScript. Firstly create yourself a .js file. I usually call mine rollover.js but you can call it anything you like. This .js file will reside in the root directory. See below for an example:
----------------Example .js file----------------
*/Comment: Declare new images*/

      if (document.images)
            {
            button_Off=new Image();
            button_Over=new Image();

*/Comment: Add file source for images*/

            button_Off.src="images/btn_off.gif";
            button_Over.src="images/btn__over.gif";
            }
      else{

            }

*/Comment: Add the following for browsers that don't support images*/

            button_Off.src="";
            button_Over.src="";
            }
            }

*/Comment: This next part contains the two swap-images functions*/
      
      if(document.images){
            function btnOver(imgName)
            {
                  originalImage=eval(imgName + "Over.src");
                  document[imgName].src=originalImage;
                  }
                        }

      if (document.images){
            function btnOut(imgName)
            {
                  originalImage=eval(imgName + "Off.src");
                  document[imgName].src=originalImage;
                  }
                        }
---------------End of File------------------

Now to implement this we:
1. Insert the following between the <head> tags to link the page to our external .js file.

<script src="rollover.js" type="text/javascript"></script>

2. After inserting the image we are going to use as a rollover, we have to give it a distinctive name. In this example I will call it "link". So now our html for this image should read something like:

<img src="images/btn_off.gif" alt="Click Here" name="link" width="45" height="22">

3. We add the link (in this example to "newpage.htm")
         
<a href="newpage.htm" target="_self"><img src="images/btn_off.gif" alt="Click Here" name="link" width="45" height="22" border="0"></a>

4. Lastly we link our JavaScript by adding "onMouseDown" which will change the image when clicked on, and if you want it to restore to the upstate, "onMouseUp".

<a href="newpage.html"  onMouseDown="btnOver('link');" onMouseUp="btnOut('link');" target="_self"><img src="images/btn_off.gif" alt="Click Here" name="link" width="45" height="22" border="0"></a>

Hope all that makes sense. If you have any problems implementing this I will be happy to steer you in the right direction. Once you get the hang of it, you'll find it is very simple and can be utilised in many ways.

Cheers.

 

by: annasPosted on 2004-05-15 at 16:27:42ID: 11079256

Well.....I really wanted a fireworks solution since this is the fireworks forum.
Thanks, at least i know that fireworks is too limited for my purposes. I wonder why they would limit you to just one choice like that. It's a pretty expensive program to be so limited
Paul

 

by: itwerxPosted on 2004-05-15 at 19:10:42ID: 11079537

Paul,
Well...don't give up on fireworks just yet. It is a very versatile program. I have been using it for years and I have yet to discover all its capabilities. You may be able to achieve the result you are looking for by playing with the "behaviours" panel (Window>Behaviours).

Personally I find the Fireworks generated HTML to be cumbersome and unnecessarily complex so I tend to hand-code all my rollovers and effects. Hence my steering you towards a hand-coded solution for what you wished to achieve.

Cheers,
Justin

 

by: IammontoyaPosted on 2004-05-15 at 20:11:51ID: 11079660

Hey Paul,

It is unusual to have a down state that you're only using on the press of your mouse. The purpose of the downstate is really for navbars, and that is why the functionality is included in fireworks as suck. The whole idea is that in the navbar situation, the user knows which button on the navbar reflects the active page. If you're trying to circumvent that feature, then why not stick with rollovers? From a usability standpoint, your users are aware and understand the rollover effect, and a downstate that is only active on mousepress would be confusing.

:)

 

by: annasPosted on 2004-05-16 at 02:10:07ID: 11080360

I suppose so. I just wanted to mimic the action of a real pushbutton, ie push and release. Flash is of course the more versatile program and i could do it in that.. I ran acroos a tutorial once that told me expicitly to check some noption in creating the button that would let the button do jut that(stay down when clicked. Presumably, leaving the box unchecked, would let the button be released. I have since lost the link to that tutorial. I could also create the four states of the button in a drawing program and do i that way, but I would lose the effect I want to use fireworks for. That effect is the glow around text. Its a great way to give the the effect of a light comming on.

Annas

 

by: IammontoyaPosted on 2004-05-16 at 05:06:00ID: 11080622

Hmmm, but you wanted the "light" to turn off once the mouse is off the button. Right?

 

by: annasPosted on 2004-05-16 at 07:38:00ID: 11081017

Right.

Paul

 

by: webwomanPosted on 2004-05-19 at 11:41:30ID: 11110821

Then you want a mouseover and NOT a click. You can also set something to UNCLICK when you click something else -- this would be an image SWAP and NOT a mouseover.

Normally mouseovers are TWO states -- on and off. If you're generating something else, you may also be generating another PAGE. Normally if you click on something like that, you're supposed to be going somewhere.

 

by: Havin_itPosted on 2004-05-21 at 03:58:00ID: 11125385

Hey, not sure if I've come a bit off-track here, but if I understand from your first post, you want the button to 'light' when clicked, and 'turn off' when un-clicked (onMouseUp, lifting the mouse button).  If that's not correct, I apologize.

A close approximation of that in Fireworks would be to use an animation as the Down state, so it would unlight shortly after clicking (like a slightly stiff push-button perhaps?)

1) Draw your button (probably start with its Up state), then duplicate the frame and apply the glow effect to Frame 1.  Set looping to None and Frame delay to something under 50/100sec. (I found the default 7/100 a tad too quick for this, like blink and you miss it). Save as animated GIF.

2) Delete Frame 1 (which should be the Down state) and in the remaining frame, draw a slice (or hotspot) over your button.

3) Go to the Behaviours panel (this isn't open by default, but you'll find it in the WINDOW menu) and click the '+' button.  On the flyout, choose 'Nav Bar Down State'.

4) Change the radio button from 'frame' to 'file' and browse to your animation.  Preview the result, your button should show the glow for a split-second and then return to its Up state.  Don't know if it's quite what you were after, but hope it helps.

 

by: annasPosted on 2004-05-21 at 11:40:28ID: 11129175

Havin_it,
   I followed your steps closely. after saving the file,  as an animated gif I opened it to be sure it was animating and it was. I then performed steps 2 thru 4 . When I went to preview it I got the normal up button and the cursor changed to a hand I clicked and the button disappeared! I don't know what happened. I recreated the button and the same thing happened.
Paul

 

by: Havin_itPosted on 2004-05-22 at 04:20:51ID: 11132586

Hmm.  That's odd. Ummm..

Sounds as if the path for the GIF might be wrong in the preview, and it's not loading.  Try having a look at the source and see if the link is accurate - there should be atleast three references to it in the page, one in the <body> tag and two in the <img> tag .. I think.

FYI, I saved my Fireworks PNG in the same folder as the GIF before previewing - might have some bearing on the results.  Will have another look later, I'm away from my design-box right now.

 

by: Havin_itPosted on 2004-05-22 at 08:46:23ID: 11133454

Okay, I see what you mean now - seems to be some hinky behaviour in the 'preview' pane in Fireworks itself, not (as I previously assumed) in the browser preview.  Maybe it's because we're trying to look at an external image rather than a native part of the Fireworks document.

It appears you'll get that happening within Fireworks regardless of any other conditions.  But if you preview in your browser (F12 key) it should work okay, and export okay too.

 

by: annasPosted on 2004-05-22 at 17:56:58ID: 11135808

No, I got the same thing after I exported. Seems a shame I would like to get this to work I've wanted to create a "movie" whithin a "movie" . I've tried it with flash but couldn't get it to work there either.
Paul

 

by: Havin_itPosted on 2004-05-23 at 04:18:13ID: 11136953

Right, I'm determined not to be beaten by this!  Let's go back to the exported HTML code.  Can you identify the references to the animated GIF, and are the paths correct?  If you're not sure, you can post the code here.

Also, just for context, what version of Fireworks are you using?

 

by: IammontoyaPosted on 2004-05-23 at 19:42:06ID: 11140060

it can definitely be done in flash, btw. I can help w/ that if you dont get your answer w/ Fireworks.

 

by: annasPosted on 2004-05-24 at 11:08:13ID: 11145336

Thanks, guys. I do want to it in flash also lammontoya.
in the mean time I will see if I get the html code posted, if I can find it.
found it!

<html>
<head>
<title>testbut</title>
<meta http-equiv="Content-Type" content="text/html;">
<!-- Fireworks MX Dreamweaver MX target.  Created Mon May 24 13:48:34 GMT-0400 (Eastern Daylight Time) 2004-->
</head>
<body bgcolor="#ffffff">
<img name="testbut" src="testbut.gif" width="169" height="136" border="0" alt=""></body>
</html>

not very much here you would think there would be two images to corespond to the two frames.  I have the folder set to "filmstrip" and as soon s I click on the image(testbut.gif) the button glows once.  When I open the htm file in netscape, the button load, glows once and goes back to normal.  It's not acting like a button though no finger pointing hand when the cusor moves ove the button.

I tried it again, This time I got a msg that sait to choose export slices(already selected) This time I got the htm fle, and the hand moves over the button but when clicked I just get a smmaler version of the gray button. no image of the button glowing. I could email you the png file.
Paul

 

by: Havin_itPosted on 2004-05-24 at 13:59:56ID: 11146641

Yep, definitely something wrong there.  There's no ja vascript in that code, nothing to swap the images about.  Looks like somehow you've failed to apply the 'Nav Bar Down' behaviour to the slice.  You want the IMG tag to refer to the static image of the up state, and the script to tell it to swap it for the animation when clicked.

What you should be getting is something like this:

<a href="#" onClick="MM_nbGroup('down','navbar1','NameOfMyPNGFile','testbut.gif',1);">
<img name="NameOfMyPNGFile" src="NameOfMyPNGFile.gif" width="122" height="34" border="0" alt=""></a>

[Not to mention a pretty large script in the HEAD of the document]

Mail me the file if you like, my addy's in my profile.  In the meantime you might want to re-try applying the Nav Bar behaviour since that seems to be the root of the problem.

 

by: annasPosted on 2004-05-24 at 19:30:24ID: 11148284

I have tried applying the nav bar behavior several times and it still doesn't work I looked up your profile but didn't find an email addy listeded. If you want email me at paul01 at handleys dot us and I will send the png as an attachment in my reply. That way your email will remain private. Mine is a throwaway by virture of my server host . when I start getting to much spam I will delete it!

 

by: Havin_itPosted on 2004-05-27 at 03:40:40ID: 11170014

<takin' it to tha e m a i l>

 

by: IammontoyaPosted on 2004-05-28 at 04:55:42ID: 11179366

we're NOT supposed to give out email addresses in this forum. It is against the rules. With the benefit of email, I could have solved this problem for you the first time.

Please follow the rules of the forum.

 

by: annasPosted on 2004-05-28 at 07:04:18ID: 11180359

Well if you want to know the truth, email wasn't very helpful either. I only accepted an answer because I was getting tired of sppining my wheels. It's pretty apparent to me that Fireworks is not a soluion, only part of the problem. I will stick with flash and swishmax from now on. Too bad there is not a forum for either on this website.

I apologise for the email error. I wasn't aware of the that paticular rule. It was not my intention to remove the question to email anyway.

Like I said, Flash only from now on. Delete the question.
Thanks,
Annas

 

by: annasPosted on 2004-05-28 at 11:07:49ID: 11182790

let it stay like it is. I don't want any hard feelings. as for posting the solution I don't think there is one, but here's what what was emailed to me.
Paul,

OK I managed to get an impression of how your work was setup.  One main problem is your animation (frames.gif) wasn't sized correctly to swap with the slice you made over your 'up' button.  My bad for not mentioning this, but the GIF needs to be saved at the same dimensions as that slice.
That's why your downstate is appearing so small - your exported html is replacing an image about 134px x 62 px with one that's much larger - it solves this by squashing the GIF to meet these dimensions.  Also, it appears the GIF and the test.png file are at different resolutions - you should make sure both are at 72dpi (or 96dpi depending what you believe the browser can really render!)

I see you also left a lot of space around the button in your test.  In my example for a single button, the canvas was just the size of the GIF (no surrounding slices) but if you want to, for instance, do a series of buttons in one layout, positioning will be less easy.

In that case, I'd suggest making your layout with all the 'up' graphics first, then convert them to slices and for each one, copy the slice into a new document and use that as the starting-point of each animated GIF.

Hope all that makes sense, if not, I'll see ya back on the board.

Cheers,

Havin_it

Havin_it, I don't really understan what you are saying here(my fault, not yours:)). As far as the slices go, I just folowed step 2 in your instructions and made a slice exactly equal to the button. I've accepted your solution because you exerted the most to help me out, but like I said, I'll stick to flash from now on :). If the other experts disagee with this, we'll let a moderator decide
Paul

 

by: IammontoyaPosted on 2004-05-28 at 20:26:34ID: 11185486

I dont think there is a solution in Fireworks either. If you have trouble with this in flash, again, I can help you with that. Do you want me to create a flash example for you?

We all want you to get the answer you seek. That is truly why were are here. <smile>

 

by: annasPosted on 2004-05-28 at 20:38:14ID: 11185541

Sure that would be great! I am nervous about having you email it  though!
Annas

 

by: IammontoyaPosted on 2004-05-28 at 20:56:11ID: 11185606

heheh.. no need. I will post the fla :)

 

by: annasPosted on 2004-05-28 at 21:08:33ID: 11185641

great!
Paul

 

by: Havin_itPosted on 2004-05-29 at 01:25:51ID: 11186245

Sorry to have been involved in a bout of bad netiquette guys.  I did intend to post my comments on the PNG that Paul sent me, but I see he's covered that already.

It was a pretty simple error, relating to a finer point i didn't cover in my previous solution.  Paul's PNG had a small slice being replaced by a much larger image, which was therefore squashed into the dimensions of the slice and appeared smaller.  I simply trimmed the GIF down to the size of the slice, at which point the whole thing worked fine for me.  I'm not sure why it's still not working for you Paul, the PNG and exported HTML were checked before I sent them back to you.

So let's not be so fatalistic about Fireworks's capabilities here - I've used animations in this manner before and you can get some really nice effects for navbars etc.

 

by: IammontoyaPosted on 2004-05-31 at 20:50:27ID: 11200039

As promised, here is what you requested in Flash (MX version).

you can get your file at  http://www.realinteresting.com/flashexperts/tempdownstate.fla

if you want to change the number of seconds, change the code the number of milliseconds in the code to correspond to the number of seconds you would like the button to stay in the down state before changing over. The line says intervalID = setInterval(changeme,6000), or something like that. Change the 6000 to another number to lengthen or shorten the effect.

Bring on the points! hahhaha.. Im just kidding! I know the question had been accepted already. I'd ask the moderators to copy this thread on Flash, just in case someone needs it.

Let me know if you need assistance.

 

by: annasPosted on 2004-06-01 at 11:19:56ID: 11205577

thanks,
Iammontoya

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...