JavaScript - Adobe Flash Player Has Stopped A Potentially Unsafe Operation - Music Playlist, Help!
Hello guys,
I've made a music playlist where you should be able to listen to music (of course). All works fine, i am capable too listen to all the music in my playlist. But, when i reload my website and click on a song, it send me an error message - "Adobe Flash Player has stopped a potentially unsafe operation. If you want the program to communicate with Internet, click on settings." When i click on settings, i get another message - "Sorry, this page is not available". I had also another Option instead of settings which where, "ok". When i click on OK it works fine and it's no problem to scroll through the musiclist and listen to all of the soft songs. But i don't even want the message to appear from the very first time. Do you know what i should do to get rid of the message? Here's my code: Code: <!-- BEGIN JAVASCRIPT PLAYER EMBED CODE --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <div id="player-holder"></div> <script type="text/javascript"> var options = {}; options.playlistXmlPath = "playlist.xml"; var params = {}; params.allowScriptAccess = "always"; swfobject.embedSWF("OriginalMusicPlayerPlaylist.swf", "player-holder", "250", "250", "9.0.0",false, options, params, {}); </script> <!-- END PLAYER EMBED CODE --> Regards Webjoker Similar TutorialsI have a tiny flash player(with controls) in a table on it's own html page. It only plays one piece of music. But I need an unusual popup script which I can't seem to find. I want the tiny player (75 x 30) to popup on it's own without all the window (chrome?) surrounding it. I want it to be in either the top or bottom left corner. I would also like it to popup on load but turn off when I go to a particular page that I have a sound video on and then turn off completely when they leave the domain. It is a music site. Can some one please write a script like this for me and how do I get around annoying popup blockers. Hi, Is there any possibility of having the JW player playlist at the bottom. If possible can anyone post the javascript and its attribute for that. Thanks, Ananth From an iframe, I want to load and play a playlist in a wimpy mp3 player in the parent page. I can do it as if it is a popup window but it requires that from one iframe, I reload the player in the other iframe. Here are the functions given by wimpy: Code: <script language="JavaScript" type="text/JavaScript"> <!-- var wimpyWindow; var winOpen= 0; function wimpyPopPlayer(wimpyPopPage,theWidth,theHeight) { wimpyWindow = window.open(wimpyPopPage,'wimpyMP3player','width='+theWidth+',height='+theHeight); winOpen=1; } function wimpyPopPlayerWithFile(wimpyPopPage,initialFile,theWidth,theHeight) { wimpyWindow = window.open(wimpyPopPage+'?theFile='+initialFile,'wimpyMP3player','width='+theWidth+',height='+theHeight); winOpen=1; } function wimpyIsOpen(){ if (winOpen==1){ if (wimpyWindow.closed){ return false; } else { return true; } } else { return false; } } function wimpyPopAndPlay(startOnLoad, theFile, theArtist, theTitle, graphicURL, hotlinkURL){ if(wimpyIsOpen()){ wimpyWindow.wimpy_addTrack(startOnLoad, theFile, theArtist, theTitle, graphicURL, hotlinkURL); } else { wimpyPopPlayerWithFile('home2.shtml',theFile,'325','350'); } } //--> </script> Is there a way to do it that targets the player in the iframe without treating it like a popup window? Any help greatly appreciated! I hope someone can help me...I need to tweak this code so that background music will play randomly for an unlimited time. Right now, it plays a random song and then repeats it over and over. I just need to have it randomly change songs and keep playing! Here is the code I am using... Code: <script type="text/javascript"> var musicSource = [ "http://www.bigmacktrucks.com/music/1.mp3", "http://www.bigmacktrucks.com/music/2.mp3", "http://www.bigmacktrucks.com/music/3.mp3", "http://www.bigmacktrucks.com/music/4.mp3", "http://www.bigmacktrucks.com/music/5.mp3", "http://www.bigmacktrucks.com/music/6.mp3", "http://www.bigmacktrucks.com/music/7.mp3", "http://www.bigmacktrucks.com/music/8.mp3" ]; var rand = Math.floor(Math.random()*musicSource.length); document.write('<embed src="'+musicSource[rand]+'" autoplay="true" hidden="true" loop="true" />'); // --> </script> I think this is simple but I am a total noob at javascript! Thanks in advance! Hey all, I've built a website for my music and I'm fairly new to all this so bear with me. Essentially, I have two flash-based music players on my site. One is a simple single-track player that auto-plays some background music for the site. The functionality is limited to the user starting/stopping the music and adjusting the volume. The other is an advanced music player featuring a playlist of preselected tracks and allows the user to start/stop music, rewind, fast forward, adjust volume and select tracks in the playlist. This player does not start automatically. My question is this: when someone visits the site, the single-track background music player will start. Is there code that would allow the advanced music player, should it be turned on (i.e. someone selects a track and plays it), to override and actually stop the play of the single-track? TIA! I just added the SCM Music Player script to my WordPress site but now whenever I navigate to another page or news post the URL address doesn't change. The address bar stays static. How can I fix this? Here is the script code which was placed in Header.php within the <Body> tags: ======================================== <!--SCM Music Player by Adrian C Shum - http://scmplayer.net--> <script type="text/javascript" src="http://scmplayer.net/script.js" ></script> <script type="text/javascript"> SCMMusicPlayer.init("{'skin':'skins/black/skin.css','playback':{'autostart':'false','shuffle':'false','volume':'50'},'playlist':, <!-- playlist songs inserted here --> 'placement':'bottom','showplaylist':'false'}"); </script> <!--End of SCM Music Player script--> ====================================== Should I be adding this code someplace else? Thank you! so i am trying to make a music player where you select a song from a drop down list and then click submit. it then brings up the audio controls with the HTML5 "<audio>" tags and then you can click play and it should work. i am having trouble actually doing this though. the html is Code: <html> <head> <title>Music Player</title> <script language="javascript" type="text/javascript" src="popup.js"> </script> </head> <body bgcolor="000000"> <font color="lime" size="6"> <div align="center"> <u>The Mighty Peacock Music Player</u> </font> <br> <br> <font color="red" size="5"> <select id="convert_to" name="convert_to"> <option value="danza" id="danza">Danza Kuduro by Dan Omar</option> <option value="iron" id="iron">Iron by Woodkid</option> <option value="boot" id="boot">Das Boot by Vat19</option> </select> <br> <input type="submit" value="submit" onClick="dispResults(convert_to)"> <p>The song selector is not functioning yet. Sorry for the inconvinence.</p> <br> <br> <div class="music_box" id="music_box"> <audio src="/music/Danza Kuduro.mp3" controls="controls"> </audio> </div> </div> </body> </html> and the javascript is Code: function dispResults(convert_to) { if (id == "danza") { document.getElementById("music_box").innerHTML = "<p>" + <audio src="/music/Danza Kuduro.mp3" controls="controls"></audio> + "</p>"; } if (id == "iron") { document.getElementById("music_box").innerHTML = "<p>" + <audio src="/music/woodkid.mp3" controls="controls"></audio> + "</p>"; } } any help would be greatly appreciated. Thanks I am trying to make it so that when the page loads, it will random play a song from a list of songs. Also, when the first song finishes, another random song should play. I have this code: Code: <script type="text/javascript"> var numberOfSongs = 5 var sound = new Array(numberOfSongs+1) sound[0]= "music/Rock/1.mp3" sound[1]= "music/Rock/2.mp3" sound[2]= "music/Rock/3.mp3" sound[3]= "music/Rock/4.mp3" sound[4]= "music/Rock/5.mp3" sound[5]= "music/Rock/6.mp3" function randomNumber() { var randomLooper = -1 while (randomLooper < 0 || randomLooper > numberOfSongs || isNaN(randomLooper)){ randomLooper = parseInt(Math.random()*(numberOfSongs+1)) } return randomLooper } var soundFile = sound[randomNumber ()] document.writeln ('<BGSOUND SRC="' + soundFile + '" loop=5>'); document.writeln ('<EMBED SRC= "' + soundFile + '" loop=5 PLAYCOUNT=3 hidden=true autostart=true><P>'); </script> How would it be possible to play another random song after the song finishes? I have 3 tabs with a flash video playing in each. If a user clicks on a video and then decides to move to another tab while the video is playing.... the video stops and the tab is switched. I am using the code below to achieve that. Code: onClick=player1.sendEvent('STOP'); player2.sendEvent('STOP'); player3.sendEvent('STOP'); this works fine if I have the tabs appearing in sequence with player1 embedded in the first tab, player2 in the second and player3 in the third. However, I wanted to randomize the tabs, in which case if tab 3 containing player3 appears first and is played and then the user switches to another tab the video keeps playing.... meaning the above code does not work in that instance. I am at a loss here cause i thought that the onClick event should be going through all the players and stopping them. website: http://tinyurl.com/ydalz2r (at the moment the tabs are displayed in sequence) I put together a custom audio player using code from a few players. http://66.147.244.101/~fastlif2/wp-c...mp3player.html The player works in CHROME perfectly. The AUDIO tag supports mp3's in Chrome. However, there are compatibility issues in other browers. The audio tag works in FireFox, but only with ogg files (which I don't have). And IE is pretty useless. So, I need to have the player play in Chrome normally (as it is now). If the browser does not support mp3s or the audio tag, I want to default to my Flash player. And, if flash isn't supported, then I want to have a download link. I thought that if the browser didn't support the audio tag, it would default to the embed code that I have listed in there ... but it isn't working. Odd. Any idea what is wrong? Since I am not a strong javascript programmer, I need some way to check this. Also, there is so much javascript, the I am very hesitant to play with the code anymore (as I may mess it up). Please help Hi, I am a JavaScript novice, and appreciate any help you can give. For design reasons, we did not like the appearance of a still video on our web page. So I write a short little script to replace a picture that we selected, with the code for a flash player, once the image was clicked. The code works exactly as designed on IE and Chrome. It works *almost* as designed on Firefox and Safari -- but on those browsers the "fullscreen" button in the plugin doesn't work. It is *not* a problem with the FlowPlayer code. If I simply put the FlowPlayer code into a web page, it works fine. I think that somehow some browsers do not want to let the FlowPlayer expend outside of the JavaScript object box I created -- though that is just an hypthesis. If you have any insight or suggestions, I would appreciate it. The page is at http://sudval.org/test.html The code: Code: <div style="line-height: 12px;letter-spacing: 0px;"> <script type="text/javascript"> function changeText(){ var strOut; strOut = " <object id=\"videoplayer\" width=\"334\" height=\"204\" type=\"application/x-shockwave-flash\" data=\"http://app.provdn.com/flash/flowplayer.swf\">"; strOut = strOut + " <param name=\"movie\" value=\"http://app.provdn.com/flash/flowplayer.swf\" />"; strOut = strOut + " <param name=\"allowFullScreen\" value=\"true\" />"; strOut = strOut + " <param name=\"allowscriptaccess\" value=\"always\" />"; strOut = strOut + " <param name=\"flashvars\" value=\"config={\'playlist\':[{\'url\':\'http://cdn.provdn.com/4931/thumbnail/frame_0000.png\',\'scaling\':\'fit\'},{\'url\':\'http://app.provdn.com/output_videos/0e7c9ace9c16d4351b5108133cf1efaceebe89bb\',\'autoPlay\':true,\'scaling\':\'fit\'}],\'plugins\':{\'controls\':{\'url\':\'http://app.provdn.com/flash/flowplayer.controls.swf\',\'playlist\':false,\'backgroundColor\':\'#000000\',\'tooltips\':{\'buttons\':true,\'fullscreen\':\'Enter Fullscreen mode\'}},\'bwcheck\': { \'url\': \'http://app.provdn.com/flash/flowplayer.bwcheck-3.1.3.swf\', \'netConnectionUrl\': \'http://cdn.provdn.com/bitrate/test.mp3\', \'bitrates\': { \'http://app.provdn.com/output_videos/542539e49d4056ce6d3968958313be3dee94614b\':200, \'http://app.provdn.com/output_videos/d31b9a3562c35244cb2c2a28bb4a9aaa1edd1995\':600, \'http://app.provdn.com/output_videos/0e7c9ace9c16d4351b5108133cf1efaceebe89bb\':1000 }, \'urlPattern\': \'{1}\', \'urlExtension\': \'swf\' }}}\" />"; strOut = strOut + " <param name=\"bgcolor\" value=\"#000000\" />"; strOut = strOut + " <param name=\"wmode\" value=\"opaque\" />"; strOut = strOut + " <!--[if gt IE 6]><!-->"; strOut = strOut + " <object width=\"334\" height=\"204\" type=\"video/quicktime\">"; strOut = strOut + " <param name=\"src\" value=\"http://cdn.provdn.com/4931/thumbnail/frame_0000.png\" />"; strOut = strOut + " <param name=\"href\" value=\"http://app.provdn.com/output_videos/54339bc0f4a7c39dd0d746f52139d3a6b6c46375\" />"; strOut = strOut + " <param name=\"target\" value=\"myself\" />"; strOut = strOut + " <img src=\"http://cdn.provdn.com/4931/thumbnail/frame_0000.png\" width=\"334\" height=\"204\" alt=\"No Video\" title=\"No video playback capabilities.\" />"; strOut = strOut + " </object>"; strOut = strOut + " <!--<![endif]-->"; strOut = strOut + " </object>"; document.getElementById('boldStuff').innerHTML = strOut ; } </script> <b id='boldStuff' onclick='changeText()'><img src="images/videoimg.png" alt="no video" title="Introductory Video" width="334" height="204"></b> <p><A HREF="/08_cont_03.html"><img src="images/OH012211.jpg" alt="button" width="161" height="181" title="Open House!" BORDER="0" ALIGN="right" style="margin-left: 10px;"> </A></p> <font size="2" style="font-family:arial; font-size:80%; line-height:1.3;"> <p id='boldStuff' onclick='changeText()' align="left"> This video is a glimpse into the life of our school. Enter a world of young people who are exuberant about their lives, and are fully in control of their education. We hope you will enjoy their spirit, their focus, and above all their intensity in pursuing their passions. <br><img src="images/playvid.png" alt="Play Video" title="Play Video" width="100" height="25" style="margin-top:10px;"> </p> </font> </div> Hi all! I started using the JS-based Free Flash MP3 player on a site, but I'm stuck on what I thought would be a simple step. I tried their site for help, but at first their contact form was broken, and now their site is no longer up Here's what I'm trying to do, I need this player to access an external folder to generate the playlist. However, the player says to use a "relative" path only: Code: <!-- Script that embeds player. --> <script language="javascript" type="text/javascript"> var so = new SWFObject("flashmp3player.swf", "player", "675", "300", "9"); // Location of swf file. You can change player width and height here (using pixels or percents). so.addParam("quality","high"); so.addVariable("content_path", "http://www.blessedhopeministries.com/sermons/Rev.%20Eddie%20Conard/"); // Location of a folder with mp3 files (relative to php script). so.addVariable("color_path","default.xml"); // Location of xml file with color settings. so.addVariable("script_path","flashmp3player.php"); // Location of php script. so.write("player"); </script> I need it to access: http://www.blessedhopeministries.com...ddie%20Conard/ These are both of my client's sites, but I'm just trying to upload to one central folder so that two players on two separate sites can access the same files. Here's a piece of JS that is in a .php file associated with this player. I'm not sure if it will help, but here it is: Code: class ID3{ var $file_name=''; //full path to the file //the sugestion is that this path should be a //relative path var $tags; //array with ID3 tags extracted from the file var $last_error_num=0; //keep the number of the last error ocurred var $tags_count = 0; // the number of elements at the tags array I'd appreciate any help from you pros and I apologize if I didn't post in the correct place. Thank you! <script type="text/javascript"> function disp_confirm(){ var name=confirm("Are you sure that you want to do this?") if (name==true){ perform database delete here }else{ document.write("Cancel!") } } I'm not sure whether this can be done, but can I perform a database delete where indicated? Can you suggest a code snippet so I can see the style? Thanks for your help. hi, how I can execute this operation : for example x=a+b where "a" it can have value 0 or 1 based on the selection of the radio button. when a user select 1 on the radio button x=1+b when user select 0 x=0+b . please help me. are these right ya? '3' !=='smith' true "test" == "test " true '2' != 'smith' true "exam" == "Exam" true 5 === "5 " false "t" > "T" false "y" >= "p" true "Happy" == "happy " true I cant work out why I am getting this in Safari 4 and there doesnt seem to be anything around on google about it? Any help would be massively appreciated on this. Safri error console tells me Code: Refused to set unsafe header "Connection" from my ajax call. It works fine in all other browsers. heres the Ajax call (adopted from Pro javascript techniques and a few otehr places) ********** EDIT my bad this is an error totally unreleated to this issue. HI, we suppose of being able to choose on a various menu drop down functions, for example: pippo=a+b pippa=a-b cippa=a*b zippa=a/b using a menu drop down for the choice of the operation pippo, pippa,cippa,zippa, how I could make this script . PLease help me Hi there everyone I'm new here and to the world of coding in general. I have my own site now on it's third build. The second build was done by a someone else using ASP and database type things, which I don't really understand. Since I can no longer seem to contact him I'm trying to update the site myself but I'm having some trouble. I have a page on my site which contains a flash video player with and xml based playlist, however when I access this page from my main computer the page produces an error message which reads 'playlist could not be loaded due to cross-domain policy restrictions'. If I add www. to the address then it works fine. I'm unsure of how to rectify this or whether it is a problem for anyone else viewing the site: williammorrismusic.com/video.asp Below is the code I have used for the player: Code: <script type='text/javascript' src='http://www.williammorrismusic.com/swfobject.js'></script> <div id='mediaspace'>This text will be replaced</div> <script type='text/javascript'> var so = new SWFObject('player.swf','mpl','640','560','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('playlistfile','http://www.williammorrismusic.com/playlist.xml'); so.addVariable('backcolor','000000'); so.addVariable('frontcolor','ffffff'); so.addVariable('lightcolor','ffffff'); so.addVariable('screencolor','000000'); so.addVariable('playlist','bottom'); so.write('mediaspace'); </script> Any help on this would be most appreciated. |