How do I show an image chosen with File Chooser.

0 favourites
  • 8 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • I'm guessing this is probably a really 'noob' question, but for the life of me, I can't get C2 to get it to work. What I basically want to be able to do is choose a file (in my case an image) with 'File Chooser' and then have it show up as an image for a sprite object.

    I've done a bit of research and seen that I should be able to do it with 'Load image from URL' and something about "blob:", but then it calles for a unique ID and I have NO IDEA what to use/do. I'm assuming this is just because I'm a total dunce and rookie with C2, so any help would be greatly appreciated!

    Thanks!

  • GideonG ,excuse mi english. I have the same problem. I can not find the way to the loaded image is immediately visible . Have you found a solution? regards

  • GideonG, i have a solution.

    [attachment=0:37wj0itj][/attachment:37wj0itj]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try like this ... Works for me :

  • Try this demo

  • Try like this ... Works for me :

    Excellent! But how do i do when i want to important multiple images? Like perhaps say i wanna important 3 images, they all turn into the same first image i imported..

  • https://www.scirra.com/manual/182/file-chooser

    Specifically:

    [quote:21l61x9z]Select

    Whether to allow selecting a single file only, or multiple files in one go.

    ...and

    [quote:21l61x9z]FileNameAt(index)

    Return the name of the chosen file at an index. In Single select mode, the index should always be 0, since only one file can be chosen.

    Therefore, the first of a multiple select would have index of zero, next 1, then 2 etc....

  • https://www.scirra.com/manual/182/file-chooser

    Specifically:

    [quote:2bo7vhcw]Select

    Whether to allow selecting a single file only, or multiple files in one go.

    ...and

    [quote:2bo7vhcw]FileNameAt(index)

    Return the name of the chosen file at an index. In Single select mode, the index should always be 0, since only one file can be chosen.

    Therefore, the first of a multiple select would have index of zero, next 1, then 2 etc....

    Yeh i already understand that, i just can't get it to work, i set it to, ''Every tick'' set sprite = (0), sprite2 = (1) etc as you described above.

    Still all of them reload as soon as i choose a new file to import.

    Thank you for your time and trying to explain it to me, i still didnt get it.. Newely bought C2 ^_^

    Edit: It works when i import multiple files at once, but not when i import 1 by 1 -

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