mobileStopPlayingOnChannel don't work!!!!

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

mobileStopPlayingOnChannel don't work!!!!

Post by Fasasoftware » Sun Dec 22, 2013 6:34 pm

Hi to all...i'm trying simply to play a sound looping and then i want to stop it.....but without success!!!! can you help me????

this code work fine.......

Code: Select all

put (specialFolderPath("engine") & "/seffects/Crazyshot.mp3") into tPath
put "Crazyshot" into tChannelName
put "looping" into tType
mobilePlaySoundOnChannel tPath, tChannelName, tType



This code below don't work!!!....can you help please???

Code: Select all

mobileStopPlayingOnChannel  "Crazyshot"
Best regards,
Lestroso

http://www.fasasoftware.com

vedus
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 153
Joined: Tue Feb 26, 2013 9:23 am

Re: mobileStopPlayingOnChannel don't work!!!!

Post by vedus » Sat Jan 18, 2014 12:55 pm

here is the trick

Code: Select all

 stop player "sound"
and here is a link for the tutorial
http://lessons.runrev.com/s/lessons/m/4 ... ng-players

and for the mobile is look for the "mobileControlDo" in the dictionary

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: mobileStopPlayingOnChannel don't work!!!!

Post by Klaus » Sat Jan 18, 2014 1:37 pm

Hi all,
vedus wrote:here is the trick

Code: Select all

 stop player "sound"
and here is a link for the tutorial
http://lessons.runrev.com/s/lessons/m/4 ... ng-players
and for the mobile is look for the "mobileControlDo" in the dictionary
the tutorial is for using a player object on DESKTOP machines!
On the mobile platform things work a bit different, so a simple
"stop player XYZ" will not work here 8)

But this should work in fact:
...
mobileStopPlayingOnChannel "Crazyshot"
...

Sorry, no idea what's going on there.
Maybe you could simply KILL the player:
...
mobileDeleteSoundChannel "Crazyshot"
...
and see if that works?


Best

Klaus

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: mobileStopPlayingOnChannel don't work!!!!

Post by Dixie » Sat Jan 18, 2014 5:46 pm

mobielPlaySoundOnChannel 'does' work... Using LC 6.5.1

two buttons :-
button 'Play"

Code: Select all

on mouseUp
   put specialfolderpath("engine") into thePartialPath
   put thePartialPath & "/dontgo.aif" into theSoundName
   mobilePlaySoundOnChannel theSoundName, 1, "looping"
end mouseUp
button 'Stop'

Code: Select all

on mouseUp
   mobileStopPlayingOnChannel 1
end mouseUp
Please, think a little before using subject titles, as you have 'mobileStopPlayingOnChannel don't work !!!!'... No need for the exclamation marks.

Post Reply