Loading a File

This forum is currently in read-only mode.
  • I'm trying to get a window that pops up when you press "Load." In this window, I want the user to be able to pick which file to load from the computer by clicking on it. Sort of like loading an image in paint or some other program. Is there any way to do this? I can't find any information on how to do it anywhere. Thanks in advance for any suggestions or advice on how to do this.

  • Look for the Common Dialog object. For a quick test:

    • Start a new project
    • insert a CommonDialog and an EditBox into the layout
    • make two events in the event sheet like so:
    + System: Start of layout
    -> CommonDialog: Show open dialog
    + CommonDialog: File dialog: OK
    -> EditBox: Set text to CommonDialog.FirstSelectedFile[/code:8irsnubz]
    
    Note that you can do this without typing anything, if you haven't learned the finer points of Construct's interface. You can also do quite a bit more with this object.
    
    Anyway, the result is a string, and can be used in any other way as such.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks I'll try it out and hopefully succeed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)