User Tag List

Results 1 to 6 of 6

Thread: ExternalStorageDirectory$( "Android object" ) + "/app name/data/" and Strings how to?

  1. #1
    No Products Registered

    Join Date
    Oct 2015
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ExternalStorageDirectory$( "Android object" ) + "/app name/data/" and Strings how to?

    I want to be able to select a file based on the name match with some alterable values.

    So for instance I want to play a sound whenever the user clicks and sound it plays is based on 2 alterable values.

    Eg.

    If Alt Val 1= 02 and Alt Val 2= 03 then this sound is played:
    sound0203.wav

    If Alt Val 1= 11 and Alt Val 2= 04 then this sound is played:
    sound1104.wav

    My sounds will be stored here:
    ExternalStorageDirectory$( "Android object" ) + "/appname/data/"

    I know it's got something to do with strings but I'm not sure how to approach it.

    If anyone feels like helping, thanks in advance!

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    5,915
    Mentioned
    116 Post(s)
    Tagged
    2 Thread(s)
    "/appname/data/" this is not external is internal use datastorage to point directly

    if you want to use this

    ExternalStorageDirectory$( "Android object" ) + "/appname/data/"

    you have to create the folders previous to copy

    also just compare alt val is wrong it will keep playing the sound each loop, so be sure to only trigger once
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    No Products Registered

    Join Date
    Oct 2015
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, sorry I've explained it badly I'm not sure of the programming speak...

    So I have already created the folder and it's on the device here /appname/data/ this is good.
    I have sound files that already exist in this folder all called something like this ####sound.wav
    ie
    sound0101.wav
    sound0102.wav
    sound0103.wav
    etc...

    I then use "Play Sample on a specific Channel"

    My question is how do I incorporate some alterable values into this expression to determine the name of the sound it will play:
    ExternalStorageDirectory$( "Android object" ) + "/appname/rec/sound0000.wav"

    I guess something like this?
    ExternalStorageDirectory$( "Android object" ) + "/appname/rec/" + "sound" + ( "Alterable Value A( "Active" )" ) + "Alterable Value B( "Active" )"+ .wav"

    But obviously this is wrong as it doesn't work! Do you understand what I'm trying to do, or am I still explaining it badly?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Expression:

    ExternalStorageDirectory$( "Android object" ) + "/folder/subfolder/" + Global String F

    Global String F: sound123.wav
    Use a Global String or something else, the Global String was just an example.

    Here is a small example (with Android Microphone extension):
    Record some noises, change file names and test the samples.

    ame1.jpg
    Attached files Attached files

  5. #5
    No Products Registered

    Join Date
    Oct 2015
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks so much! I'll check it out.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    London, UK
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also use
    +Str$( Alterable Value A( "Active" ) )
    Which may be easier

Similar Threads

  1. Replies: 6
    Last Post: 15th June 2016, 06:05 PM
  2. Replies: 0
    Last Post: 29th October 2015, 08:42 AM
  3. Replies: 6
    Last Post: 18th August 2015, 02:23 AM
  4. UserGoogleAccount$( "Android object" ) not returning data ?
    By Perry in forum Android Export Module 2.5
    Replies: 5
    Last Post: 2nd November 2014, 11:18 PM
  5. [ ExternalStorageDirectory$( "Android object" ) ]
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 27th November 2011, 07:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •