You have an MP3 file (a podcast, a song of your band, a lecture) and you want to share it with the visitors of your site. You can just put a link to the MP3 and let people download it or you can include it as an object and let the browser play it with a plug-in like QuickTime (and most of the times also crash the browser). Most people want to preview the audio and not wait until it downloads completely. You can play a partial MP3 file in audio player, but many people aren't aware of that.
But there's another away: a Flash player that allows you to pause and rewind the MP3. It's like an audio version of Google Video or YouTube, with the difference that the file is hosted on your server (or on another server). While there are many solutions based on Flash, this is the one I like the most. It's a modified version of Odeo player, that's used to play podcasts on odeo.com:
You just have to replace [MP3 file address] with the actual address.
Here you can see how it looks (in this audio, Marissa Mayer talks about innovation at Google):
Thursday, July 31, 2008
MP3 embedding in blogs
Tuesday, July 15, 2008
Adding battery meter in the program form
For adding a signal, blue tooth or battery gadget in our palm project
just add a gadget (width=16, height=12) to your form, and use the
HsStatusSetGadgetType API from the Palm/Treo SDK.
If you develop with HB++, here is a link to a project that demonstrate hwo to
add Network, battery and Bluetooth gadgets:
http://www.handheld-basic.com/forum/viewtopic.php?t=1950
Posted by
sumesh
at
3:20 PM
|
Labels: Palm, Palm Hacks, Tutorial
Friday, July 11, 2008
Add Scroll bar in the field
--------- 1: create these three functions ------------
// you need to replace 700 by the ID of your field, and 710 by the ID of your scrollbar !!!!
void updateScrollbar(void)
{
FormPtr frm = FrmGetActiveForm();
ScrollBarPtr scroll;
FieldPtr field;
Int16 currentPosition;
Int16 textHeight;
Int16 fieldHeight;
Int16 maxValue;
field = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, 700));
FldGetScrollValues(field, ¤tPosition, &textHeight, &fieldHeight);
// if the field is 3 lines, and the text height is 4 lines
// then we can scroll so that the first line is at the top
// (scroll position 0) or so the second line is at the top
// (scroll postion 1). These two values are enough to see
// the entire text.
if (textHeight > fieldHeight)
maxValue = textHeight - fieldHeight;
else if (currentPosition)
maxValue = currentPosition;
else
maxValue = 0;
scroll = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, 710));
// on a page scroll, want to overlap by one line (to provide context)
SclSetScrollBar(scroll, currentPosition, 0, maxValue, fieldHeight - 1);
}
void scrollLines(Int16 numLinesToScroll, Boolean redraw)
{
FormPtr frm = FrmGetActiveForm();
FieldPtr field;
field = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, 700));
if (numLinesToScroll < class="qBody" id="EchoTopic">
}
}
--------- 2: modify your main form handler like this ------------
where the event frmOpenEvent is caught, add this line *before* calling FrmDrawForm:
updateScrollbar();
add this code to catch the events fldChangedEvent and sclRepeatEvent:
case fldChangedEvent:
updateScrollbar();
handled = true;
break;
case sclRepeatEvent:
scrollLines(eventP->data.s
break;

Make Money Online