JavaScript - Flash Player, Tabs And Javascript
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) Similar TutorialsHi, 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 experts, I need to open same url (flash streaming site) on multiple tabs (min 100 tabs) without crashing my browser or drinking all my cpu usage. Pls dont ask me why i need to open like that. The question is can it be done. Thanks I 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. 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 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 Hello! I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once. Does anyone know how to do this please? Thanks so much for your help. 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! hie everyone plz i want to know how to make tabs using javascript.... i want to make tabs like this website http://traveline.idea-sys.net/CSP/Default.aspx?A=2&P=50 --> (M/S Darakum - Description / GalleryDeck / Plan) can anyone help me plz? Hello, It is my first post here so hello everybody I am currently building a website and it is the first time I have experimented with ajax, jquery etc etc so forgive me if I come across as a bit of novice in all this but ......... I am. lol I have a column of links that use ajax to load content into the adjacent DIV, and I have used the loadobs function to load the JS and CSS files along with the external file. Now within the external file I have used javascript to create a 3 tab section; when you first load the page it is fine BUT if you navigate away from the page and then try going back and loading the same external page then the tabs stop working and all the content of the tabbed sections stack ontop of one another as though the javacript isnt working? I am completely new to javascript but I think it is fabulous and I am keen to learn the ins and outs and would be really greatful if someone who knows what they are doing could point me in the direction of where I am going wrong or maybe what part of the code could be causing the error. It is a work in progress but the page I am having the problems on can be found at http://www.hm-designs.co.uk/crossland/solo.php if you click on the top link in the left hand column called Tara - Female vocalist you will be able to see where the tabs are. Thank you in advance if anyone may be able to help me Kind Regards, Helen I have an javascript coding issue with regards to a tabbed menu. The code is supposed to hide the unselected divs and show the selected div, but all divs are showing and no tab is selected when the page initialises. The source code is viewable he http://www.kenaani.co.uk I was following this tutorial: http://www.elated.com/articles/javascript-tabs/ Which works fine in this example: http://www.elated.com/res/File/artic...ript-tabs.html I have tried commenting out the other scripts, and the divs still show on the page, so I don't think its a conflicting issue. Am hoping that someone can spot whatever is going wrong. 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 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! 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? Hi, I am trying to run multiple videos in the JW player by clicking on different links.Its working fine in chrome and firefox, But it doesn't play viseos in IE. Kindly suggest me ...Thanks in advance..Here is the code. <script type="text/javascript"> function start(){ return playVideo("mediaspace","mediawindow"); } function playVideo(sourceId, targetId) { if (typeof(sourceId)=='string') {sourceId=document.getElementById(sourceId);} if (typeof(targetId)=='string') {targetId=document.getElementById(targetId);} targetId.innerHTML=sourceId.innerHTML; return false;} </script> <body onload="start()"> <div id="mediawindow"></div> <div id="mediaspace" class="fltrt" style="display:none"> <script type='text/javascript' > var so = new SWFObject('player.swf','mpl','360','295','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('playlistfile','IIA2010.xml'); so.addVariable('stretching','fill'); so.addVariable('autostart','true'); so.addVariable('repeat','list'); so.addVariable('skin','stormtrooper.zip'); so.write('mediaspace');</script></div> <p><a href="#" onclick='return playVideo("mediaspace","mediawindow")'>Play all</a><br /> <a href="#" onclick='return playVideo("welcome","mediawindow")'>MC Linda Clark welcomes guests</a><br /></p> You can also have a look on the webpage. Its working well in FF and chrome. you can test it there. http://www.internetindustryawards.co.nz/2010.html Its really urgent... I am currently designing a website for our public library. I have added a card catalog search bar on the side of every page. Our catalog software company has supplied the code. After embedding it, I previewed each page to make sure it was working properly. At the time, it worked fine. Since then, I have added other elements to the homepage such as a Twitter feed and a Flickr slideshow. Now, when I attempt to search in the catalog search bar on the homepage, it opens two tabs, but only in Firefox. Our IT person from the software company suggested I make a copy of the page and strip the code down to see what the problem is. After doing this, I have made no headway. Even with the catalog as the only code left on the page, other than text, it still opens two tabs. The following is the code embedded on the homepage: Code: <div> <script type='text/javascript'> function gotoserver() { sn = document.getElementById('server').value; redirecturl = 'http://webopac.infovisionsoftware.com/stephenville/default.aspx?Title='+sn; window.open(redirecturl) //document.location.href=redirecturl; } </script> <input type='text' name='server' id='server' /> <input type='submit' id='mySearch' value='Go' onclick='javascript:gotoserver();' /> </div> I would appreciate any advice given. Thank you for your time. Hi all, I need Media player to stream and play video in javascript...any help or working link will work. My requirement is I have .wmv files but when i embed them in html pages first it gets downloaded and then it gets played. I need them playing while they are getting downloaded. please help, i have tried lots of codes but got no success I am working on a website that features a custom javascript enabled audio player with an animated playhead to follow along with the provided spectrogram. An example of this is included below. http://cetus.ucsd.edu/voicesinthesea.../humpback.html I am having difficulty figuring out why the audio/spectrogram player does not work on an iPad. This component was built by a developer who I am not longer in contact with, thus I am in urgent need of some advice/wisdom. Thank you! Hi there, A client of mine has asked me to change a flash component on his website to something that will work on the ipad/iphone etc. So my guess is that a javascript created slideshow would do the trick. Check out what I am meaning on this page: http://www.it-world.com.au/ It's the flash with "Our Services" "Our Products" "Contact" in it. Can anyone suggest a very easy javascript that I could manipulate to give this same scrolling effect on the click of a link. It needs to be very easy to make changes to as I have no js skills whatsoever other than copying, pasting and making minor changes to obvious pieces of script. hope someone can help! Thanks, Ross |