Ashley's Recent Forum Activity

  • Hi plugin developers,

    Just a heads up - we're getting bug reports that projects don't work after exporting with minifying enabled. I'm pretty sure this is because of third party plugins.

    The minifier renames object properties. If you mix object.prop and object["prop"] syntax your plugin will probably break the project on export. From the SDK documentation:

    hen exporting, Construct 2 gives the user the option to 'Minify script'. This runs the common and runtime scripts through Google Closure Compiler's ADVANCED_OPTIMIZATIONS mode. This imposes some limitations on what scripts can do. You must obey these limitations when writing your plugins, otherwise your plugin will be broken on export. More details can be found here (http://code.google.com/closure/compiler/docs/api-tutorial3.html).

    The main thing is to always use dot syntax (Object.property) rather than bracket syntax (Object["property"]). All properties using dot syntax are changed by Closure Compiler, but none of the properties in bracket syntax are changed. Therefore, if you use Object.property in one place and Object["property"] in another to access the same property, the plugin will be broken on export. You may still use bracket syntax (e.g. for a dictionary of user-inputted strings) - just be aware of how Closure Compiler will transform the code.

    Remember the edittime scripts are not passed through Google Closure Compiler, so you can write them how you like.

    Please double check all your plugins correctly minify on export! And don't forget to read the documentation! <img src="smileys/smiley1.gif" border="0" align="middle">

  • It seems minify will change the name of properties in an object.

    Yes, this is how the minifier works, and it's talked about in the SDK documentation.

    When exporting, Construct 2 gives the user the option to 'Minify script'. This runs the common and runtime scripts through Google Closure Compiler's ADVANCED_OPTIMIZATIONS mode. This imposes some limitations on what scripts can do. You must obey these limitations when writing your plugins, otherwise your plugin will be broken on export. More details can be found here (http://code.google.com/closure/compiler/docs/api-tutorial3.html).

    The main thing is to always use dot syntax (Object.property) rather than bracket syntax (Object["property"]). All properties using dot syntax are changed by Closure Compiler, but none of the properties in bracket syntax are changed. Therefore, if you use Object.property in one place and Object["property"] in another to access the same property, the plugin will be broken on export. You may still use bracket syntax (e.g. for a dictionary of user-inputted strings) - just be aware of how Closure Compiler will transform the code.

    Remember the edittime scripts are not passed through Google Closure Compiler, so you can write them how you like.

    If code like you pointed out occurs in official plugins, behaviors or scripts please do file a bug report. However, if it's in third party plugins or behaviors you should tell the developer about it, not us... and then tell them off for not reading the documentation and writing a broken plugin <img src="smileys/smiley1.gif" border="0" align="middle">

  • Looping works in some browsers but not others, I can't remember. Just make sure you test it so on browsers which do support looping you don't get the music playing twice.

  • Sorry, browsers have really bad audio support at the moment. All you can do is keep your browser up to date and hope they fix it soon. There's nothing much we can do to fix it.

  • Ah, I see the confusion now. You've missed the 'initial visibility' property :)

    Layers have two properties:

    Initial visibility - only affects the runtime

    Visible in editor - only affects the editor

    The checkbox is a shortcut for the "visible in editor" option. So if you want to change the runtime use the "initial visibility" option! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Well, it's always tricky to fix issues I can't reproduce... no way to know if I've fixed it. Still, I'll revise the http server code and see if I can come up with something...

  • Works fine for me in all browsers in both preview modes: test

    This is why you should always provide a .capx: it seems to be working fine here, so presumably you're doing something else you hadn't realised that is causing a problem.

  • Good point, it's a useful event that is missing. Added for next build.

  • Caer, try one of the things zenox98 suggested.

  • I'm not sure how your host is set up, maybe you need to restart the server or wait a while for it to check the new .htaccess. Best to go to your host with these questions.

  • Can you make a .capx file? Setting things invisible works fine for me.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Isn't that what setting an object invisible does?

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 21 Oct, 2026

Twitter
Ashley has 1,829,757 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs