Greetings! First, thanks for an awesome player. Worth every penny we spent on the license.
Here's what I'm hoping to accomplish...I need to control the player 100% from javascript and have it NOT start/stop/pause when someone clicks on the actual flash player...
In other words, when someone clicks on the actual flash player have it do nothing...don't start/stop or anything.
Would this be possible? We've tried floating divs positioned over the player and trapping the click that way but it only seems to work in IE7 (ugh!).
yes, you need a trick to do this! set the flashvar _linkfromdisplay=true_
from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]: _*linkfromdisplay* (true,false): You can set this flashvar to "true" to make a click on the image/video display to result in a jump to the "link" webpage. By default, a click on the display will play/pause the movie._
and in the playlist or in the _link_ flashvar: _*link* (url): Set here the url to an external URL, downloadeable version of the file, or force-download script you can use for downloading the file. You can assign link-clicks to the display (see below), the downloadbutton and every item in a playlist_
you just place an anchor - like this: "#" voila - unresponsive screen and no jumping to links...
you are using the xspf format for the playlist - so the link tag should be: <info>#</info>
also remember the xml declaration as the very first line in the playlist: <?xml version="1.0" encoding="utf-8" ?>
in this line: so.addVariable("file",xmlPlayList); you mean _playlist.xml_ ?
please see the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url] and the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/readme_playlist.htm]modified readme[/url] (on the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/]demopage[/url] - [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/javascript.htm]modified javascript[/url]) for a list of all supported playlist tags...
This only prevents the user from stopping or playing the video after it has started playing but when we first load the video, we can still click the display to play it.
Like John said, it does not keep the very first click event from being handled. So if I load the page the user can still start the video by a click or if I start playing by Javascript the user can pause it once. Any further mouse clicks will use the link like described above. Does anyone have a solution for the 1st click?
Instead of passing the xml source file path, I would like to pass the xml content as a string to the method. something like so.some_method("string_containg_xml_content ");
Is there any way I can do it? Is it possible? Any help appreciated...thanks in advance...
you can excute a javascript from the playlist, something like this:bc.. <info>javascript:doit()</info> and corresponding script:bc.. <script type="text/javascript"> function doit() { alert('you clicked') } </script> please see the (source of the) [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/javascript.htm]javascript[/url] demo (linked from the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/javascript]demopage[/url]) and the tutorial: [url=http://www.jeroenwijering.com/?item=Javascript_interaction]Javascript Interaction[/url]
note: the javascript controls only work online and you must include this code: bc.. <script type="text/javascript"> function sendEvent(swf,typ,prm) { thisMovie(swf).sendEvent(typ,prm); }; function getUpdate(typ,pr1,pr2,swf) {}; function thisMovie(swf) { if(navigator.appName.indexOf("Microsoft") != -1) { return window[swf]; } else { return document[swf]; } }; </script> then you can advance to the next item using this commandbc.. sendEvent('next'):
Thank you andersen, this seems completely understandable. Only I can't seem to get it to work.
I can't get any of the javascript working except a simple alert on click. Other sendEvents don't seem to get through. swfobject,js is on my server and referenced in the header. I don't know what I'm doing wrong.
http://dev.eebee.com and playlist at http://dev.eebee.com/eebee_playlist.xml
There's a second flash movie on the page, but it's not working even with that removed and I've tried referencing the sendEvent with the javascriptID and that doesn't work either.
After writing all this below, I found the error, you need to label "var so = new SWFObject" the same as javascriptID. Instead of mpl, it needed to be intro. Phew!
--------------------------------------------------------------------------------------------------------- To make it easier, I'll paste everything here.
I am putting the code for the player into the body of the document: bc.. <div class="coltop"> <div id="player">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject('http://dev.eebee.com/mediaplayer.swf','mpl','232','194','8'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addVariable('linkfromdisplay','true'); so.addVariable('showicons','true'); so.addVariable('height','194'); so.addVariable('width','232'); so.addVariable('file','http://dev.eebee.com/eebee_playlist.xml'); so.addVariable('frontcolor','0x009999'); so.addVariable('lightcolor','0x009999'); so.addVariable('screencolor','0xFFFFFF'); so.addVariable('overstretch','true'); so.addVariable('autostart','true'); so.addVariable('repeat','true'); so.addVariable('shuffle','false'); so.addVariable('enablejs','true'); so.addVariable("javascriptid","intro"); so.write('player'); </script> <script type="text/javascript"> function sendEvent(swf,typ,prm) { thisMovie('intro').sendEvent(typ,prm); }; function getUpdate(typ,pr1,pr2,swf) {}; function thisMovie('intro') { if(navigator.appName.indexOf("Microsoft") != -1) { return window[swf]; } else { return document[swf]; } }; </script>
<script type="text/javascript"> function doit() { alert('you clicked'); }; function doit2() { sendEvent('intro','next'); }; function doit3() { sendEvent('next'); }; </script> <a href="javascript:sendEvent('doit')">doit</a><br> <a href="javascript:sendEvent('next')">next</a><br> <a href="javascript:sendEvent('intro','next');">Play the next items</a><br> <a href="javascript:sendEvent('intro','doit');">intro doit</a><br> <a href="javascript:sendEvent('playitem',2)">Play the 3rd item of the playlist</a> </div>
and the swfobject.js in in the head of the doc. bc.. <script type="text/javascript" src="swfobject.js"></script>
I've removed the second flash player to troubleshoot, but I still can only get the alert event to work, whether it's from clicking in the flash window or from a link like the ones on the javaxcript page.
When I leave the code as is, Firefox 2 on Mac OS X gives me Error:thisMovie(swf) has no properties
When I replace swf with 'intro', Error Console gives me Error: missing formal parameter function thisMovie('swf') {
Similar errors in Safari.
Everything is online. I've tried linking to the swfobject,js with absolute reference or linking to your URL, neither work.
swfobject,js doesn't seem to be loading but I don't know where to go with this anymore.
After you install your *"no-stop flash"* thingie, let me/us know how to over-ride what they did. Like myself there are so many people in this world that goes into convulsions from this repititious visual flashing. If you know what it feels like to be sea-sick, *times that by 5! *
ALL you Website builders could have a different URL direction so your webpage will *NOT* load Flash images.
IF this simple request can not be, then does anyone know where there is a Website of a "class action lawsuit" to ban this "Flash Player" all together, please reference that URL here.
Thank you for helping this world progress into a safer future.
Well that's really DUMB. How does that allow me/us to watch Flash Player made videos & movies? It's the flashing advertisements that's the culprit. How do we stop that from flashing?
@fm - well, im so sorry, but there is no way to automatically distinguish which flash files you like and which you dont !
but it would indeed be an interesting intellectual challenge to come up with an advanced artificial intelligence browser module that could be trained to recognize your taste in webpage content and leave out/block the rest - program something that can do that and get rich and famous !
Whoa, I'm so happy I found this thread, I was going crazy figuring this out. I also want my videos to just play straight through and not be able to be stopped. I used Andersen's advice and got closer than I was able to on my own. Unfortunately, now when you click on the video, although it doesn't stop at all, it also opens a new tab/window and loads the page over again. Any ideas how to make the clicks completely unresponsive. Here's my code:
function createPlayer(thePlace, theFile) { var s = new SWFObject("mediaplayer.swf","thePlayerId","125","90","7"); s.addParam("allowscriptaccess","always"); s.addVariable("file",theFile); s.addVariable("width","125"); s.addVariable("height","90"); s.addVariable("displayheight","90"); s.addVariable("overstretch","false"); s.addVariable("displayclick","none"); s.addVariable("showicons","false"); s.addVariable("linkfromdisplay","true"); s.addVariable("link","#"); s.addVariable("autostart","true"); s.addVariable("repeat","always"); s.write(thePlace); }
I have a SWF File (Slide show movie), and it is linked to an URL, which I cannot Edit. So, when some-one clicks on the slide show, it takes him to the linked URL.
Can any one please let me know the codes which I can used to not go to the linked url. It should be stopped without any action.
I have opened the player using the following code.
var soo = new SWFObject("player.swf", "player_"+ params['mhash'], "390", "60", "6", "#CEDAFF"); soo.addParam("FlashVars","filepath="+params['mp3path']+"&mp3="+params['mp3path']+"&showstop=1&bgcolor1=ffffff&bgcolor2=cccccc&buttoncolor=999999&buttonovercolor=0&slidercolor1=cccccc&slidercolor2=999999&sliderovercolor=666666&sliderwidth=10&sliderheight=8&textcolor=0&showvolume=1"); soo.write(boxid + '_about'); $(boxid + '_about').style.display = 'block';
Consider that there are 2 tabs.Each tab will have player to play the mp3 file. The player got closed while clicking the stop button but if you go to another tab, the previous played mp3 file is again playing automatically.
I tried a lot to find the solution but in vein. could you please help me?
Help! I have searched and searched and am unable to find answer. I have a blog with an embedded mp3 player that auto starts. It can be controled by whoever is on the site but i also have links to other blogs of mine shown as buttons and it continues to play (the main blog remains open)when you go to them. The problem is it starts another player when you come back. Anyway it ends up that you are hearing several players play at once but at different places in the tracks. Don't know if that makes any sense or not but I have no idea how to correct. The player and the links are all done in separate html/java gadgets for each one. Any insite would be greatly appreciated.
Hai it is very nice and it is very useful to me and one thing i want only for Play And Stop Action spript only i want ple send the my E-mail ID is rafiqwin88@gmail.com
I've added the linkfromdisplay: 'true' and link: http://someurl to flashvars, yet the video still stops when clicked instead of going to the URL defined by the "link" variable.