User Tag List

Results 1 to 10 of 10

Thread: load binary files??

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator
    SirEatAlot's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    405
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Question load binary files??

    Sorry but I just had to make a new thread about this as It's just mind-boggling to me that I cant get it to work..

    It is possible to load an external file using the array object on iOS right? So far I've had no sucess and I've tried three methods so far:

    1. Add file to data elements - binary files, then load just using the filename.arr. This does not seem to work at all for me, tried different files, different file extensions, no luck. I've exported the whole project several times, the file does not seem to be included, but then it could be packed into "Application.cci" I guess?

    2. Adding the file to the project in Xcode, again then loading using just the filename.arr. Still does not work. I've tried placing it in different folders withing Xcode, but nothing works.

    3. Putting the file in a folder and adding the whole folder to Xcode, then loading the file using "folder\filename.arr". I can see the folder and file in Xcode so it seems to be placed correctly, but it just will not load.

    I feel there needs to be a good official description on how to achieve this, it should not be this much trouble should it? What am I missing? Help greatly appriciated!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    May 2012
    Location
    NSW, Australia
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is how i do it on Android, and AFAIK its the exact same routine:

    1) Add file to data elements - binary files.
    Copy the whole path to the file:
    eg. "c:\users\SirEatAlot\array.arr"

    2) Event:
    start of frame:
    load file: "c:\users\SirEatAlot\array.arr"

    3)Build & Run.
    If it doesn't work, uninstall the app completely from your phone, then build & run.

    That should be all you need to do!
    note: copy the WHOLE path to the file, not just "filename.arr".

  3. #3
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Last I tried if you include the array file as binary data and then load (without using any special paths, Fusion iOS runtime handles data directories automatically) it will work. Make sure you're correctly loading the data.. I don't think the file will show up anywhere if you include it as binary data so the only way to know if it's working is to test loading on the device.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator
    SirEatAlot's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    405
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, will test this some more but I'm sure I've already tried it this way, on my device, and it just wont load.

    I will try with a brand new app, just to test this, perhaps It's something wrong with the .mfa I'm working on?

  5. #5
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,415
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Just loading the Array doesn't do anything... you need to process the Array file as well.. Are you doing that ???

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator
    SirEatAlot's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    405
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I check the dimensions to see if the correct array file has been loaded. If the dimensions are 1 (set as default) then it has not been loaded. This works on PC, should work the same on iOS..

    Besides, if I actually try to load a level using the array, nothing is loaded, so the array must be empty..

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by macca02 View Post
    This is how i do it on Android, and AFAIK its the exact same routine:

    1) Add file to data elements - binary files.
    Copy the whole path to the file:
    eg. "c:\users\SirEatAlot\array.arr"

    2) Event:
    start of frame:
    load file: "c:\users\SirEatAlot\array.arr"

    3)Build & Run.
    If it doesn't work, uninstall the app completely from your phone, then build & run.

    That should be all you need to do!
    note: copy the WHOLE path to the file, not just "filename.arr".
    Not to bring up a dead topic but there was no clear solution stated to either option. The above worked first time out of the box for me. Thanks Macca02!

  8. #8
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    The first option will not work if the file added to the binary files section was in a subfolder of the source MFA file. The subfolder path is then stored along with the file and is needed to load it. If that is the case then simply add the subfolder path when loading the file ("mysubfolder/filename.arr" instead of "filename.arr")

    If the file was NOT in a subfolder or same folder then we remove the entire subfolder part and you simply load the resource by name ("filename.arr" should work).

    If you are using windows file paths it will try work out a relative path to the resource. This should "just work" in most cases.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    SMASHINGmedia's Avatar
    Join Date
    Apr 2013
    Location
    STOCKHOLM, Sweden
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @macca02
    2) Event:
    start of frame:
    load file: "c:\users\SirEatAlot\array.arr"
    Where is this "load file" thingy? I can┤t find it.


    ---------------------------
    So.. Does anyone have a MFA-file example where it works to read/load/use a binary file with android? That, would help.

  10. #10
    Clicker Fusion 2.5 Mac

    Join Date
    Dec 2008
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried to use this method on HTML5, can't load the file. Any help?

Similar Threads

  1. "Flash / INI object: now loads INI files stored as binary files in the application."
    By EdibleWare in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 2nd July 2014, 10:22 AM
  2. Cannot extract or load Binary Data
    By liquixcat in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 16th December 2013, 02:31 AM
  3. Can't figure out how to load INI from Binary
    By EdibleWare in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 16th August 2013, 03:39 PM
  4. [BUG 256.34 Unicode] Can't load Binary Data files
    By Olivier in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 30th January 2013, 06:06 AM
  5. Cannot get Binary Quick Load to work
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd February 2010, 12:35 AM

Posting Permissions

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