We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Migrating “call js” functions to custom puzzle plugins

Home Forums Puzzles Migrating “call js” functions to custom puzzle plugins

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #36155

    Could anyone possibly offer some solutions they’ve found as to how we can more easily apply our “call JS” app.ExternalInterface functions?

    I’ve used the technique of:

    return js code here

    And the technique:

    function code(block) {
        var fun = Blockly.JavaScript.provideFunction_(‘myFunction’, [
            function ${Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_}(a, b, c) {
                console.log(a, b, c);
        return ${fun}(1, 2, 3);;

    Sorry the tics in the .block code breaks up the markup here.
    However, there seems to be problems in both.

    Custom puzzles keep saying they’re malformed, error ridden.

    If anyone has solutions, I’d love to hear your methods.


    Edit: or possibly importing functions from other js files?
    (I find the .block format difficult to go “straight-to” JavaScript ONLY parsing …then back.
    I’ve been reviewing the blockly docs but no dice. :wacko: )

    Or should we work on using the “JS-Interpreter” (acorn_interpreter.js) from GitHub?

    • This topic was modified 1 month, 2 weeks ago by GlifTekGlifTek.

    Solved EXCEPT for the “/n” syntax used in some js.
    .blockly doesn’t like this.

    Yuri KovelenovYuri Kovelenov


    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.