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.

Register an ExternalInterface function in a Vue-Verge application !

Home Forums Programming Register an ExternalInterface function in a Vue-Verge application !

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32669
    aminemod
    Customer

    hello community :bye:

    Working on a vue/verge integrated, still struggling with using the app.ExternalInterface tool to add costume function to the app.

    issue 1: the Functions registered in the “prepareExternalInterface” are not recognized in the Puzzle interface.
    issue 2: the app instance is not accessible through the V3DApp.vue.

    hope I was clear describing the situation. :)
    Thanks for considering my request.

    #32680
    origgin
    Participant

    issue 1: the Functions registered in the “prepareExternalInterface” are not recognized in the Puzzle interface.

    You need to declare your functions as below

    app.ExternalInterface.logSum = function (value1, value2) {
                console.log(value1 + value2)
    }

    and call them using their respective puzzles

    issue 2: the app instance is not accessible through the V3DApp.vue.

    This was not clear for me, but you can access you v3d app using v3d.apps[0]

    #32691
    aminemod
    Customer

    hey origgin thanks for the reply,

    i have tried this method but it seems not to work since the registred function :

    function prepareExternalInterface(app) {
        app.ExternalInterface.myJSFunction = function() {
            console.log('Hello, World!');
        } 
    }

    doesn’t appear on the “callJsFunciton” in the Puzzle GI.

    NB : this method works as charm working without a framework. Im now using the VUE JS integration for Verge.
    Thank u :)

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