> Date: Wed, 8 Sep 2010 19:20:05 +0200
> From: [email protected]
> To: [email protected]
> Subject: Re: [Flashcoders] Impossible?
> 
> Forget about the mask until you get the output to work without it.

There was a fundamental error, now corrected. However, now what I get is black 
"fire" against a blue background:

            if (_bitmapFlag == false)
            {
                _fire = new BitmapData(865, 92, _bitmapFlag, 0xffffff);
                addChild(new Bitmap(_fire));
                _fireSprite.addChild(new Bitmap(_fireMask));
                addChild(_fireSprite);
                _fireSprite.mask = _fireMaskSprite;
                _fireSprite.cacheAsBitmap = true;
            } else {
                _fireMask = new BitmapData(865, 92, _bitmapFlag, 0xffffff);
                _fireMaskSprite.addChild(new Bitmap(_fireMask));
                addChild(_fireMaskSprite);
                _fireMaskSprite.cacheAsBitmap = true;
            }
...
        private function _createPalette(idx:int, _bitmapFlag:Boolean):void {
            _redArray = [];
            _greenArray = [];
            _blueArray = [];
            _alphaArray = [];
            for (var i:int = 0; i < 256; i++) {
                var gp:int = new int();
                gp = _fireColor.getPixel(i, 0);
                if (gp < 1050112)
                {
                    _redArray.push(0);
                    _alphaArray.push(255);
                    _greenArray.push(0);
                    _blueArray.push(255);
                } else if (_bitmapFlag == false) {
                    _redArray.push(gp);
                    _alphaArray.push(0);
                    _greenArray.push(0);
                    _blueArray.push(0);
                } else {
                    _redArray.push(0);
                    _alphaArray.push(0);
                    _greenArray.push(0);
                    _blueArray.push(0);
                }
            }
        }

Most important is masking out the blue background. Please advise.
TIA,
George
                                          
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to