Ciao a tutti
qualcuno conosce un modo per impostare il metodo di fusione di un clip tramite actionscript?
Grazie!
Ciao a tutti
qualcuno conosce un modo per impostare il metodo di fusione di un clip tramite actionscript?
Grazie!
cioèOriginariamente inviato da AdventChild
Ciao a tutti
qualcuno conosce un modo per impostare il metodo di fusione di un clip tramite actionscript?
Grazie!![]()
cosa sono le fusioni?
![]()
la verità non è una meretrice che si getta al collo di chi non la vuole ma anzi essa è dotata di una così altera bellezza che anche chi sacrifica tutto per ottenerla non è sicuro di averla raggiunta !
modalità di visualizzazione di un layer e fusione con quelli sottostanti
Esempio: Aggiungi, Sottrai, Differenza, Esclusione...
(pannello proprietà)
Sono disponibili anche in Actionscript, cerca nella guida di Flash blendMode, è una proprietà dei MovieClip. Riporto le prime linee della guida a tal proposito.
blendMode (MovieClip.blendMode property)
public blendMode : Object
The blend mode for this movie clip. The blend mode affects the appearance of the movie clip when it is in a layer above another object onscreen.
Flash Player applies the blendMode property on each pixel of the movie clip. Each pixel is composed of three constituent colors (red, green, and blue), and each constituent color has a value between 0x00 and 0xFF. Flash Player compares each constituent color of one pixel in the movie clip with the corresponding color of the pixel in the background. For example, if blendMode is set to "lighten", Flash Player compares the red value of the movie clip with the red value of the background, and uses the lighter of the two as the value for the red component of the displayed color.
The following table describes the blendMode settings. To set the blendMode property, you can use either an integer from 1 to 14 or a string. The illustrations in the table show blendMode values applied to a circular movie clip (2) superimposed on another onscreen object (1).
E il relativo codice di esempio
this.createEmptyMovieClip("mc1", this.getNextHighestDepth());
this.createEmptyMovieClip("mc2", this.getNextHighestDepth());
this.blendMode="layer";
this.createTextField("blendLabel", this.getNextHighestDepth(), 50, 150, 100, 100)
fillClip(mc1, 0x00AA00, 0x22FFFF, 100, 100)
fillClip(mc2, 0xFF0000, 0x2211FF, 100, 50)
mc2._x = 33;
mc2._y = 33;
var blendModeIndex = 0;
setInterval(changeBlendMode, 1000);
function changeBlendMode()
{
mc2.blendMode = blendModeIndex % 14 + 1 ;
// values 1 - 14
blendLabel.text = (blendModeIndex% 14 + 1) + ": " + mc2.blendMode;
blendModeIndex++;
}
function fillClip(mc:MovieClip, color1:Number, color2:Number,
alpha1:Number, alpha2: Number)
{
matrix = {a:100, b:0, c:0, d:0, e:100, f:0, g:50, h:20, i:1};
mc.beginGradientFill("linear", [color1, color2], [alpha1, alpha2], [0, 0xFF], matrix);
mc.lineStyle(8,0x888888,100)
mc.moveTo(0, 0);
mc.lineTo(0, 100);
mc.lineTo(100, 100);
mc.lineTo(100, 0);
mc.lineTo(0, 0);
mc.endFill();
}
Nella stessa pagina della guida trovi tutti i valori utilizzabili con Actionscript.