Hi,
maybe this will help;
http://www.unitzeroone.com/blog/2005/10/26/2-new-flash-8-examples-displace-smoke-displacement-spheres-source/
it's as2 but the id is the same.

hth
JC

On Thu, Sep 10, 2009 at 4:58 PM, Mendelsohn, Michael <
michael.mendels...@fmglobal.com> wrote:

> Hi list...
>
> I'm trying to render a spherical earth using a DisplacementMapFilter out of
> a flat movieclip of the landmasses but it isn't working too well for me.
>  Any suggestions?  I'd appreciate hearing any ideas.
>
> Thanks,
> - Michael M.
>
> private function renderOrnament():Sprite{
>        var makeCirc:Function = function(isFront:Boolean, diam:uint):Shape{
>                // used for masks and displacement
>                var c:Shape = new Shape();
>                var m:Matrix = new Matrix();
>                m.createGradientBox(diam,diam);
>                var colors:Array = (isFront !=
> true)?[0xFFFFFF,0x000000]:[0x000000,0xFFFFFF];
>                c.graphics.beginGradientFill(GradientType.RADIAL,
> colors,[1,1],[0,255],m);
>                c.graphics.drawEllipse(0,0,diam,diam);
>                c.graphics.endFill();
>                return c;
>        }
>        // container
>        var orn:Sprite = new Sprite();
>        // front "hemisphere"
>        var fh:Sprite = new Sprite();
>        orn.addChild(fh);
>        // front world (World is a mc of all the continents)
>        frontWorld = new World();
>        fh.addChild(frontWorld);
>        // front world mask
>        var circleMask:Shape = makeCirc(true,200);
>        fh.addChild(circleMask);
>        frontWorld.mask = circleMask;
>        // front world displacement
>        fh.filters = [new DisplacementMapFilter(new BitmapData(200,200), new
> Point(0,0), 1, 1,75, 75, DisplacementMapFilterMode.IGNORE, 1,0)];
>        return orn;
> }
>
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to