Jump to content

Why isn't work while click on stage?


Wesley W
 Share

Recommended Posts

Hi,

This is my codepen : http://codepen.io/WW/pen/LGzpVv

what i wanna do is trying click on stage and get the mouse position value,

but, there's nothing happens while clickiing on stage.

the official example looks working great : http://pixijs.github.io/examples/index.html?s=demos&f=graphics-demo.js&title=Graphics

but mine isn't.

so, anyone any idea?

thanks for help. :)

 

PS : i guess the problem might because the stage width & height isn't fit to the renderer. just guess, still trying....

Link to comment
Share on other sites

You have nothing on the stage so nothing gets clicked. Add something and the click events are triggered. Also setting the stage width & height will scale the stage based on the width and height of stage. For example if you have a child in stage that is 100x100 px then setting the width and height of stage would be same as saying: stage.scale.x = w/100; stage.scale.y = h/100;

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.

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...
 Share

  • Recently Browsing   0 members

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