Ini files with flash SWF?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi all, I'm developing a roleplaying sheet calculator for some friends. they are all Mac users so the normal MMF2.exe wont work for them so I thought to use flash SWF instead. That gave me a new problem though. the ini object seems to be incompatible with SWF, is this so or am I just doing something wrong. And if they don't work together do you guys have any recommendation for alternative data storage instead of ini?

    thankful for any help // Ed

  • Hi, the INI object should work just fine with flash. Are you using ini++? That is not compatible currently.

    What is actually happening when you try to use it? How are you loading the ini data / configuring it in the object's properties.

  • I think I'm using the normal ini object since I haven't downloaded any specific ini extensions.
    Please login to see this attachment.
    My script looks like this.
    Please login to see this attachment.
    The odd thing is that it works just fine when I build it as a .exe file, but when I try to build an .swf I get this error message.
    Please login to see this attachment.
    In the error log I get this message.
    Please login to see this attachment.
    So I'm guessing it's the Apppath$ script that I use to find my "host file path" that is incompatible with flash... Is there an other way to designate the searchpath?

    The file is intended to be placed in a shared dropboxfolder together with the .ini database so that we can all load it in to our computers. but given that everyone have there own foldersetup in dropbox it will probably be hard to set up a full searchpath...

    Thanks for showing an intrest in helping me!

  • You dont need to write any patname for the ini file in SWF builds, SWF builds automatically store ini in a default folder ( you dont have a choice ).
    I made a thread about this myself, but the Forum search function is so bad i cannot find it ( or maybe in just stupid ).

    However ( again i cannot confirm cuz of search problems ), i remember that SWF exporter store external data files ( ini maybe? ) as .sol files in some situations, which makes it impossible to read.
    I am using INIs to read and write sucessfully in a SWF app, so it is possible.

    How can i change username and display name?
    Please login to see this link.

  • Could you make a screen-shot of the ini write script that you use?
    I cant seem to be able to create ini files without writing in a destination path, so I must be doing something wrong...

  • Instead of a pathname, just write the name you want the INI file to have.
    Example: Pathname = "Hiscores"

    An INI file with the same name wil automatically be written to:
    C:\Users\<USERNAME>\AppData\Roaming\MMFApplications
    If using Windows

    ..
    I made a smple Test Application just now to confirm it:
    - I made an Empty Application
    - Included INI Object ( didnt mess with any properties )
    - Set Pathname BANG
    - Made an Event which wrote number '8' to the file
    - Ran Application
    - Searched for BANG.ini

    And there it was, an INI file called BANG with the number 8 in it.

    How can i change username and display name?
    Please login to see this link.

    Edited 3 times, last by King_Cool (May 8, 2013 at 1:13 PM).

  • Don't use AppPath$+ just use

    Global String A + ".ini"

    Flash won't reference AppPath$.

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

  • It seems like something odd is going on... If I make an .exe and remove AppPath$ the files get sent to

    C:\Users\<USERNAME>\AppData\Roaming\MMFApplication

    like you mentioned but there is no copy in the folder where the .exe is.

    If I make an .SWF version it instead sends the file to

    C:\Users\ejn\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\SZV9GDKJ\#localWithNet\spel leb\test.swf

    and also adds a SOL at the end "bang.ini.sol"

    I'm running Build R257.11 so there shouldn't be any legacy problems or anything like that :(

    I keep hearing that it's supposed to pop up in the same folder if you dont enter anything else, but I've tried on two different computers now and they behave the same...

  • Yes, this is correct but you don't need to worry about calling .sol, just Set Current File (Global String A+".ini") and MMF2 handles all the temporary datafile name conversions etc.

    Apologies here but I'm failing to understand what the problem is :(

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

  • Ah, im sorry for confusing you Eagi.
    What you are experiencing sounds correct and you shouldnt worry.

    When you run as an actual EXE
    C:\Users\<USERNAME>\AppData\Roaming\MMFApplication

    When you run as an actual SWF
    C:\Users\<USERNAME>\AppData\Roaming\Macromedia\Flash Player...something something something

    ...
    If you are able to Write and Read a simple value to the INI file at this point, everythings A OK
    The files might bee hidden by default, and you might need to check that somthin' somethin' under Folder Options for Windows

    The .sol problem i mentioned earlier was for Arrays, MMF2 can only write to Arrays in SWF mode but not read from them.

    How can i change username and display name?
    Please login to see this link.

  • The problem is that without the AppPath$ the ini files are not saved in the same folder as the .exe/.swf files, instead they are saved in the folders I mention above.

  • You want both the EXE and the SWF version of your Application to save the INI files in the same location?

    You can choose the loaction in the EXE version, but im pretty sure you dont have a choice in the SWF version ( INIs are saved in a fixed location which you cannont change as far as i know )

    EDIT: You may be able to move the INI file to another location whenever you dont need to Read or Write to it, by using the FileObject...
    But is sounds like a hazzle
    Ops, scratch that, there is no File Object for SWF Applications

    How can i change username and display name?
    Please login to see this link.

  • The thing is I need the file to be placed in a shared dropbox folder, (so that several people/computers can run the same database file while running independent SWF files on each computer) so if the ini is placed in a fixed folder on my computer then I'm in trouble since the other people wont have access to it. :(

  • Hmmm, interesting idea
    That sux however, i think this is a limitation with Flash however and not MMF2s fault

    Long shot, but maybe this might give you some ideas
    Please login to see this link.

    How can i change username and display name?
    Please login to see this link.

  • The thing is I need the file to be placed in a shared dropbox folder, (so that several people/computers can run the same database file while running independent SWF files on each computer) so if the ini is placed in a fixed folder on my computer then I'm in trouble since the other people wont have access to it. :(


    Well, you can't do that with Flash. It would have to be an EXE file if you wanted it to do that.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Dredging up an old thread because i can't figure out where my ini file is being written. When i play via EXE my INI file works great. When i play via SWF, the INI file has some of my data, but not all of it! I just want to look at the file to know for sure what's going on. I don't specify a path for the ini file, as previously mentioned (above in the thread) there is no need to provide a path, so i don't.. I just give it a name. can't find the file anywhere.

    thanks and Merry Christmas and Happy Holidays

    Edit: Nevermind, i found the location (as posted above its in the #localWithNet folder...

    Now i can see that i should be using groups as this should make it easier... so i'll test it with groups and try again.

    Kevin Gunn (Tuna) - Hey! Check out MechaBall on iTunes by scanning below!
    [SIGPIC][/SIGPIC]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!