Jump to content

Henity

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. Henity

    Multiple Requests

    thanks for reply. I created the 'quitGame' shape then add it to the container which is added to the stage in 'inGameMenu' (its stage.addChild(inGameOptions)). My 'quitGame' is created outside of a function...its just part of the overall code. var quitGame = new createjs.Shape(); quitGame.graphics.beginStroke("#000").beginFill("#9932CC").drawRect(0, 0, 100, 50); quitGame.x = width/2 - 50; quitGame.y = height/2 - 25; inGameOptions.addChild(quitGame); But this is making me rethink how I create functions and organise my code. I'll tweak the 'inGameMenu' function but I know that will lead
  2. Henity

    Multiple Requests

    @mcolman based of your statement, is there a "clear all" function built-in javascript? Or something of the sort?
  3. Henity

    small games

    @gtibo I hope you don't mind me picking your brain every now and then regarding coding and best practises. This is really cool!
  4. Henity

    Multiple Requests

    Yes of course, and thank you for replying...I'm just not sure what to show so here goes: function aniFadeInOut(){ stage.removeChild(mainMenu); mainMenu.mouseEnabled = mainMenu.visible = false; createjs.Tween.get(fadeScene) .to({ alpha: 1 }, 1200) .wait(2000) .to({ alpha: 0 }, 1200) .call(addGameLoop); console.log("fade in pause 2s then out"); } // add gameLoop container to stage function addGameLoop(){ stage.addChild(gameLoop); startBtn.removeAllEventListeners('click'); onlyHitBox.on('click', movePlayer); } function movePl
  5. Henity

    Multiple Requests

    Hello everyone, I'm really confused. I created this flow for my game: start game > press key brings up in game menu > exit game to go back to main menu > start game again. Debugging purposes I have functions write to console when complete. It works as expected but these functions are called times two (sometimes three). What could be causing this? I've made sure my even listeners are on and off appropriately. There is no double click...I'm lost for words. I've attached screenshots. Thank you in advance, hopeful
  6. Henity

    Multiple Clicks

    Thank you!
  7. Henity

    Multiple Clicks

    Hello. I'm new here and finally found a reason to post. I'm also new to this kind of development. To the point: I am creating a transition using Tween and a container. My issue is when the play/user clicks on the hit box to start the animation/tween it doesn't account for multiple clicks which then plays the animation again. How do I not allow the function to execute when is it already running? I'm developing with CreateJS in case that matters. Thanks in advance.
×
×
  • Create New...