Skip to main content
vann36034762
Inspiring
February 3, 2017
Answered

Counting Clicks With Stage Button and Text Entry Box

  • February 3, 2017
  • 2 replies
  • 869 views

I have a stage and a TEB. I want the stage to count clicks but not when I click on the TEB. Right now When I click on the TEB it counts it as a click to even though the TEB is set to no action and the stage is set it to increment only by 1. I tried putting a click box in between and that only stops it once. Is this a bug? What is the solution around it?

This topic has been closed for replies.
Correct answer vann36034762


Nevermind. I found the solution was to create a click box beneath the TEB that is set to enable itself. Otherwise it seems when you click on a click box it disables itself.

2 replies

Lilybiri
Legend
February 3, 2017

Stacking interactive objects in the same location is never a good idea, result is unpredictable, and probably different between SWF and HTML output. The TEB (validated or not?) has at least a Success event which you could use to decrement the counter. But as Rod asked, please explain how you are creating and incrementing the counter?

RodWard
Community Expert
Community Expert
February 3, 2017

How is your 'stage' detecting these clicks?  Are you using a Click Box or another interactive object such as a button that covers the stage area?

Is your TEB on a higher layer in the stacking order than the object that is detecting clicks on the stage area?

vann36034762
Inspiring
February 3, 2017

The stage is made with a button. The TEB is above it.

The stage is set up as

if 1=1

Increment var_fieldName with 1

I tried decrement on the field but that result isn't predictable. Sometimes it does nothing. The field is not set to validate. The stage is a separate button to validate.

Lilybiri
Legend
February 3, 2017

I don't understand: a button is triggering that action (could have been a simple action, why use a conditional action?). Are you using that action for a number of buttons on the stage? Maybe it would clarify if you showed a screenshot of the stage and the timeline.