Sign in to follow this  
KamiFightingSpirit

Event Listeners Not Always Loading?

Recommended Posts

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 by KamiFightingSpirit

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.