Hello, il y aurait peut-être une propriété qui gère la superposition de couleur dans un movieclip, je ne l'ai pas trouvée.. ?

faire une synthèse soustractive ou additive de couleurs par superposition.
Mise à part la propriété _alpha qui n'est pas satisfaisante...

ci-joint un essai en soustractif non concluant (pas de noir au centre)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
program Project7;
 
{$FRAME_WIDTH 550}
{$FRAME_HEIGHT 400}
{$FRAME_RATE 12}
{$BACKGROUND $f0f0f0}
 
uses
  Flash8;
 
type
 diapo=class(movieclip)
  private
   procedure Roundrect(x,y,w,h,radius:number);
  public
   constructor create(aowner:movieclip;taille,couleur:integer);
 end;
 
 scene=class(movieclip)
  cyan,magenta,jaune:diapo;
  constructor create;
 end;
 
 
constructor scene.create;
begin
 inherited create(_root,'scene',0);
 
 Cyan:=diapo.create(self,200,$00ffff);
 with cyan do
 begin
  _x:=300;
  _y:=200;
 end;
 
 jaune:=diapo.create(self,200,$ffff00);
 with jaune do
 begin
  _x:=350;
  _y:=250;
 end;
 
 magenta:=diapo.create(self,200,$ff00ff);
 with magenta do
 begin
  _x:=400;
  _y:=150;
 end;
end;
 
constructor diapo.create(aowner:movieclip;taille,couleur:integer);
begin
 inherited create(aowner,'diapo', aowner.getNextHighestDepth());
 _alpha:=50;
 beginfill($FFFDD0);
 Linestyle(4,clblack);
 roundrect(-taille/2,-taille/2,taille,taille,30);
 endFill();
 beginfill(couleur);
 roundrect(-taille/2.5,-taille/2.5,2*taille/2.5,2*taille/2.5,30);
end;
 
procedure diapo.Roundrect(x,y,w,h,radius:number);
var
 ra,b:number;
begin
  ra := x + w;
  b := y + h;
  moveTo(x+radius, y);
  lineTo(ra-radius, y);
  CurveTo(ra,y, ra, y+radius);
  lineTo(ra, y+h-radius);
  CurveTo(ra, b, ra-radius, b);
  lineTo(x+radius, b);
  CurveTo(x, b,x, b-radius);
  lineTo(x, y+radius);
  CurveTo(x, y, x+radius,y);
end;
 
 
begin
  scene.create;
end.
Je viens d'avoir une idée... peut-être avec les matrices et bitmapdata ?

ou blendmode ?