0

私は、ユーザーが . ほとんどの色でうまく機能しますが、2 つのオレンジ色または紫色のスプラットを重ね合わせると、奇妙な色の混合が作成されます。このリンクで問題を確認できますhttp://img812.imageshack.us/img812/1497/screenshot20130507at114.png

スプラットを作成するために使用しているコードは次のとおりです。

var the_color:uint;

        var splat = new splat_wrap;
        splat.rotation = (Math.random() * 360);
        var rand=Math.ceil(Math.random() * 2);
        splat.gotoAndStop(rand)
        splat.x=msx;
        splat.y=msy;
        this.splatMc.addChild(splat);


        if(this.color=='red')the_color=0xFF0000;
        else if(this.color=='yellow') the_color=0xFFFF00;
        else if(this.color=='blue') the_color=0x0000FF;
        else if(this.color=='green') the_color=0x00FF00;
        else if(this.color=='pink') the_color=0xFF00FF;
        else if(this.color=='black') the_color=0x000000;
        else if(this.color=='purple') the_color=0xCC3399;
        else if(this.color=='orange') the_color=0xFF8000;
        else the_color=0x00FF00;

        var ct:ColorTransform = new ColorTransform();
        ct.color=the_color;


        mat.identity();
        mat.rotate(splat.rotation/180*Math.PI)
        mat.translate(splat.x, splat.y)
        bmd.draw(splat,mat,ct, "add")

        this.splatMc.removeChild(splat);
4

1 に答える 1