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

Get help using Construct 2

Post » Thu Jul 10, 2014 6:53 pm

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.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028

Post » Thu Jul 10, 2014 7:04 pm

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();
B
10
S
2
G
1
Posts: 202
Reputation: 1,555

Post » Thu Jul 10, 2014 7:10 pm

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.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028

Post » Thu Jul 10, 2014 7:17 pm

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 ;)
Last edited by Noncentz705 on Thu Jul 10, 2014 7:27 pm, edited 1 time in total.
B
10
S
2
G
1
Posts: 202
Reputation: 1,555

Post » Thu Jul 10, 2014 7:26 pm

Something like this?

filechooserbutton.png

File Chooser Button.capx


Thank you!
You do not have the required permissions to view the files attached to this post.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028

Post » Thu Jul 10, 2014 7:31 pm

project was saved with a new version :roll:
e.jpg
You do not have the required permissions to view the files attached to this post.
B
10
S
2
G
1
Posts: 202
Reputation: 1,555

Post » Thu Jul 10, 2014 7:55 pm

Thank you!!

+ Rep for you @Noncentz705, you're an amazing person.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028

Post » Thu Jul 10, 2014 8:39 pm

:lol: not a problem, glad I could help.
B
10
S
2
G
1
Posts: 202
Reputation: 1,555

Post » Sat Mar 21, 2015 9:31 am

Noncentz705 wrote::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? >.<
B
5
S
1
Posts: 37
Reputation: 451

Post » Sat Mar 21, 2015 11:40 am

@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).
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Next

Return to How do I....?

Who is online

Users browsing this forum: alextro, ivanski1983 and 9 guests