how to display a subimage from a SpriteImage using initializeFromMap?

19 views
Skip to first unread message

Ryan Jarvis

unread,
Apr 17, 2013, 1:02:31 PM4/17/13
to caa...@googlegroups.com
There was another thread asking a similar question but I still don't understand how to do this.

I have created a SpriteImage and called initializeFromMap with an object that has the same structure as the output of the online sprite packer tool.

Next I create an ActorContainer and call setBackgroundImage passing in the SpriteImage object.

Now how do I get the ActorContainer just to show a specific subimage instead of showing the entire image that was passed into initializeFromMap?

Jon Hall

unread,
May 2, 2013, 8:57:31 PM5/2/13
to caa...@googlegroups.com
I'm hoping it's more complex than just this, but you've used setSpriteIndex( integer ) on the ActorContainer to set the specific sub image you're wanting?
Reply all
Reply to author
Forward
0 new messages