# Is there a method or function that will return the number of pixels?

**URL:** https://forum.kirupa.com/t/is-there-a-method-or-function-that-will-return-the-number-of-pixels/14880
**Category:** flash
**Created:** [March 3, 2003, 11:59pm UTC](https://forum.kirupa.com/t/is-there-a-method-or-function-that-will-return-the-number-of-pixels/14880 "2003-03-03T23:59:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cadmiumgreen](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@cadmiumgreen](https://forum.kirupa.com/u/cadmiumgreen)
#### Post date: [March 3, 2003, 11:59pm UTC](https://forum.kirupa.com/t/is-there-a-method-or-function-that-will-return-the-number-of-pixels/14880/1 "2003-03-03T23:59:20Z")

</div>

Is there a function or method in ActionScript that can return the # of pixels used?  
I’m doing an experimental project and i would like to know.

thank you,  
byron  
cadmiumgreen

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 4, 2003, 3:10am UTC](https://forum.kirupa.com/t/is-there-a-method-or-function-that-will-return-the-number-of-pixels/14880/2 "2003-03-04T03:10:09Z")

</div>

As far as I know… no there is not.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 4, 2003, 1:21pm UTC](https://forum.kirupa.com/t/is-there-a-method-or-function-that-will-return-the-number-of-pixels/14880/3 "2003-03-04T13:21:20Z")

</div>

number of pixels of what?

measurements in flash are based on (screen) pixels. Any width or height measurement is given in pixels. As long as your scaling is 100%, to find the number of pixels in say, an image, use \_width\*\_height… though its probably not what you want I assume?

In general however, as lost was alluding to, per-pixel information cannot be determined in Flash.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 4, 2003, 5:13pm UTC](https://forum.kirupa.com/t/is-there-a-method-or-function-that-will-return-the-number-of-pixels/14880/4 "2003-03-04T17:13:14Z")

</div>

Good point there Sen. I was assuming per-pixel information, I didn’t think of what you said.
