So I guess you were not able to get it to boot from the optical drive, by quickly inserting the Mac OS X installation disc after a restart (or start from OFF) and holding down the C key...?
It may be hardware, but I was hoping you could boot the Mac from another system (such as the one on the Mac OS X installation disc), to rule out a problem with your current system installation. You don't happen to have an external USB drive with a Mac OS X installation on it, do you? You could back up your personal data (or clone the entire hard drive volume) to an external drive, do an +Erase and Install+ option reinstallation of Mac OS X, and test the optical drive.
Before you resort to something that drastic, try on more thing... Create a new admin user account in System Preferences
Accounts pane.
http://docs.info.apple.com/article.html?path=Mac/10.5/en/8235.html
Log out and log in to the new account (don't use Fast Users Switching). Test the optical drive from the new account. It's possible the problem is some corrupted preference file in your normal user account. If so, the drive may work in the new account.