Page 2 of 3
Re: LiveCode program on mobile
Posted: Wed Jun 01, 2016 9:29 am
by MarkoSato
anyone?

Re: LiveCode program on mobile
Posted: Wed Jun 01, 2016 1:09 pm
by Klaus
Hi Marko,
MarkoSato wrote:...
I have several ".wav" files for every card.
Do I have to set all of them into the special Folder? So that I have several lines for each sound file?
add all of your sounds (or better a complete folder full of sounds) via the "Copy files" tab in the standalone builder settings!
Then they will be accessible via:
specialfolderpath("resources") & "/name_of_sound_file.wav"
OR
specialfolderpath("resources") & "/all_my_sounds_folder/name_of_sound_file.wav"
MarkoSato wrote:Code: Select all
"on mouseUp
set the beepsound to specialFolderPath("engine") & "/sound.aiff"
beep --> what is the "beep" for?
end mouseUp"
But I don't have a "beepsound" , it's just a normal mp3 converted in wav.
What do you think will this script do?
It will tell iOS to NOT use its cheap" build-in BEEP sound but to use YOUR SPECIAL SOUND FILE named "sound.aiiff"
when you scripts read "BEEP"!
There are many ways to play a sound file, setting the BEEP sound is one of them.
When do you want to play a sound?
Remember you can always:
...
play (specialfolderpath("resources") & "/name of your sound file.wav")
...
MarkoSato wrote:*Edit: Beside that,, I have the problem that the application crashes always at the same card. Shortly before the end I have some cards with animations like a "credits" scene, but the app will always close in the same place. I could not figure out what the problem is.
We need to take alook at the script(s) to be able to check what might go on!
Best
Klaus
Re: LiveCode program on mobile
Posted: Thu Jun 02, 2016 10:34 pm
by MarkoSato
Hello,
Klaus you are my hero! I did exactly like you said and the sound works completely fine. Thank you a lot!
I still have the problem with the crashing at the same place though
We need to take alook at the script(s) to be able to check what might go on!
What do you mean with this exactly ?
- Also, it takes almost 10-15 seconds after I click the app to open, which is weird.
Re: LiveCode program on mobile
Posted: Thu Jun 02, 2016 10:57 pm
by Klaus
Hi Marko,
MarkoSato wrote:...
I still have the problem with the crashing at the same place though
We need to take alook at the script(s) to be able to check what might go on!
What do you mean with this exactly ?
- Also, it takes almost 10-15 seconds after I click the app to open, which is weird.
please post your script(s) that are probably running when the app crashes!
And your "preopenstack" and/or "openstack" script.
Best
Klaus
Re: LiveCode program on mobile
Posted: Fri Jun 03, 2016 3:07 pm
by MarkoSato
This is the only code on my stack script (I hope you meant this?)
Code: Select all
on preOpenStack
set the fullscreenmode of me to "exactFit"
end preOpenStack
There is no script or anything like that when the game crashes. It just turns black for few seconds then the app closes itself.
No notification or pop up messages. That is what I thought is weird about it.
It's not even saying "the app doesn't react" or something like that
Re: LiveCode program on mobile
Posted: Fri Jun 03, 2016 5:15 pm
by Klaus
There is no script running when the app exits?
Sorry, no brilliant idea in the moment...
Re: LiveCode program on mobile
Posted: Fri Jun 03, 2016 5:20 pm
by MarkoSato
nope, sadly none. Guess I can't do anything about it.
At least everything else is working

Re: LiveCode program on mobile
Posted: Sat Jun 04, 2016 4:03 pm
by jacque
There must be a script running if the stack is a game. Are you running a repeat loop to control it? Repeat loops can cause problems if not properly written.
If it always crashes at the same place, what script was running when that happens? Or if there really is no script at all running, what actions came right before the crash?
Re: LiveCode program on mobile
Posted: Sun Jun 05, 2016 12:46 pm
by MarkoSato
There is no loop in the whole game.
Right before the crash I have card with an image "To be continued" there you can click a button to go to the next card.
That is the code:
Code: Select all
on mouseUp
go to the next card
send "mouseUp" to button "begin"
end mouseUp
On the next card there is this button "begin"
Code:
Code: Select all
on Intro
lock screen -- for visual effect
set the visible of button "beginBackgrnd" to true
set the currentframe of image "intro.gif" to 1
set the repeatCount of image "intro.gif" to 2 --Animation 2 mal
set the icon of button "beginBackgrnd" to 1716 -- "1716" ist die animierte .gif Datei
unlock screen
send "resetto" to button "beginBackgrnd" in 2.2 seconds
goNext
end Intro
command goNext
wait 2.2 seconds with messages
visual effect dissolve
go to the next card
end goNext
So I let the gif running on the button
It always crashes right here, while the animation with 2.2 seconds is running. Normally it should go to the next card but it always crashes there.
Re: LiveCode program on mobile
Posted: Sun Jun 05, 2016 1:20 pm
by Klaus
Hi Marko,
use the official "visual effect" syntax, I heard that "legacy code" may crash on mobile:
Code: Select all
command goNext
wait 2.2 seconds with messages
lock screen for visual effect
go next cd
unlock screen with visual effect dissolve
end goNext
Best
Klaus
Re: LiveCode program on mobile
Posted: Sun Jun 05, 2016 8:15 pm
by MarkoSato
Ok I might try it later but to be honest I used this type of visual effect almost on every card.
So it would be weird if it would only crash because of this, then it should have happened way earlier.
Re: LiveCode program on mobile
Posted: Wed Jul 13, 2016 12:13 pm
by MarkoSato
Hey,
Sry for the late reply but I thought I could give an update.
I tried to compansate the program by shorting some of the music and gifs in the project.
After that, I made a new APK and now it works on mobile until the end.
(Only issue is that the mobile is playing the gifs very slow and not as smooth as on PC, but thats a minor problem)
By the way I got the best grade in the university on this project!
So thank you again everyone for helping out. This was a great experience for me.
Best regards
Marko
Re: LiveCode program on mobile
Posted: Wed Jul 13, 2016 4:35 pm
by Klaus
Congratulations!

Re: LiveCode program on mobile
Posted: Wed Jul 13, 2016 5:14 pm
by jacque
That's great! Congratulations.
I think your experience would make a good guest blog post if you're willing. It would encourage others to try LiveCode and show off your own accomplishments too. If you feel like doing it, write to
support@livecode.com and see what they think.
Personally I'd love to see a blog about your journey.
Re: LiveCode program on mobile
Posted: Thu Jul 14, 2016 7:40 am
by MaxV