Sound & Picture Folders installation in Android App
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Sound & Picture Folders installation in Android App
I have an app that uses a lot of sounds and pictures. On my livecode pc program I have seperate folders for each. When installing my pc version these folders are installed on a pc in c:/programs/TW/sounds and c:/programs/TW/pictures. My question is how do I do this in my Android app. Where do I put the sound and picture folders so that they will be installed with my Android app. And what is the path to access them. Thanks - Joe
Re: Sound & Picture Folders installation in Android App
Hi Joe,
in the standalone builder you can add these complete folders on the "Copy Files" tab.
Then you can access the folders and their contens in the standalone with:
Best
Klaus
in the standalone builder you can add these complete folders on the "Copy Files" tab.
Then you can access the folders and their contens in the standalone with:
Code: Select all
...
specialfolderpath("engine") & "/sounds/"
## resp.
specialfolderpath("engine") & "/pictures/"
...
## Like this:
...
play (specialfolderpath("engine") & "/sounds/your_sound.aif")
...
Klaus
Re: Sound & Picture Folders installation in Android App
I added the "sounds" folder in the "Copy Files" tab. Then I inserted the following into the card:
on openCard
specialfolderpath("engine") & "/sounds/"
end opencard
Clicking on the continue button I get an error message " can't find Handler".
What am I missing. Just what does "engine" do?
on openCard
specialfolderpath("engine") & "/sounds/"
end opencard
Clicking on the continue button I get an error message " can't find Handler".
What am I missing. Just what does "engine" do?
Re: Sound & Picture Folders installation in Android App
Hi Joe,
sigh....
So the error is definitively justified!
-> specialfolderpath("engine")
is a function, just like the other specialfolderpath("XXX") functions available on the desktop)
This functionis only avalible on the MOBILE platform and returns the path to the standalone folder
where you added the files and folders in the standalone builder!
That's why I used the PLAY command to to give you a working example of how to play a sound file
that is in the SOUNDS folder!
I highly recommend to read the "Android Release Notes" (Mneu: Help) to get more info about ANDROID.
Best
Klaus
sigh....
This is no handler or something???!!!Code: Select all
on openCard specialfolderpath("engine") & "/sounds/" end opencard
So the error is definitively justified!

-> specialfolderpath("engine")
is a function, just like the other specialfolderpath("XXX") functions available on the desktop)
This functionis only avalible on the MOBILE platform and returns the path to the standalone folder
where you added the files and folders in the standalone builder!
That's why I used the PLAY command to to give you a working example of how to play a sound file
that is in the SOUNDS folder!
I highly recommend to read the "Android Release Notes" (Mneu: Help) to get more info about ANDROID.
Best
Klaus
-
- Posts: 29
- Joined: Fri Jun 08, 2012 9:54 am
Re: Sound & Picture Folders installation in Android App
good day,
I also have the same concern but its on the image.
how can I use image on buttons using this method?
thanks,
sample code would help.
I also have the same concern but its on the image.
how can I use image on buttons using this method?
thanks,
sample code would help.
Re: Sound & Picture Folders installation in Android App
??? Sorry, don't get this?prexsoccer wrote:...how can I use image on buttons using this method?
Re: Sound & Picture Folders installation in Android App
If you mean button icons, you can't. Icons must always reference images that are imported as controls into the stack. File references won't work as icons.prexsoccer wrote:good day,
I also have the same concern but its on the image.
how can I use image on buttons using this method?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com