Is there an easy way to control the down-state image in a simple navbar I created with swap image behaviors?
Here's a little script that will allow you to easily set the "down" state image on each page when using a swap image navbar:
1. Copy & Paste this into your page, in Source View, just before the ending </head> tag, but after any other <script> tags:
2. Add this to your <body> onLoad event,
the <body> tag will look like this:
3. Now, to activate this, you simply need to specify the name of the image that you wish to be in the down state. For example, if you want the image named "Image1" on your page to be in the down state, then locate this in the script you just added to the page:
change the "myImageName" to reflect the name of the image you wish in the down state, like:
4. The script uses a naming convention to append the existing normal image file name. For example, if your normal image file is "button.gif", then the script will append this with "_down", so it will assign the button to the image file "button1_down.gif". You can set the naming convention to anything you like, for example, if you are using "_f3" as the naming convention for your down image, then you can set this directly into the script:
Locate the third line in the "P7_downImage()" function:
to change it to use "_f3" as the down state naming convention, change this line so it looks like this:
5. Save the page. Preview to test. The image name that you set will always be in the down state.