acts.SetVisible to 1 instead of true/false in commonaces.js

Bugs will be moved here once resolved.

Post » Wed Sep 30, 2015 1:08 am

Problem Description
The SetVisible action in the appearance ACES sets the visible property to 1 instead of true (or 0 instead of false) .
this.visible = v;

Subsequent check on visibility will fail because the value should be true/false

This is the correct code (this.visible = (v !== 0);) in line 694 in
c:\Program Files\Construct 2\exporters\html5\commonaces.js

acts.SetVisible = function (v)
if (!v !== !this.visible)
this.visible = (v !== 0);
this.runtime.redraw = true;

Steps to Reproduce Bug
  • Add a video initially invisible
  • Add a button and attach the Set video to visible
  • Notice the visible property of the ACES has changed from false to 1

Observed Result
Visible property is set to 0 or 1

Expected Result
Visible property should be set to true or false

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 10

Construct 2 Version ID
Posts: 10
Reputation: 419

Post » Mon Oct 12, 2015 3:47 pm

I don't think this actually has any functional effect on anything because 0 is falsey and 1 is truthy, but I guess it could help the JIT to keep the type, so fixed this for the next build.
Scirra Founder
Posts: 25,294
Reputation: 200,972

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest