# About textureAsset of the Sprite.js

**URL:** <https://forum.playcanvas.com/t/about-textureasset-of-the-sprite-js/2439>\
**Category:** Help & Support\
**Created:** [September 12, 2016, 3:29am UTC](https://forum.playcanvas.com/t/about-textureasset-of-the-sprite-js/2439 "2016-09-12T03:29:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WingUNO](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/winguno/32/1678_2.png) [@WingUNO](https://forum.playcanvas.com/u/WingUNO)\
**Post date:** [September 12, 2016, 3:29am UTC](https://forum.playcanvas.com/t/about-textureasset-of-the-sprite-js/2439/1 "2016-09-12T03:29:53Z")

</div>

Hi, all !  
I am using the Sprite.js in my project and have met a problem on changing the textureAsset when the sprite is clicked. I just did like this :

![](https://forum-files-playcanvas-com.s3-eu-west-1.amazonaws.com/original/2X/9/93691934c9febfd80c8f5311f956f029913dc5d3.png)

But nothing changed.

(PS: How can I solve this problem: [Dashboard Header](http://forum.playcanvas.com/t/dashboard-header/2428))

Thank you for your time !

---

<div class="post-metadata">

**Author:** ![max](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/max/32/477_2.png) [@max](https://forum.playcanvas.com/u/max)\
**Post date:** [September 12, 2016, 9:16am UTC](https://forum.playcanvas.com/t/about-textureasset-of-the-sprite-js/2439/2 "2016-09-12T09:16:45Z")

</div>

If you look in the code of sprite library, you will find that it [does not handles texture updates](https://github.com/playcanvas/sprites/blob/master/sprite.js#L167) dynamically.  
You could set it’s `texture` property to actual texture, which is `musicIcon.resource` in your case.

---

<div class="post-metadata">

**Author:** ![WingUNO](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/winguno/32/1678_2.png) [@WingUNO](https://forum.playcanvas.com/u/WingUNO)\
**Post date:** [September 12, 2016, 9:42am UTC](https://forum.playcanvas.com/t/about-textureasset-of-the-sprite-js/2439/3 "2016-09-12T09:42:34Z")

</div>

Thank you very much, max ! I will try it.
