Jump to content

create a link sprite (interactive) on the loader


Recommended Posts

hi, this is weird, but I add a sprite to the loader bar, (first load texture, when texture it's loaded I create sprite var, and when sprite width/height is correct detected (on the first frame it's show 1), then I add to stage, and everything it's ok,  the problem it's before that I do:


this.logo.interactive = true;
this.logo.buttonMode = true;        
this.logo.click = this.logo.touchstart = this.clickLogo.bind(this);


but the function clickLogo never call,

        window.open('MY LINK!!!/');


all other links on my game works, so, is there some problem to call events on loader? (I make this code on the loader.js class, and swapChildren my logo for the barFg, so this way the bar is over my logo.




EDIT: I forgot to mention, no debugs errors at all, just the event's don't fired

Link to comment
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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...