KamiFightingSpirit Posted March 16, 2020 Share Posted March 16, 2020 (edited) Hey, For my program, I have a loader which loads a bunch of assets, after loading it calls the setup function. It does this via: loader .add("./assets/plutoShrunk.jpg") .add("./assets/sun.jpg") .add("./assets/mars.jpg") .load(setup); My setup function then does everything else (creating containers, creating textures from resources, drawing graphics etc) including kicking off the ticker. At the bottom of my setup function, but still within its scope, I have added some event listeners: //Add event listeners plutoGraphic.on("mouseover", plutoHoverEffects); plutoGraphic.on("mouseout", plutoHoverEffects); marsGraphic.on("mouseover", marsHoverEffects); marsGraphic.on("mouseout", marsHoverEffects); My problem is, these sometimes load in and sometimes they don't (meaning I cannot access them by hovering over the chosen object). Any ideas what I am doing wrong? Please let me know if more information is required. Edited March 16, 2020 by KamiFightingSpirit ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 16, 2020 Share Posted March 16, 2020 My usual strategy is to load everything again if there was an error. There was this thread: As for hovers - I did not meet that problem. Please post more information about hover fail. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.