Jump to content

Search the Community

Showing results for tags 'createjs z-index addchild'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. This is a question and answer at the same time. So during an 'onclick' event I've used createjs to 'addChild' so that the 'child' or 'displayObject' is re - added to the canvas every time it's clicked. I've done this so that the 'displayObject' (in this case a bitmap), has a primery z-index, so it overlays all other children of the canvas or the canvas container. It seems a bit of a hack in that there doesn't seem an easy way to arrange your z-index with javascript. I haven't got the code in front of me but it's something like this; -bit map created stage.addChild(picture1); function(event){'click' -- bla bla addChild(picture1) } ....So I'm adding 'picture1' during the 'event'. when it's already added to the stage. So if you have a number of images say 20, each time it's clicked, it becomes the top of the stack. and the order 'addChild(picture"whatever")' is fired as many times as the user wants. This might be a createjs hack rather than a canvas hack, as the canvas is supposed to be continually redrawn. Any thoughts would be great and I'll grab the code and post it when I get the chance. H
×
×
  • Create New...