actionscript 3 - How to access sprite sheet as3 -


i new action script 3, please tell me how access each image inside sprite sheet class as3 or other reference project kindly provide me.

also step step process access these images inside custom class.

thanks in advance.

there's bit of work involved when comes sprite sheets. there frameworks , libraries this.

it depends on technique use display things (regular displayobjects, blitting, starling, ...)

you should have sprite sheet bitmapdata object, either loading loader or embedding it. (how works not within scope of question, assume)

from there, code such sheet: cut pieces. create second bitmapdata object, character or whatever. bitmapdata display. example of bitmap object.

what use copypixels() copy portions of sprite sheet character bitmapdata. methods takes rectangle (among other things) parameter specifies portion of source bitmapdata (that's sprite sheet) should copied.

what have change sections copied depending on want achieve. maybe there's sequence in sheet, have move rectangle object in order copy different "frames" of animation.

as mentioned, there other ways display data, in essence boils down copying pixels sheet , throwing them @ display them. , copypixels() method that.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -