|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 19
|
|
| Author |
|
|
Stranger Joined: Dec 23, 2005 Post Count: 6 Status: Offline |
Hi... using Frontpage 2003. I'm working on a music website that isn't on a server yet. On one of the pages, I'd like to add individual links to .mp3 files (songs of mine) that will be located on the server. They'll be about 4mb each so streaming may be needed. Any suggestions? Also, any methods for protecting their download? Thanks, Jon |
||
|
|
Advanced Member USA Joined: Oct 13, 2005 Post Count: 179 Status: Offline |
Here is one solution ... don't use frontpage. If you just put a link to the file you will end up with the user downloading it. Here is a link to a page that deals with linking to .mov and mp3s: streaming mp3s This will require a bit of java script and there may be other ways. I am not sure because I've never tried it. Here is another tutorial from a different site. I am at work (though eating my lunch at the moment so I really didn't have time to read through this one - sorry. Good luck! Randy ---------------------------------------- I made a 0 into a 1!!!!! ---------------------------------------- [Edit 1 times, last edit by revrandysausage at Dec 23, 2005 11:13:54 AM] |
||
|
|
Stranger Joined: Dec 23, 2005 Post Count: 6 Status: Offline |
Hey Randy, thanks for the tip and links! I'm going to look into this right now. Jon |
||
|
|
Advanced Member Joined: Sep 3, 2005 Post Count: 2206 Status: Offline |
The following code pasted into the head of the page will embed media player. Width and height are set to 0 so it is hidden. <script type="text/javascript"> function play(media){ document.getElementById('mediaplayer').innerHTML='<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"' +'type="application/x-oleobject" width="0" height="0"><param name="fileName" value="'+media+'">' +'<embed type="application/x-mplayer2" src="'+media+'" width="0" height="0"><\/embed><\/object>' } </script> Then in the body add links for each music source and add some styles with CSS. (Writing a fake url with a legitimate file extension for media player will serve as a stop funtion). Add an empty div at the bottom of your page with the id matching the javascript getElementById to serve as refrence for the javascript code. <ul> <li><a onclick="play(this.href);return false" href="SOURCE 1">1</a></li> <li><a onclick="play(this.href);return false" href="SOURCE 2">2</a></li> <li><a onclick="play(this.href);return false" href="SOURCE 3">3</a></li> <li><a onclick="play(this.href);return false" href="stop.m3u">X</a></li> </ul> <div id="mediaplayer"></div> To stream mp3s, create a file in your html editor, insert the url where your mp3 file is stored (for example: http://www.yoursite.com/sound/music.mp3) and save this file with an .m3u extension (somename.m3u) Repeat for each mp3 giving each a unique name. Upload these files to the directory where your mp3s are stored. Insert the URL for these files (not the mp3s) into your links. As for preventing people downloading them, there is no surefire way. Your best bet is to use low quality samples that will entice people to want to hear more and buy the CD rather than using the full length high quality version. ---------------------------------------- Quiquid latine dictum sit altum viditur |
||
|
|
Stranger Joined: Dec 23, 2005 Post Count: 6 Status: Offline |
Wow!.. Thanks for your time and effort here billyboy. I really appreciate it! I'll let you know how it turns out. Jon |
||
|
|
Stranger Joined: Dec 23, 2005 Post Count: 6 Status: Offline |
Fantastic... thank you very much! Works like a charm! One question: When moving objects and text from left to right, is it common to have a lot of " " in the code? I'm hitting the tab key and I'm seeing a lot of these. Thanks again, Jon |
||
|
|
Advanced Member Joined: Sep 3, 2005 Post Count: 2206 Status: Offline |
Hi Jon, Glad to hear the worked for you. is the html code for non-breaking line space. If you're using tab to move an element to the left you will certainly get a lot of them. It's an ugly way of positioning elements. You'd be better off setting the left margin of whatever it is you're trying to position using CSS. Bill ---------------------------------------- Quiquid latine dictum sit altum viditur |
||
|
|
Advanced Member USA Joined: Mar 24, 2005 Post Count: 3000 Status: Offline |
Great Post!!! One for the Bookmarks. Thanks. Re: FP2003 - it's ok to use in its Text Editor environment for hand coding. Using it as a wysiwyg editor will add those and other bloated code that makes the code unclean. - ---------------------------------------- "The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo Save the developers<!> Maine Webworks |
||
|
|
Advanced Member Joined: Sep 3, 2005 Post Count: 2206 Status: Offline |
I haven't tried this, but theoretically it should be possible to use that for any sort of player. The class id (clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95) and mime type (application/x-mplayer2) in that code refer to media player. You should be able to change those to match the correct class id and mime type for something different. A search would turn up what different players use. If you were using it to show videos or flash presentations you'd want to insert the code minus all the extra characters for javascript into the div and add height and width, and also add the same height and width to the javascript. What's happening is the javascript is writing the code into the div when you click on one of the links. Without the player there to begin with it would appear out of nowhere and cause display problems on your page. <div id="mediaplayer">Edit: Doh!! All you have to is define the width and height of the div with CSS to match the values used in the javascript. It will work for flash, here's the code from a test page with the correct class id and mime type. ---------------------------------------- Quiquid latine dictum sit altum viditur ---------------------------------------- [Edit 3 times, last edit by billyboy at Dec 24, 2005 2:20:52 PM] |
||
|
|
Stranger Joined: Dec 23, 2005 Post Count: 6 Status: Offline |
You'd be better off setting the left margin of whatever it is you're trying to position using CSS. Bill Ok then thanks... so far so good. I've inserted this CSS code: <head> <style type="text/css">p.leftmargin {margin-left: 13cm} </style> </head> <p class="leftmargin"><font size="7" face="Sylfaen">Music</font></p> Now, if I want to add text slightly below "Music" that's centered and of a smaller font, how would I do that? Jon |
||
|
|
|
|
|
Current timezone is GMT May 23, 2013 5:10:11 PM |