# CSS Sprites with AS3

**URL:** https://forum.kirupa.com/t/css-sprites-with-as3/315858
**Category:** flash
**Created:** [November 5, 2010, 7:34pm UTC](https://forum.kirupa.com/t/css-sprites-with-as3/315858 "2010-11-05T19:34:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NikoAS3](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@NikoAS3](https://forum.kirupa.com/u/NikoAS3)
#### Post date: [November 5, 2010, 7:34pm UTC](https://forum.kirupa.com/t/css-sprites-with-as3/315858/1 "2010-11-05T19:34:38Z")

</div>

My IconButton class extends the SimpleButton and works like CSS Sprites by slicing the given image and setting those slices as upState, overState and downState. The IconButton has one extra state: disabled.

Read more and download source and example files:

> **[CSS sprites with AS3 | Niko Helle](http://nikohelle.net/2010/11/03/css-sprites-with-as3/)**
>
> CSS sprites is a very convenient way to use images. Graphics are placed into one file and CSS defines which part of the image is shown on mouse over and mouse click. One image could hold all graphics used on a website. Flash has skins for components...
