Valued Principles
- Think about the tool you are using to solve a problem.
- Think if the approach you are using is the only approach.
- Are you asking the question correctly?
- Think if the approach you are using makes the most sense.
- Take time to consider and research *other approaches.
- Take a leap of faith once in awhile.
Fireworks is professional grade stuff and gets complicated quickly when dealing with layers, frames, animations etc. I must have looked at 3-4 *tutorials or approaches to creating what I was after.
After taking a break and going for a walk, I asked the question a little differently. This time I said "how to build an image rollover", omitting the word Fireworks. Quickly I was reminded that another excellent development tool Dreamweaver is at my disposal. I have been using Notepad ++ the past year or longer while doing my PHP development. It was fine. But, Dreamweaver is a much more feature rich program (IDE) than Notepad. I like the lightness and simplicity of Notepad, but for this case, Dreamweaver hit a home run.
Dreamweaver making things simple!
In about 2 minutes, I had dreamweaver open and was looking at this dialog.
No kidding, all I had to do was browse to and select each of my two images. Could it be any simpler?
After choosing the images and clicking OK, I had both the javascript needed to do the actual switching and the html to complete the trick. This is what Dreamweaver inserted into my document.
a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/staffphotos/james2.jpg',1)"I removed the opening and closing "< >" brackets.
img src="images/staffphotos/james.png" name="Image1" width="200" height="164" border="0" id="Image1" / /a
I moved the code into the proper location on the page, saved it and my image rollover worked like a charm!
One final thought.
I changed my php page to html.
I am so programmed to saving all my pages as .php, I forget, that if I am not going to the DB and if the page does not contain some other necessary scripting logic, I can create all my content (html, css, text) in a .htm or .html format. It is actually a little easier, because I am not having to echo ''; all the content.I changed the file housing the image rollover from .php to .html. Then I removed all the echo '' ing from the file.
Inspiration to use Dreamweaver and not Fireworks, dummy!

No comments:
Post a Comment