Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Special Interests > Web Design and Development
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Jul 31, 2008, 04:17 AM   #1
Brendon Bauer
macrumors 6502
 
Join Date: May 2007
Location: Good 'ol USofA
Flash mp3 Player in new window

Ok, here's what I want to do. I use Wordpress to host my podcast. I'd like to have a simple "template" of code that each post contains that all I have to do is change the Title and location of the mp3 to launch. What this code will then do is open a small popup window with a flash mp3 player and the title of the mp3. The mp3s are named according to the date, so I don't want that as the title. Instead I'd type the title I want to appear somewhere in the post.

I found this great flash player here: http://flash-mp3-player.net/players/maxi/

The test.php page contains only this code to get it working:
Code:
<object type="application/x-shockwave-flash" data="http://www.summitnorthwest.org/sermons/mp3player.swf" width="250" height="20">
    <param name="movie" value="http://www.summitnorthwest.org/sermons/mp3player.swf" />
    <param name="bgcolor" value="#ffffff" />
    <param name="FlashVars" value="mp3=http%3A//www.summitnorthwest.org/sermons/2008/07.19.08.mp3&amp;width=250&amp;autoplay=1&amp;autoload=1&amp;showvolume=1&amp;showloading=always&amp;volumewidth=50&amp;volumeheight=8&amp;loadingcolor=B4B6B3&amp;sliderovercolor=0052B6&amp;buttonovercolor=0052B6" />
</object>
What I'd like is instead of imbedding bunches of mp3s that autoload into one wordpress page, to have a link that creates a small popup window containing the swf file linked to the mp3 and the title I provide right above it. What is the best way to do this? Javascript? And could someone write me some code that I could use? :P

Thanks!

Oh and one more thing... will feedburner be able to pull out the mp3s from this new flash method to work as a podcast as well? The old methods allows for that.
__________________
15" SR Mackbook Pro 2.4Ghz with 4GB RAM, 160GB HD@7200 and GeForce 8600M GT w/256MB VRAM
running Mac OS 10.6 Snow Leopard

Last edited by Brendon Bauer : Aug 2, 2008 at 10:18 PM.
Brendon Bauer is offline   Reply With Quote
Old Jul 31, 2008, 07:51 AM   #2
EvanLugh
macrumors 65816
 
EvanLugh's Avatar
 
Join Date: Aug 2007
Location: Landon.
Send a message via AIM to EvanLugh
- It may be easier to iFrame it then popup (and use the iframe as the red link shown below) that way you can include the flash player and set a background (black etc).
Copy this code into the HEAD of your HTML document
Quote:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=260,height=27');");
}
// End -->
</script>
The bold parts are for the height and width of the popup window, you can change this accordingly, although I measured it at the above.

Use the following link to open the new window

Code:
<A HREF="javascript:popUp('www.summitnorthwest.org/sermons/2008/07.19.08.mp3')">Listen to the podcast</A>
OR the way I'd do it:
HEAD the same( including the width etc show in the quote tags)
but change the link code to:
Code:
<A HREF="javascript:popUp('www.summitnorthwest.org/podcasts.html')">Listen to the podcast</A>
Then create podcasts.html with your flash and select the particular podcast manually every week/month etc.
Hope I didn't confuse you.
__________________
LIVESTRONG

Last edited by EvanLugh : Jul 31, 2008 at 07:56 AM.
EvanLugh is offline   Reply With Quote
Old Jul 31, 2008, 02:39 PM   #3
Brendon Bauer
Thread Starter
macrumors 6502
 
Join Date: May 2007
Location: Good 'ol USofA
I'm confused. Where in your code do you include the .swf player?
__________________
15" SR Mackbook Pro 2.4Ghz with 4GB RAM, 160GB HD@7200 and GeForce 8600M GT w/256MB VRAM
running Mac OS 10.6 Snow Leopard
Brendon Bauer is offline   Reply With Quote
Old Jul 31, 2008, 02:45 PM   #4
Brendon Bauer
Thread Starter
macrumors 6502
 
Join Date: May 2007
Location: Good 'ol USofA
Also, I don't want to have a podcast.html page that only references the most recent mp3. I want to be able to have all the links on the page be able to open into a small popup window with the swf player to play the mp3s. That way people can go back and listen to something that's older... Don't have to listen to just the most recent one. As you can see I already have that function, but it just embeds the mp3 in the browser, and Windows Media Player doesn't always work for some reason.
__________________
15" SR Mackbook Pro 2.4Ghz with 4GB RAM, 160GB HD@7200 and GeForce 8600M GT w/256MB VRAM
running Mac OS 10.6 Snow Leopard
Brendon Bauer is offline   Reply With Quote
Old Jul 31, 2008, 03:47 PM   #5
Brendon Bauer
Thread Starter
macrumors 6502
 
Join Date: May 2007
Location: Good 'ol USofA
I actually figured it out! I modified the old javascript file I was using so that it passes the same parameters so even the older sermons are now using flash. Didn't have to change a post in Wordpress. Just modified the js file to use the swf object. It's pretty sweet! And I think it still keeps the mp3 for feedburner podcast support.
__________________
15" SR Mackbook Pro 2.4Ghz with 4GB RAM, 160GB HD@7200 and GeForce 8600M GT w/256MB VRAM
running Mac OS 10.6 Snow Leopard
Brendon Bauer is offline   Reply With Quote
Old Jul 31, 2008, 05:56 PM   #6
EvanLugh
macrumors 65816
 
EvanLugh's Avatar
 
Join Date: Aug 2007
Location: Landon.
Send a message via AIM to EvanLugh
Glad you got it sorted.. And the HTML page could display anything (multiple swfs) for example.
__________________
LIVESTRONG
EvanLugh is offline   Reply With Quote

Reply

Mac Forums > Special Interests > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:02 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC