Need some help with my plugin

For developers using the Construct 2 Javascript SDK

Post » Thu Nov 29, 2012 9:48 am

Ok, here is the exported version:

http://plugin.c2linkit.com/test/

What this plugin does, if add the mask, the buttons and the level indicators, so that our developers won;t have to do it, and if we change the images, all the buttons in all the games update, without compiling a new version.

The start button functions correctly in FF/IE, also in Chrome, but the developer tool must be closed, if you open the dev tools, the click events on the start button doesn't fire.

The best part is, if I set the C2 Projects's full screen mode to off, instead of Fullscreen Letterbox Scale, the click events work.

Any help please!!!!
B
40
S
8
G
6
Posts: 58
Reputation: 6,795

Post » Thu Nov 29, 2012 1:09 pm

I'm also whiling to pay someone for assistance on this. Please it is really urgent!
B
40
S
8
G
6
Posts: 58
Reputation: 6,795

Post » Fri Nov 30, 2012 10:15 am

@Ashley, this bug is caused, because the C2 engine handles the touch event. Is there a way I can first handle the touch event, and then send the event to the C2 engine?
B
40
S
8
G
6
Posts: 58
Reputation: 6,795

Post » Fri Nov 30, 2012 3:28 pm

@JACLEMGO - try attaching to the touch events with capture enabled (set the third parameter to true). This will mean your event handler is called before it reaches any of C2's plugins. However, be sure not to block the event, otherwise it won't reach any of C2's plugins at all.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Mon Dec 10, 2012 2:11 pm

Thanks Ashley that worked.

Another question. As from above, this plugin creates buttons on runtime, but its not a "world" type, it is an "object". But I want to render 3 different squares during edit time, so the dev can position them, these positions can then be used during runtime to position the buttons. Is this possible?
B
40
S
8
G
6
Posts: 58
Reputation: 6,795


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests