How do I cover the File Choose button with a sprite?

0 favourites
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hello,

    Anyone in the Community managed to cover the File Choose button with a sprite?

    I still searching for a way of change the button to a sprite and make it meet the software design.

    Do you know a way?

    Thank you.

  • Can't play with the z-order, but you could give an opacity of 0 with css, then you'd only see the sprite that's underneath. Or leave the FileChooser outside of layout and Sprite on click Browser Execute Js File_Chooser_id.click();

  • Tell me more about your method, I should hack the source after exporting the game to change this specific part?

    I was looking inside C2 for an option like this, where you click over a sprite and trigger the File Choose Event.

  • no need, just give an id in the project properties bar and add the browser object to your project for the js statement.

    Similar question here and why the opacity idea is better choice

  • Something like this?

    [attachment=0:v1dzlis3][/attachment:v1dzlis3]

    [attachment=1:v1dzlis3][/attachment:v1dzlis3]

    Thank you!

  • project was saved with a new version

    [attachment=0:2idkg6lv][/attachment:2idkg6lv]

  • Thank you!!

    + Rep for you Noncentz705, you're an amazing person.

  • not a problem, glad I could help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • :lol: not a problem, glad I could help.

    Hey! I just tried that capx and nothing happens? Has the C2 update nulled this or? How can it be done now? >.<

  • GPProd

    The .capx is missing one essential piece of info that's needed for it to work - the 'Id name' property of the FileChooser object that's used in the browser call.

    In the picture, they call it 'foo', so the browser call will be 'foo.click();'.

    Unfortunately, I can't attach the fixed .capx as this forum has broken again (@Tom).

  • GPProd

    The .capx is missing one essential piece of info that's needed for it to work - the 'Id name' property of the FileChooser object that's used in the browser call.

    In the picture, they call it 'foo', so the browser call will be 'foo.click();'.

    Unfortunately, I can't attach the fixed .capx as this forum has broken again (@Tom).

    Hey, i am sorry but i did not understand that >.<

    I am pretty new to this, and.. All i understood was, change the "Js File_Chooser_id.click();" into "Js File_Chooser_id.foo.click();"

    But that didnt work either >.< .. Is it a hard change to make it work?

    Very much appreciate your response ^_^

  • GPProd

    If you look at the photo the Noncentz705 posted, the FileChooser object is selected, and the property sheet on the left of the phot shows the properties for the FileChooser. At the bottom, Noncentz705 has given the FileChooser object 'Id' property the name 'foo'.

    In the same photo, the Event sheet shows the Condition and action. The action says:

    'Browser Execute Javascript "foo.click();"

    i.e. whatever the id of the FileChooser is, that is what needs to be before the ".click();".

    If Tom would fix the forum, it would make this much easier.

    If you still don'tget it, I'l upload to my dropbox.

    Edit

    Try the following: https://www.dropbox.com/s/yfjvsq1cbcioulr/FileChooserButton.capx?dl=1

  • GPProd

    If you look at the photo the Noncentz705 posted, the FileChooser object is selected, and the property sheet on the left of the phot shows the properties for the FileChooser. At the bottom, Noncentz705 has given the FileChooser object 'Id' property the name 'foo'.

    In the same photo, the Event sheet shows the Condition and action. The action says:

    'Browser Execute Javascript "foo.click();"

    i.e. whatever the id of the FileChooser is, that is what needs to be before the ".click();".

    If Tom would fix the forum, it would make this much easier.

    If you still don'tget it, I'l upload to my dropbox.

    Edit

    Try the following: https://dl.dropboxusercontent.com/u/34306693/FileChooserButton.capx

    YESS it worked! Now i got it! Thanks!! ^_^

    Thank you so much for taking the time to do this, 1000 thumbs up for you! ^_^

  • Noncentz705 Good solution! Thank you for help!

  • I also found this useful- many thanks!

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