-
Get Color of X/Y Pixel
Ok, I know I've seen that one of the new abilities will be the ability to get the color of X/Y pixel in movieClip or Bitmap perhaps. Been ready to dive in and try some things with this feature, however not sure where to begin. Searching on any keywords in help brings up the entire help, so if someone could give me some guidance on starting with this, much appreciated thanks.
-
Heh, ok got a little impatiant. Found it:
BitmapData.getPixel (x,y);
That is after you create a myBitmapData object. I have another question on that. In order for me to getPixel(x,y) of a certain movieClip I had to draw(movieClip) on my bitmapData clip and then attach that into a blank movieClip. Is there a way to just transform the existing movieClip to get this data without the need to make a copy first? Probably jumping the gun on questions here, so answer at your leisure...
-
I was playing with the bitmap-manipulation functions last night. Really cool! Been waiting for this sort of thing for a long time!
Didnt put a lot of work into it, but atleast i got a hang of how it works.
http://www.salomonsson.se/f8/pixels1.html (getPixel, setPixel)
http://www.salomonsson.se/f8/pixels2.html (copyPixels)
(fla-files:
http://www.salomonsson.se/f8/pixels1.fla
http://www.salomonsson.se/f8/pixels2.fla
no comments in the code... sorry)
/Tommy Salomonsson
www.salomonsson.se
-
tommysalo want to see you code but links are broken
Dear tommysalo,
I would like to see that code that you have written to
exercise the bitmap manipulation functions - problem
the links in you posting are broken.
Thanks,
W
-
Ryan Thomson
Originally Posted by wgross
Dear tommysalo,
I would like to see that code that you have written to
exercise the bitmap manipulation functions - problem
the links in you posting are broken.
Thanks,
W
right-click the link and 'save as', worked for me although clicking the links didn't
-
Errors opening HTML and .fla files
Dear Tommysalo,
When I do a saveAs on HTML links then open, I get
The system cannot find the path specified.
Then when I try to open the .fla files in
Flash CS3 Professional
I get error:
Unexpected file type.
Would it be possible for you to include this content as plain text?
Thanks,
W
-
I had that files on another computer, and I did a quick check without finding it. It has to be in one of my backup-cd:s. I'll do another check.
It wasn't that fancy. On mouse down it copied a rectangular area of the image beneath the mouse, and on second click it pasted that area on the new position of the mouse. Just copyRect of the BitmapData class.
Is there something special you are intrersted in concerning BitmapData?
/Tommy Salomonsson
www.salomonsson.se
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|