Jump to content

thesoundsmith

Members
  • Posts

    154
  • Joined

  • Last visited

Everything posted by thesoundsmith

  1. Thanks, justsomeguy, I thought zero left the cookie alive till the browser closed. Changed the code to setCookie('visited','yes',null) and now Chrome and IE work correctly, but for some reason FireFox is not playing the sound. I'm hoping it's a cache issue, but I don't see the cookie on my machine.Solved: changed the cookie name and now everybody is happy. Thanks for the help.
  2. I want the home page at http://www.thesounds....com/index.html to play a brief piano phrase the first time a viewer enter the page, subsequent reloads to not play the file until the viewer closes the browser and ends the session. I don't want to use Session info, it's not ready across all platforms. I used a set of functions that work fine in a test page (http://www.thesounds...acookietest.htm but apparently either do not create the cookie or don't age it properly in the actual page. I don't see where the difference is, any ideas appreciated. <script type="text/javascript" src="smgr/script/soundmanager2.js"></script><script type="text/javascript">function getCookie(NameOfCookie){ if (document.cookie.length > 0) { begin = document.cookie.indexOf(NameOfCookie+"="); if (begin != -1) { begin += NameOfCookie.length+1; end = document.cookie.indexOf(";", begin); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(begin, end)); } } return null;}function setCookie(NameOfCookie, value, expiredays){ var ExpireDate = new Date ();ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));document.cookie = NameOfCookie + "=" + escape(value) +((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());}function DoTheCookieStuff(){visited=getCookie('visited');if (visited==null){setCookie('visited','yes',0)soundManager.setup({ url: 'smgr/swf/', onready: function() { var mySound = soundManager.createSound({ id: 'aSound', url: 'wavs/memintro.mp3' }); mySound.play(); }, ontimeout: function() { // Hrmm, SM2 could not start. Missing SWF? Flash blocked? Show an error, etc.? }});}}</script> <!-- SMGR setup --></head><body onLoad="DoTheCookieStuff()"> If I remove the cookie, the sound plays every time at http://www.thesoundsmith.com/indexOLD.html Just to make matters more interesting, after a couple test runs, my FTP functions either slow to a crawl or stop entirely, I am afraid something in the script is looping or messing with the server. Eventually it runs down, but ??? Again, any thoughts much appreciated.
  3. Thanks, DD. Yes that IS exactly what I asked for, I appreciate the philosophical underpinnings, it helps figure how to approach new coding. These days I take a LONG hiatus between programming bouts (last significant update was 2008), and forget everything I used to sort-of know. So my newer code is mostly cut-and-paste, throwing stuff at a page till it sticks, and cleaning up later... But I do like to see what's coming down the pike so I can minimize re-coding when old instructions are being phased out. (And I also love to learn, slow as I am.) So thanks again for the help.
  4. Again, I must have made a typo originally. AFAIK, there are 4 variations - using href= vs onclick= and with or without javascript;, all with window.close(). When I began this thread, I had already tried all four; none of the options worked, I do not know why. After Deirdre's Dad's post, I redid the link and it worked. He called it old-school, is onclick any newer? It also worked this time, I'm beginning to suspect I was using a close{} instead of (), it's a bit hard to see the difference.But all cases in IE generate an additional alert before allowing you to close. I am asking for a workaround, if any.
  5. What's the better way? I replaced the code with yours and it works now - but that was the original code, and it had failed - must have had a typo. But if there is a more modern method, I'd love to know it. Thanks.BTW IE still complains - the window closes, but complains. If you know the way around that issue, that would be an even greater help.
  6. The "Close" button in the player used to close the page, when I changed the DOCTYPE to HTML5 I now get a message that "/window.close() does not exist. Where does the slash come from, and how do I fix it? I tried javascript:window.close() with no change. <a id="btn3" class="button3" title="Close DashRadio" href="window.close();"></a> The page is at http://www.thesounds...com/radiopg.htm If you open it, a song will play, press the Pause button or player display to shut it up (the page is only called when you WISH to hear the music...) Thanks.
  7. Thanks, DD. And yes, those were headers from the 2008 update to css that I have not altered except for the last couple values,.Got it all compatible now, thanks. HTML "doesn't have to?" Interesting... :-)
  8. Deirdre's Dad, quick question: Now w3c doesn't like the closing characters in my meta refs. I just changed the DOCTYPE to HTML5 and now get these errors: Bad value keywords for attribute http-equiv on element meta. andBad value keywords for attribute http-equiv on element meta. "... smooth iOS" /> points to the ">" character as source of the error. What is the fix? And/or a link to (simple-to-understand, please) what is different in that doctypeThanks.
  9. Really? I had NO idea. Too much stuff to keep up with. I'll try it, thanks hugely. (Didn't even realize there WAS an HTML5 doctype...) And it WORKS! Thanks!
  10. Thanks. I tried all the variations, using %26 at least got a genuine error message from ZenCart, the other &amp both with and without a semicolon at the end result in a blank ZenCart page.
  11. I'm trying to send a link extracted from an XML playlist. A tyical list item looks like this: { file: "wavs/rhino/1-loveisblind.mp3" ,image: "pix/rhinette_LRG.jpg",title: "Love Is Blind",description: "Rhinoblossom",link: "private/zcart/index.php?main_page=product_music_info&cPath=62&products_id=242" }, I return the link by clicking a button: <a id="btn4"class="button3"title="Buy this Song"onclick="window.open(jwplayer(container).getPlaylistItem().link);"></a> This works perfectly; the user clicks and the link is followed to a ZenCart page. But it does not pass w3c, the ampersands need to be converted to & { file: "wavs/rhino/1-loveisblind.mp3" ,image: "pix/rhinette_LRG.jpg",title: "Love Is Blind",description: "Rhinoblossom",link: "private/zcart/index.php?main_page=product_music_info&cPath=62&products_id=242" }, The problem is, the ZenCart responds with a "blank" page(my site header and sidebar options, but no content, even though it displays the apparent identical address.) I can change either the link or the javascript call, but how can I best encapsulate the link so it works correctly and passes w3c? I tried single quotes, link: "private/zc... but they become part of the link address and resulted in "page not found." The working page is at http://www.thesounds...com/radiopg.htm and the one that passes w3c but fails the link is http://www.thesounds...om/radiopg2.htm Any ideas greatly appreciated.
  12. Thanks. I see the problem. It IS simpler just to incorporate the text into a larger image. Thanks.
  13. Hadn't checked since replacing the playlist. Here's THAT problem, if you know how to fix it, great: With the & in use, the link fails. Replace & with & and the proper linked page loads. Without it, ZenCart displays a page WITH THE PROPER URL, but no data beyond basic headers. The actual page data is not shown. I load the playlist via PHP, just for this sort of situation. I have switched it out for now to test, but unless someone has a solution to the ampersand wars, I'm stuck. There are now 2 errors, both in the javascript interaction, I'll deal with those separately - the ode works, so I'll clean it up when the rest is good. Now - I could just recreate the buttons with text already below, but I'd rather be able to restyle when needed.
  14. Seems like it should be simple, but I can't make it work.in the header a#btn1{position:absolute; left:10px; top:610px; background:url(pix/radnxt.gif); background-repeat: no-repeat; width:68px; height:68px;} in the body: <li><a id="btn1" class="button3" title="New Song" onclick="jwplayer(container).playlistNext();">New</a></li> The text is centered on the image, I need it below. What am I missing?The page in question is at http://www.thesoundsmith.com/radiopg2.htm Thanks.
  15. If I am not supposed to solicit a contractor, delete this with my apologies, I checked the guidelines and didn't see a problem with it. My site is at http://www.thesoundsmith.com I have been trying for some time to update the site to iPad/HTML5 support. The main site now functions smoothly and the javascript controls I used work in all the usual browsers - FF, Chrome and iOS, even IE is fine.The problem is with the "DashRadio" applet. In the pre-iOS versions, this is a menu item that opens a second window which remains independent, even if the rest of the site is closed. This "radio" allows the user to change songs and optionally be redirected to the ZenCart shopping cart to download a song or album. In FF and Chrome it works perfectly, in IE it will not show the player or recognize the script commands, something I recently discovered - this used to work, but I forgot to retest when I updated a year ago. Not important at this point, as i need to replace it. The working page is at http://www.thesoundsmith.com/lif.htm This page has DashRadio as the top left menu item. Now that I am offering iPad support, the menu version of DashRadio is not appropriate, so I am rebuilding the function as part of the footer of each page. I have a version which - at one point - did exactly what I wanted in FF and Chrome, but was not recognised by either IE or iOS. iOS will play files, but des not respond to the javascript. My test page is at http://www.thesoundsmith.com/aaradio5.htm (or aaradio4, 3, 2 for trying variations.) What has me totally frustrated is that when I started to write this post, the test page worked perfectly in FireFox, and my (first) question was how to translate the working page to the others - but ten minutes after it worked - several times, reloaded etc, still great - then it stopped and no longer reads the links. I need this radio to appear in the footers, and it will need a couple of more involved things - delayed loading of the 60K (and growing) palylist XML file, and possibly a way to keep the music playing even when changing pages.If anyone feels like tackling this I'd appreciate any help untangling the issues. I don't have time to learn another language just so I can sell songs on iPads. Let me know what you need.
  16. Great info, thanks to you both. I do not use Chrome, but it looks like I have a real reason to install. I have the majority of my site working fine now (the "radio" that started this is still in limbo, but I have some ideas...) The jw help I finally found the correct version (there is a different set for each version of the player) But the Chrome info is really useful.
  17. That's what I was looking for. That syntax and approach, I can make it work from there. Thanks again.
  18. Sorry, I think I have had to change focus, there may not BE a solution to a site-wide player. But what I am trying to do now is regain the ability to construct a playlist in XML that I can select songs from by calling sendEvent('ITEM',x) from a link elsewhere on the page. I have this in the old code on a number of pages, and planned on adding more, but the player as currently implemented cannot see these commands.: <h5><a class="tune" href="javascript:player.sendEvent('ITEM',1)">Celebration Blues</a></h5><p class="line2">Written for the 1993 Monterey Bay Blues Festival, this turned out to purely serendipitously echo the theme for that year, "Celebrate the Blues."</p> This works great on the rhinoOLD page with the older player, but to make it work on the updated one, I need to map the jwplayer "container" script call into the other player's code. Instead of the swfobject imbed. It seems that the embed is the equivalemt of the '.setup', but I'm not familiar with the syntax of that call, so I can't just re-build it. (And it seems every time they roll out an update, they use a different method to call the API, so all the previous work had to be rewritten.)It appears that in iOS, the radio will only work page at a time, but if I can get a fix on this part of the concept, I may be able to find ways around the iOS issues, or just give up - but at least have my pages working properly.I know I am behind in the prgramming realm, I stopped 12 years ago when I retired, and now try to focus on the music. I only update when technically necessary, and next round, if there is one, will probably need someone with a more up-to-date skillset. But right now, I'm what I've got. So if there is a simple way to remap this call to invoke the player I'd love to see it, I do learn best from example.Sorry to take up so much of your time, but if I get this cross-mapped successfully, I can deal with the rest.
  19. I'm sorry, I just cannot see how to map the two ways of accessing the API together. I have a fiarly involved bunch of script tha culminates with this call - and a long stream of flashvars, params and attributes: var attributes = { id:"player1", name:"player1" } swfobject.embedSWF("player.swf", "placeholder1", "540", "270", "9.0.115", false, flashvars, params, attributes);}</script></head><body onload="createPlayer('xml/mysonglist.xml')"> The page can be seen here: http://www.thesoundsmith.com/rhinoOLD.htm This works great until I address iOS, so I am trying to replace the swfobject embed call with some equivalent call to the API The code I have working to replace this is below, but the playlist is inline, and I cannot address the player except manually. I need to play specific songs on the playlist as demonstrated on the working page. <div id="container">Loading the player...</div><script type="text/javascript"> jwplayer("container").setup({ flashplayer: "jwplayer/player.swf", playlist: [ { file: "wavs/rhino/loveisblind.mp3", image: "pix/rhino72.jpg", title: "Love Is Blind", description: "Rhinoblossom" }, { file: "wavs/rhino/celebrationblues.mp3", image: "pix/dpic4.jpg", title: "Celebration Blues", description: "Rhinoblossom" }, { file: "wavs/rhino/damnyoureyes.mp3", image: "pix/rhino72.jpg", title: "Damn Your Eyes", description: "Rhinoblossom" } ], skin: "dashskin/dashskin.zip", "playlist.position": "right", "playlist.size": 260, height: 270, width: 540 , repeat: 'list' });</script> This page can be seen at: http:// http://www.thesoundsmith.com/rhino.htm iOS can access the music, but the direct calls on the lower part of the page are, of course, ignored.How do I call the "container" player - I left it container to differentiate - to map into the existing javascript controls? I only need server-based MP3s. Is it possible to write the call so I don't have to do a major rewrite of the 200-odd songs in the xml playlist? (I don't mind chaning "description" to "attributes" or the like, but I want to avoid hand-retiooling.Thanks as always.
  20. I used to use a couple php scripts to load the players, they worked great for .flvs but I have had to start from scratch with the mp4s. The playlists and the whole setup are different and I have not yet mapped my old scripts into the new system. But for now, this setup lets iPad viewers access the pages, and the radio just doesn't work. I can live with that for now.The DashRadio implementation incorporates all the other pieces I need to make the rest of it work. I expect to put the "radio" on each page, but it would need to play through when a page is changed - if a song is playing, it should not be interrupted. I was thinking of placing it at the bottom left of each page, replacing the Link Legend text.. But I assume that requires global variables and external event-listeners to be aware of the other players as well., so if you play a track on the body of the page, it shuts down the radio.i work best from example; JW had great examples of what I needed, but they don't translate into this problem (in a way i can understand.) I think I will spend some more time on the Safari link you sent, I may get some inspiration there.Thanks again.
  21. The "radio" window uses the JW Player v5, which supports HTML5 with Flash as a fallback, but I don't know how to re-script the playlist to recognise iOS requirements- just a part of my ignorance, I'm afraid, my main programming language was pre-Microsoft FoxPro,,,. But beyond that, the basic design will need to change,it does not appear that the main menu is a logical place, as iOS doesn't support little independent floating playback windows like Win7... That's kind of my question at this point - how can I incorporate the idea into a browser that does not support independent windows, and how do I change the XML script (or what do I change it into...) When I have the design concept, then I'll worry about the implementation, right now I just don't see how to fit it into an iOS-friendly design. Again, any help appreciated. and thanks for the link, there are some helpful nuggets there.
  22. My site, http://www.thesoundsmith.com/ has, as a feature, a mini "radio" station one can call up from the main menu displayed on all pages. On a PC, it calls up a small browser window sort of car-radio shaped, with a playlist of every song on my site worth listening to (IMO). Most of them have a lik to my shopping cart. You can select a new, random song, go back to the previous one or go to the Zencart shopping cart to download the tune.It is powered by an XML-based playlist selecting audio files. A short version is below: <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel> <title>DashRadio - The Soundsmith Channel</title> <link>http://www.thesoundsmith.com</link><item> <media:content url="wavs/rad/lcancestors.mp3" /> <media:thumbnail url="pix/lcicon.jpg" /> <title>Dance of the Ancestors</title> <description>Life Cycles</description><link>http://www.thesoundsmith.com/private/zcart/index.php?main_page=product_music_info&cPath=62&products_id=240</link></item><item> <media:content url="wavs/rad/lcdragons.mp3" /> <media:thumbnail url="pix/lcicon.jpg" /> <title>Hangin' with the Dragons</title> <description>Life Cycles</description><link>http://www.thesoundsmith.com/private/zcart/index.php?main_page=product_music_info&cPath=62&products_id=240</link></item>... <item> <media:content url="wavs/esp2/15.Fire_And_Rain.mp3" /> <media:thumbnail url="pix/esp2icn.gif" /> <title>Fire and Rain</title> <description>Especially For You Too</description> <link>http://www.thesoundsmith.com/private/zcart/index.php?main_page=product_info&cPath=71&products_id=297</link></item></channel></rss> I have just (mostly) finished upgrading to HTML5 playback so iOS devices can view the site. But I cannot figure out how to convert the DashRadio window. It will open on an iPad, but full-screen and ugly, and of course, does not play, nor does it apparently attempt to implement the associated javascript.At this point, I'd be happy if i could offer a radio without links to the downloads, perhaps a simple on-off swith on the menu, but i don't see how. (it's a php menu, if that matters...)Any ideas, suggestion are appreciated - I am NOT a cometent js programmer, so please don't assume I know what I'm talking about all the time. I do a lot of copy/pasting and testing to get these scripts to work, and don't always know why they do - and almost never know why they do NOT...Thanks.
  23. Ahh, I understand. Thank you. I was under the impression that checker did both.. I think it's all working now.
  24. Thanks. You are obviously correct, I removed the line to below the #header and it works. But W3C parser doesn't see it as an error, aI guess it's time to hit the books, because I don't understand why it is a syntax error. (Been awhile since I did any significant coding.), Thanks.
  25. I have a subheading on all of my pages that uses a multiplier in each page's style section to indicate how large to make the subhead - if it's long, it needs to be smaller...For some reason I cannot get the page to recognise the style - other pages with identical settings do (and there are still others that do not, but this is the most recent example.) I have cut and pasted from 'working' pages in case there was a typeo, but the inline element is not found. What am I doing wrong? The page I'm looking at is here: http://www.thesoundsmith.com/mr.htm The style info is: #header p#intro { font-size:200%; font-weight:bold;} and the body /header is: <div id="header"> <h1 id="logo-text"><a href="#" title="">Piano Power!</a></h1> <p id="intro"> Live at the Mission Ranch </p><?php require("menu.php"); ?><!--header ends--></div> On many pages this is fine, why not here? Inspector shows the #header #intro is not seen. Thanks for any ideas.
×
×
  • Create New...