User Tag List

Results 1 to 5 of 5

Thread: GET Object

  1. #1
    Clicker SWF Export Module

    Join Date
    Apr 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GET Object

    Hi everyone,

    I am currently porting an project to Flash so I can host it on a webpage, and have a query about the GET Object and the Flash Exporter.

    The game is an anti-phishing educational tool, it is for an experiment.

    Previously, a set of example phishing URLs ("game data") was being loaded using an INI file. So, rather than rewriting the game such that it doesn't use an INI file for this purpose, I would like to use the existing INI file by loading it from a web-server. So in the new project, I am using the GET object to grab the existing INI file from my web-server and then using the EditText object to then save it as a local INI file. This works fine inside MMF, as shown below (retrieving the GET data as a string object):

    example_successful_get.jpg

    However, when I export the project to SWF, the GET object only seems to be grabbing the first line of the INI file from the web server, as shown below:

    example_unsuccessful_get.jpg

    Is this a limitation of the GET object? Is this a limitation of the String/Edit Text object in Flash? Is the Flash version of the GET object expecting the results in a more specific format? Or is there a better approach you could suggest?

    Thank your for any assistance!

    With Regards,
    Adrir

    Edit: FYI, I modified the first group within the INI file for diagnostic purposes.

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Burfelt's Avatar
    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    525
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    GET object should work exactly the same in Flash, and I've done a lot of work using GET object to request rather large sets of data with no problem at all.

    My guess is the problem is in the string/edit object.
    Pay special attention to you string object. As far as I remember - in Flash - it doesn't resize itself to show all the lines, and thus could visually seem to only contain one line, when it actually contains all lines.

  3. #3
    Clicker SWF Export Module

    Join Date
    Apr 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Burfelt View Post
    My guess is the problem is in the string/edit object. Pay special attention to you string object. As far as I remember - in Flash - it doesn't resize itself to show all the lines, and thus could visually seem to only contain one line, when it actually contains all lines.
    So I've enlarged the string/edit object and I can see that the data *is* actually there. Thus, the GET Object is working as intended. However, the data itself does not seem to be making its way into the local .ini file.

    Is there anything particular about the way INI files are handled in Flash? Is there a limitation to the way the Flash handles saving data?

  4. #4
    Clicker SWF Export Module

    Join Date
    Apr 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Adrir View Post
    Is there anything particular about the way INI files are handled in Flash? Is there a limitation to the way the Flash handles saving data?
    I've had a play and come up with a rather more eccentric solution than I was hoping for. Essentially it seems that the ability to save files using EditText and StringParser are different in the Flash extension, so they were not producing the files that I was expecting them to. However, manipulating the INI file directly did result in a persistent save file. My solution was to reformat the ini file using "|" and "=" as delimiters. Then using a "fast loop" to repopulate the INI file directly using the INI object.

    Ideally, I would like to maintain the structure of the INI file to make them easier to edit, so is there a way to use a line break as a delimiter in the StringParser (as similar to '\n' for Java)?

  5. #5
    Clicker SWF Export Module

    Join Date
    Apr 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Adrir View Post
    Ideally, I would like to maintain the structure of the INI file to make them easier to edit, so is there a way to use a line break as a delimiter in the StringParser (as similar to '\n' for Java)?
    Found it: NewLine$

Tags for this Thread

Posting Permissions

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