Missing Buttons on Preview

Discussion and feedback on Construct 2

Post » Mon Dec 23, 2013 5:27 am

Hi - I am new to Construct2. I have already completed a "side shooter" and it was a blast to build. I am working on my 2nd game - but a problem has "popped up". I am using the standard button object in C2. I import the button object and define it's characteristics without any problems. However - when i go to preview the layout with the button defined on it - the button object does not appear. I have checked all the obvious settings (object visible etc.) but nothing seems to help. I double checked to make sure there were no other objects or backgrounds on top of the button. This first occurred while working on my 2nd game which is getting complicated - so I closed C2 opened it up and started a new "test" project. I defined a layout, loaded a chessboard sprite, added a simple button and added some test TEXT. When I preview the layout - the chessboard is displayed and the TEXT is also displayed - but the button is NOT. It is probably something simple - could someone please take a look at the attached capx file and tell me what I'm doing wrong - Thanks in advance.

https://www.mediafire.com/?bw2x642liyfn5x7
B
9
S
2
Posts: 15
Reputation: 634

Post » Mon Dec 23, 2013 5:35 am

Hi yankee1950. I tested it out, and everything seems ok in my browser. I can see the chessboard and button as well. I am using Chrome browser by the way. What browser are you using?
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Mon Dec 23, 2013 6:21 am

@yankee1950

I don't know why the problem occurs (I don't have time to check right now your capx), but I know that the button object is a different type of object (it is not inside the canvas itself, but in top of it), I know cocoonJS does not support it at all, but maybe other browsers have also problems with it

I suggest you use a sprite instead of a button in the future
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Mon Dec 23, 2013 3:50 pm

Thanks Guys - I am using Firefox 26.0. I used Firefox in my previous game - with no button problems - but I also have Firefox to "auto" update - so there could now be an issue.

BTW - Is there a "plugin" or Tutorial on how to use sprites as buttons?

Thanks for your help.

Best
B
9
S
2
Posts: 15
Reputation: 634

Post » Mon Dec 23, 2013 4:10 pm

@yankee1950

I am not sure about plugins, but using a sprite as button is just a littleeeee more work, but can give you nice effects.

Just create a sprite with how you would like the button to look like. You can than create different sprites of that button with different effects if you want, for example grayscale or glowing text.

You can use the mouse event, when "curser is over object" and have it switch to another sprite for some nice effect, and than use the on object clicked to run the main button function.....and switch to another sprite for additional effect if you feeling like it :)
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Mon Dec 23, 2013 4:26 pm

Thanks Guys - you are great.
B
9
S
2
Posts: 15
Reputation: 634


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests