mobileControlCreate "player"

Nicolas Cueto niconiko at gmail.com
Fri May 18 02:52:29 EDT 2012


Hello List,

An Android question.


For "play" to work with a player object (which refers to an audio mp3
file), must "visible" be set to "true" during the mobileControlCreate?

Or the rect values be set to within the card's rect?


It seems they must.



Because the following works:

   mobileControlCreate "player", "playerDings"
   mobileControlSet "playerDings", "visible", true
   mobileControlSet "playerDings", "rect", "270,34,620,76"
   mobileControlSet "playerDings", "filename", tPathDing -- an mp3 file
   mobileControlDo "playerDings", "play"



But either of these do not:

   mobileControlCreate "player", "playerDings"
   mobileControlSet "playerDings", "visible", false
   mobileControlSet "playerDings", "filename", tPathDing
   mobileControlDo "playerDings", "play"
--
   mobileControlCreate "player", "playerDings"
   mobileControlSet "playerDings", "visible", true
   mobileControlSet "playerDings", "rect", "288,-80,370,-57"
   mobileControlSet "playerDings", "filename", tPathDing
   mobileControlDo "playerDings", "play"




Checking with mobileControls(), it lists "playerDings" in all three cases...




If the player object must be visible or be within the card (why?!), is
there some other way to keep the player object somehow out of sight
but within earshot?


Thanks.

--
Nicolas Cueto




More information about the use-livecode mailing list