Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17080

Changing spriteFrame

$
0
0

@agostta wrote:

Hello,
How i change the image of my Sprite from javascript?

item_node.getComponent('cc.Sprite').spriteFrame = ???

I tryed it to instanciate like i see in other examples, but i think it dont work more..

cc.SpriteFrame.create("res/raw-assets/images/itens/weapon/sword_1.png", cc.rect(0, 0, 100, 100))

Thanks

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17080

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>