Bonjours j'ai un probleme avec 2 boutons composent que j'ai ajouter. J'aimerai leur ajouter du texte mais lorsque je le fait le texte est mal placé j'ai donc pensé a le centrer mais alors le bouton ne fait plus la taille ou l'emplacement exact ou je veux. J'utilise Flash CC et il ne détecte aucune erreur. Voici mon code :
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 var ForCommand:TextField = new TextField(); var ForCode:TextField = new TextField(); ForCommand.autoSize = TextFieldAutoSize.CENTER; ForCommand.border = true; ForCommand.background = true; ForCommand.backgroundColor = 0x00F93A; ForCommand.text = ForCommand.text = ForCommand.text = "EXECUTER"; ForCode.autoSize = TextFieldAutoSize.CENTER; ForCode.border = true; ForCode.background = true; ForCode.backgroundColor = 0xF90800; ForCode.text = ForCode.text = ForCode.text = "EXECUTER"; var Command:SimpleButton = new SimpleButton(ForCommand, ForCommand, ForCommand, ForCommand); Command.upState = ForCommand; Command.overState = ForCommand; Command.downState = ForCommand; Command.hitTestState = ForCommand; Command.alpha = 1; Command.width = 99; Command.height = 20; Command.y = zoneTexte.y + 20; Command.x = zoneTexte2.x; var Code:SimpleButton = new SimpleButton(ForCode, ForCode, ForCode, ForCode); Code.upState = ForCode; Code.overState = ForCode; Code.downState = ForCode; Code.hitTestState = ForCode; Code.alpha = 1; Code.width = 99; Code.height = 20; Code.y = zoneTexte.y + 20; Code.x = 850;
Partager