Will using clipRect in an Image constructor effect performance at all? I mean is there any benefit to using separate assets instead of using clipRect to create multiple graphics?
Does clipRect effect performance?
ClipRect is how Spritemaps work internally. The benefit to using separate assets is that it’s not really any slower, and makes your code easier to read. It’s your choice really - both approaches are about equal in terms of performance.
If my documentation-fu is strong, AS3 constructors don’t get compiled, so they should be as light as possible. Doing image manipulation in them is probably not a good idea. Likely better to make an assets class and have it do the clipping for you and offer the results up. Or just make an init() function and call that from the constructor. Otherwise the performance should be equal.
Like @Ultima2876, when a graphic is drawn, its pixels are just copied onto the game buffer (the screen, if you will). Setting a clipRect and only copying some of the pixels is technically faster, since there are fewer pixels to copy.
Long story short, specifying a clipping rectangle has no negative impact on performance.