Steve Garman
unread,Dec 9, 2014, 4:19:41 PM12/9/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to androi...@googlegroups.com
I don't know if it's a bug but I see the same behaviour. My test code is:
//Called when application is started.
function OnStart()
{
//Create layout that fills the screen.
lay = app.CreateLayout( "Linear", "FillXY,VCenter" );
//Create 'Play' button.
btn = app.CreateButton( "Play", 0.4, 0.1 );
btn.SetOnTouch( btn_OnTouch );
lay.AddChild( btn );
//Add main layout to app.
app.AddLayout( lay );
//Create media player.
player = app.CreateMediaPlayer();
//Load a file (can be ogg or mp3).
player.SetFile( "/system/media/audio/ui/Undock.ogg" );
}
//Handle 'Play' button.
function btn_OnTouch()
{
player.SeekTo( 0 );
player.Play();
}