Bonjour,

quel sera le contenu d'une page .mxml pour exécuter ce script (je débute en flex) .

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
 
<![CDATA[
 
	private function doInit():void {
    // rectangle rouge
    image.graphics.beginFill( 0xff0000 );
    image.graphics.drawRect(0,0,40,40);
    image.graphics.endFill();
    // cercle vert
    image.graphics.beginFill( 0x00ff00 );
    image.graphics.drawCircle(100, 100, 20);
    image.graphics.endFill();
    // ligne
    image.graphics.lineStyle(4, 0xCCCCC, 1, true, LineScaleMode.NORMAL, CapsStyle.ROUND,
    JointStyle.MITER, 1);
    image.graphics.moveTo(0, 0);
    image.graphics.lineTo(100, 100);
 }
 
	]]>
Merci