Remove sprite
amaso83
Hello CC

I have one SceneObject in Wade.js and this object has two sprites.

Now I want to remove second sprite. I try object.removeSprite(2) or object.removeSprite(1) but they don't work.

What should I do instead?

Thank you
1 Comment
foxcode

Hello amaso83, I work for cc as of last week.

 

If you want to remove it using an index, I believe you want the function "removeSpriteByIndex(index)"
You can also remove the sprite by passing the sprite object itself into "removeSprite(sprite)"

You can look at the documentation for scene object located here
http://www.clockworkchilli.com/index.php/developers/documentation?docs=symbols/SceneObject.html

Hope this helps, please reply if this doesn't solve your problem, good luck

Post a reply
Add Attachment
Submit Reply
Login to Reply