LiveCode program on mobile
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: LiveCode program on mobile
Hi Marko,
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"
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")
...
Best
Klaus
add all of your sounds (or better a complete folder full of sounds) via the "Copy files" tab in the standalone builder settings!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?
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"
What do you think will this script do?MarkoSato wrote:But I don't have a "beepsound" , it's just a normal mp3 converted in wav.Code: Select all
"on mouseUp set the beepsound to specialFolderPath("engine") & "/sound.aiff" beep --> what is the "beep" for? end mouseUp"
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")
...
We need to take alook at the script(s) to be able to check what might go on!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.
Best
Klaus
Re: LiveCode program on mobile
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
- Also, it takes almost 10-15 seconds after I click the app to open, which is weird.
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
What do you mean with this exactly ?We need to take alook at the script(s) to be able to check what might go on!
- Also, it takes almost 10-15 seconds after I click the app to open, which is weird.
Re: LiveCode program on mobile
Hi Marko,
And your "preopenstack" and/or "openstack" script.
Best
Klaus
please post your script(s) that are probably running when the app crashes!MarkoSato wrote:...
I still have the problem with the crashing at the same place thoughWhat do you mean with this exactly ?We need to take alook at the script(s) to be able to check what might go on!
- Also, it takes almost 10-15 seconds after I click the app to open, which is weird.
And your "preopenstack" and/or "openstack" script.
Best
Klaus
Re: LiveCode program on mobile
This is the only code on my stack script (I hope you meant this?)
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
Code: Select all
on preOpenStack
set the fullscreenmode of me to "exactFit"
end preOpenStack
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
There is no script running when the app exits?
Sorry, no brilliant idea in the moment...
Sorry, no brilliant idea in the moment...
Re: LiveCode program on mobile
nope, sadly none. Guess I can't do anything about it.
At least everything else is working
At least everything else is working
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: LiveCode program on mobile
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?
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?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: LiveCode program on mobile
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:
On the next card there is this button "begin"
Code:
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.
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
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
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
Hi Marko,
use the official "visual effect" syntax, I heard that "legacy code" may crash on mobile:
Best
Klaus
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
Klaus
Re: LiveCode program on mobile
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.
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
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
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
Congratulations!
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: LiveCode program on mobile
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.
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: LiveCode program on mobile
Read this, it could help you: http://livecode.wikia.com/wiki/Android
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w