This section is where you will find techniques to create great graphics using Paint Shop Pro.
If you have a question or a tutorial you would like to share E-Mail us and let us know!


Midi Player Java Script

1998

This tutorial created by Tom Stack

Play Midi file


Your welcome to download and use the midi player image above, it is included with the script in the download.



My Midi Player tutorial was featured in the May 1998 issue of German computer magazine "PC Online".

To test click the above Midi Player graphic. Time the Midi file loading, thats how much time you will be saving using this script. If you had a file, say 100K, thats a lot of loading time. Loading will be axelf.mid 25K. Start the timing when the popup window appears.

This Java Script is designed to help your pages load faster if you have midi files on your web page. When your page loads using this script, it does not have to load the midi file giving your graphics more freedom to load. It also gives the visitor the option of listening or not listening to the music. The setup is done in the six (6) easy steps below.

1. Copy the JavaScript by selecting File || Save as and save this page to your hard drive.
2. Open the saved htm/html file and copy and paste the script code highlited in Image1 below to your htm/html page. (Copy from the saved htm document and not the image) Place it in one of two areas, between the TITLE and HEAD tags (or) just below the BODY tag.

Note: You can also copy the script by clicking View/Source on your browser, highlighting the script by running the pointer acrossed it, press ctrl + c on the keyboard and pasting to notepad to save it.

Script
Image1

3. In Image2 example, copy and paste the highlited text and place it in your document where you want the link to be. (Copy and Paste from the htm/html source and not the image).

4. You will need to enter your midi file name in the highlited orange area.

5. In the medium blue area you can put your image or text for the link. The Center tags are optional and can be removed.

6. Your midi file has to be in the same directory as your htm/html page. If you have your midi's in a sub-directory, then the sub-directoty must be listed in the orange area with the midi file, ie ('sounds/axelf.mid').

Script
Image2

Enjoy the script. If you have any problems or questions, my email link is at the top.


When you are finished viewing this page,
close this window to go back to the Tutorials index.