How do I action file chooser from a touch event?

0 favourites
  • 3 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • I'd like to made use of the file chooser to allow the player to select a image on thier device.

    It all works, but ideally I'd like to action this pressing my own sprite image as a button (Rather than the default file chooser button style).

    Is there a way to do this? I've tried Rex touch simulate to say "When touch sprite button - similate touch at filechooser.x / y" but it doesn't work.

    Cheers

  • Yes, it's quite easy. You can keep the file chooser button hidden off-screen and use the following code to trigger it:

    Browser Execute Javascript "myFileChooser.click()"
    

    where myFileChooser is the ID of FileChooser object. (set this ID on the left panel)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, it's quite easy. You can keep the file chooser button hidden off-screen and use the following code to trigger it:

    > Browser Execute Javascript "myFileChooser.click()"
    

    where myFileChooser is the ID of FileChooser object. (set this ID on the left panel)

    Thanks - working perfectly.

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