Audiotech Posted January 31, 2010 Share Posted January 31, 2010 I seem to be having a bit of trouble getting flowplayer to work on my page the way I'd like it. What I'm trying to do is have it run both flv's as well as mp3's off of an anchor tag. I've got it set up so that videos work, however I'm getting errors when trying to play mp3's. Could somebody please look at the code and tell me what I'm doing wrong? Any help would be greatly appreciated. -Carl <!-- player container--> <a href="controls.flv" style="display:block;width:400px;height:300px;" id="player"> </a> <div id="clips"> <a href="controls.flv">Front panel controls</a> <a href="sample_6.mp3">MP3 audio clip</a> </div> <script> // install Flowplayer inside a#player $f("player", "swf/flowplayer-3.1.5.swf", { clip: { // use baseUrl so we can play with shorter file names, use ../media for local baseUrl: '../media', // use first frame of the clip as a splash screen autoPlay: false, autoBuffering: true } }); // get all links that are inside div#clips var links = document.getElementById("clips").getElementsByTagName("a"); // loop those links and alter their click behaviour for (var i = 0; i < links.length; i++) { links[i].onclick = function() { // play the clip specified in href- attribute with Flowplayer $f().play(this.getAttribute("href", 2)); // by returning false normal link behaviour is skipped return false; } } </script> Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 31, 2010 Share Posted January 31, 2010 I don't know man, it is probably your actionscript. your javascript is too vague to really tell you whats wrong, maybe link us to a live example. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.