Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Central

How to play an MP3 file from a widget?

Author Message
RioWWW



Joined: 01 Sep 2005
Posts: 3
Location: Rio de Janeiro, Brasil

Posted: Tue Aug 15, 2006 - 3:59 pm    Post subject: How to play an MP3 file from a widget? Reply with quote

Hey does anyone know how to play an MP3 file from within a widget? The file will be downloaded with the widget. It can be in MP3 or another format. Thanks!
View user's profile Send private message Send e-mail Visit poster's website Widgets
seb2



Joined: 04 May 2005
Posts: 41

Posted: Tue Aug 15, 2006 - 4:13 pm    Post subject: Reply with quote

Simply embed it.

In Ubertragen we do it like this:

var soundPlayer = document.createElement("embed");
soundPlayer.setAttribute("id", "currentAlertSoundEmbed");
soundPlayer.setAttribute("src", YOURPATHGOESHERE);
soundPlayer.setAttribute("autostart", "false");
soundPlayer.setAttribute("hidden", "true");
soundPlayer.setAttribute("enablejavascript", true);
document.appendChild(soundPlayer);

soundPlayer.Play();
View user's profile Send private message Send e-mail Widgets
Uplink



Joined: 04 Jul 2006
Posts: 6

Posted: Tue Aug 15, 2006 - 4:15 pm    Post subject: Reply with quote

so.... where does the MP3 file go? where in the html?
View user's profile Send private message Send e-mail AIM Address Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group