Actions using Javascript + memory game question?

  1. 7 years ago

    Hi, I have a couple of questions

    I would like to know if it is possible to hide, move objects or perform other actions directly using javascript.

    can I put a lot of images in the memory game (for example, there would be 20 images fed in the game), and when the game starts, it randomly uses a few of these images (only 5 or 6, there would only be 10 or 12 hidden images) so that when the memory game is played many times, it wouldn't be the same images over and over again

  2. MH, I've never gotten an explanation of how the Memory Game works. Do you have information on it? Thank you,

  3. Carlton, you just drag the memory game from the objects, and put it on the page, and then drag the images you want to use inside the memory game.

    But, the problem is that the game uses the exact images, if you put 20 images, it uses the 20 images and create 40 hidden images in the game..

    So, is there a way to use only 5 images randomly from the 20 images for example, so that every time the game begins, it wouldn't be the same over and over again?

  4. I'm sorry MH, I have no knowledge of this game. I've asked numerous time for insight but have had no response. I have found no information about it either.

  5. No problem.. It is available as a widget in the objects panel, but it would be much better if it can be done this way..

    Do you know the answer to my first question?

  6. Sorry, no.

  7. Hey,

    Still no answer

  8. Paolo A

    18 Oct 2016 Administrator

    1- Yes, in the Example project at page 31 "Run Javascript Action" there is an example on how to use the code editor's snippet in combination with PubCoder events' namespaces.
    2- Interesting, have to look into it.

  9. Hello Paolo, Thanks for your answer

    I know how to use Javascript to trigger events.. but I was wondering if I can use it to trigger actions that doesn't have to be connected to an event, for example: move an object directly via script, instead of assigning that move action to a touch up or touch down event and then trigger the event using Javascript

  10. Paolo A

    19 Oct 2016 Administrator

    Actions are tied to - and triggered by - events. A workaround is to insert an object outside the visible area, add actions to the touch up event, and trigger the touch up event actions attached to that object from outside. Touch will never be triggered by the user, it's just a way to trigger those actions. Hope this is clear.


or Sign Up to reply!