Storing this in here for future reference (copied from Web Design group) | Verzonden: 27-11-2004 0:44 |
Let's see if we can clear this up with as few words as possible and still be clear. - Yes, you're right. Notepad can be used to edit and create code - I often use it myself since it's so quick.
- Computer code (or code words if you prefer) were designed specifically to make an easy way for people to talk to computers. You just type in plain text and the computer does fancy things.
- Rather than forcing each person to write a whole program each time they wanted to do simple, shared concepts, programmers made a bunch of common programs to do things which all browsers would share.
- Now, by just typing in the code words in the right order, you can trigger those built-in programs and do the same things. It's rather like the game of "simple Simon", only rather than saying to the computer, "Simple Simon says, 'link to this, go here!', you use special code words like '<HREF="blah, blah">'
- Now code can do many different things and each group of things is gathered together under a single "language" - a collection of (code) words designed to work together to make something happen.
- Those major groups are given a common "last name" or extension, which is placed at the end of the file name after a period mark and they're typically 3 letters long.
- Common extensions are .htm/.html (HyperText Markup Language pages)or .js (JavaScript file), or even .asx!
- Windows Media player uses an asx file to store information on servers (like the MSN Group site) and stream that information back as a playlist. ASX stands for Advanced Stream Redirector. It's similar to standard HTML tag but has a very different effect.
With me so far?
Now, lots of times, web design sites make the mistake of calling any code, HTML code. They say things like, "Just copy/paste this HTML code snippet into your editor" or, "Insert the code into your HTML editor/view". That really does confuse things since it's often not straight HTML at all.
HTML is for stucturing a page and giving the navigation around it. It's for things like links and setting up how the <BODY> of the page will look and even for explaining to the browser that you want this to be a webpage.
Many code snippets include those basic HTML tags to get it set up as a webpage and then include other languages to make things happen on the page. So it gets even more confusing to tell what's just for structuring the page and what's there to make things happen. On MSN Groups, the custom pages we can make (they have a special extension at the end of ".msnw") only allow limited structuring or HTML codes. They do not allow us to use those other languages to do interactive things - like making the jukebox play right there on that page at your Group.
The Make a Jukebox for your Groups* tutorial is a way to get around those coding limits and make music play.
Since the different code languages will work when stored as user-created files in the Group's Documents folder, we can make music play if it's stored there.
If you read through the tutorial very carefully, you'll find that we aren't making an actual HTML page in the Notepad - we're making a special file called an .asx file. That's going to work differently, instead of triggering the browser to create an actual webpage and play the music there, we make a playlist using the .asx extension and that triggers Windows Media Player to open and play while the guest is free to surf all over different web pages.
In Step#2 of the tutorial, you're copying some code (it's not HTML code but ASX code) into the notepad file:
<ASX Version = "3.0"> | This tells the computer, this isn't an HTML page, it's going to be a playlist written in ASX codewords, version 3. | <TITLE>Vocal's Midi Message Board</TITLE> | This is the title of the whole jukebox. Window dressing. | <ENTRY> | This says, "Get ready, here comes a song." | <TITLE>Ozzy Osbourne - Crazy Train</TITLE> | This says, "This is the title of the song", again, it's window dressing. The computer can only tell that this is a song <TITLE> and not a jukebox <TITLE> because of where it's found in the code - right after a "get ready, here comes a song" <ENTRY> tag. | <REF HREF="http:// | This is a very long way of saying, "Please look on the web for this file, | groups.msn.com/ | you can find it at MSN Groups, | WebDesign/ | at a certain Group site, | Documents/ | in that Group's Documents Folder, | midijukebox/ | in a special folder for midis, | crazytrain.mid" /> | and the name of the song is..." | | </ENTRY> | This says, "Here's the end of the song now, thanks." | The <ENTRY > to </ENTRY > tags repeat now for each new song. | </ASX> | This appears on the final line of the playlist. It literally means, "This is the end of the playlist, stop here." | That's all going into a Notepad file, you type it in as normal text.
Then, in Step#3 you save the file as an .asx file not a normal .txt (text only file)!
This is very, very important to understand. By giving it a special last name of .asx, you tell the browser to make this a playlist, not an HTML webpage, not simple text, nor a javascript or anything else.
Then you upload that (save it to the web server at MSN under your Group's Documents area).
Finally, when it and all the midi files (see? they have an extension of .mid to tell computers they're a music file.) then and only then do you need to look at actual HTML codes and webpages.
In the final step, you create and add a link which points to the .asx/jukebox file you uploaded and you add that link to a standard .msnw custom page at your Group.
Ours uses a fancy link hiding under a clickable image:
Click the headphones to listen now!
But it's just a standard HTML link tag pointing to our .asx file... see it at the end?
http://groups.msn.com/WebDesign/Documents/midijukebox/WDjukebox.asx We could have made it say "Click Here":
Click Here or "jukebox":
Jukebox It wouldn't matter. All that is on our real MSN Group page is a link pointing to a file in the documents folder. The magic takes place there when the file is run (by clicking the link) and the ASX file opens Windows Media and talks to it using the code words we picked.
At no time should the actual ASX code be inserted into the HTML editor of MSN, or it just won't work (it only reads HTML code words and spits out the rest as text).
That's not to say you can't also create full HTML webpages using Notepad as an editor. You could also upload those HTML webpages as files in your Documents area and they would work there too.
But you shouldn't need to create an HTML page for the jukebox tutorial, just an .asx file.
Long... but maybe a little clearer and it'll help with understanding all kinds of other things too.
Dee | |