Re: [Flashcoders] Using BitmapData to make a mask (AS3)

2008-08-15 Thread jonathan howe
Just wanted to point out that Glen's response is to Omar's (similar)
question... so Omar, don't ignore this one!

On Thu, Aug 14, 2008 at 7:15 PM, Glen Pike <[EMAIL PROTECTED]>wrote:

> Hi,
>
>   There are a few examples on the www about sending Bitmap data to the
> server Mario's is a good starting point -
> http://www.quasimondo.com/archives/000572.php Anyway, there are other
> examples about which do compression/decompression on your data so you could
> save it into your DB too..
>
>   Hope this is useful
>
>   Glen
>
>
> Zeh Fernando wrote:
>
>> Put the bitmap on a display container, set the .mask of the masked object
>> as being that object that contains the bitmap, set cacheAsBitmap of both to
>> true. So it'll be a normal masked object, but it'll respect the bitmap
>> transparency (instead of using the image's box as the transparency mask).
>>
>> Zeh
>>
>> jonathan howe wrote:
>>
>>> Hallo,
>>>
>>> I'm loading transparent pngs in as Bitmaps and placing them within a
>>> display
>>> object. I'd like to create a mask that is the same shape as the
>>> non-transparent pixels, (so that I can overlay a gleam animation).  Is
>>> there
>>> an easy way to use a Bitmap or BitmapData as a mask that respects the
>>> shape
>>> of the bitmap?
>>>
>>> Please lend me your awesomeness for a moment,
>>> -jonathan
>>>
>>>
>>>
>>>
>>>
>>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Using BitmapData to make a mask (AS3)

2008-08-14 Thread Glen Pike

Hi,

   There are a few examples on the www about sending Bitmap data to the 
server Mario's is a good starting point - 
http://www.quasimondo.com/archives/000572.php 
  
   Anyway, there are other examples about which do 
compression/decompression on your data so you could save it into your DB 
too..


   Hope this is useful

   Glen

Zeh Fernando wrote:
Put the bitmap on a display container, set the .mask of the masked 
object as being that object that contains the bitmap, set 
cacheAsBitmap of both to true. So it'll be a normal masked object, but 
it'll respect the bitmap transparency (instead of using the image's 
box as the transparency mask).


Zeh

jonathan howe wrote:

Hallo,

I'm loading transparent pngs in as Bitmaps and placing them within a 
display

object. I'd like to create a mask that is the same shape as the
non-transparent pixels, (so that I can overlay a gleam animation).  
Is there
an easy way to use a Bitmap or BitmapData as a mask that respects the 
shape

of the bitmap?

Please lend me your awesomeness for a moment,
-jonathan






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Using BitmapData to make a mask (AS3)

2008-08-14 Thread Zeh Fernando
Put the bitmap on a display container, set the .mask of the masked 
object as being that object that contains the bitmap, set cacheAsBitmap 
of both to true. So it'll be a normal masked object, but it'll respect 
the bitmap transparency (instead of using the image's box as the 
transparency mask).


Zeh

jonathan howe wrote:

Hallo,

I'm loading transparent pngs in as Bitmaps and placing them within a display
object. I'd like to create a mask that is the same shape as the
non-transparent pixels, (so that I can overlay a gleam animation).  Is there
an easy way to use a Bitmap or BitmapData as a mask that respects the shape
of the bitmap?

Please lend me your awesomeness for a moment,
-jonathan






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Using BitmapData to make a mask (AS3)

2008-08-14 Thread Ashim D'Silva
You should be able to copyChannel the BitmapDataChannel.ALPHA from the image
you loaded onto the bitmap you use for the gleam. However animating this
then means moving only a single channel. Which may or may not be possible
without reprocessing the bitmapData.
It's only a rough idea, but take a look...
You could also copy the alpha channel onto all the other channels of a new
bitmapData which will give you a black silhouette which you could use as a
mask.

2008/8/14 jonathan howe <[EMAIL PROTECTED]>

> Hallo,
>
> I'm loading transparent pngs in as Bitmaps and placing them within a
> display
> object. I'd like to create a mask that is the same shape as the
> non-transparent pixels, (so that I can overlay a gleam animation).  Is
> there
> an easy way to use a Bitmap or BitmapData as a mask that respects the shape
> of the bitmap?
>
> Please lend me your awesomeness for a moment,
> -jonathan
>
>
>
>
>
> --
> -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Using BitmapData to make a mask (AS3)

2008-08-14 Thread jonathan howe
Hallo,

I'm loading transparent pngs in as Bitmaps and placing them within a display
object. I'd like to create a mask that is the same shape as the
non-transparent pixels, (so that I can overlay a gleam animation).  Is there
an easy way to use a Bitmap or BitmapData as a mask that respects the shape
of the bitmap?

Please lend me your awesomeness for a moment,
-jonathan





-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders