Bonjour, et merci d'avance a tous! ^^
Étant débutant en AS ( ou plutôt en flex ), je n'arrive pas a comprendre pourquoi mon code ne resize pas mes fenêtres. Je me doute que la question a du être posé des centaines de fois, mais je me risque a vous demander.
J'ai trouvé des codes sur internet, mais soit ils ne sont vraiment pas adapté a mon code, soit je ne comprenais vraiment pas toute leurs manip.
Voila ce que j'en ai retenu :
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
			import mx.controls.Button;
 
			private var oW:Number;
			private var oH:Number;
			private var oX:Number;
			private var oY:Number;
 
			private var resizeHandler:Button	= new Button();
			private var oPoint:Point 			= new Point();
			private var can:Canvas		= new Canvas();
 
			private function creation():void
			{
				this.resizeHandler.width     = 50;
				this.resizeHandler.height    = 50;
				this.resizeHandler.styleName = "resizeHandler";
				this.rawChildren.addChild(resizeHandler);
				this.resizeHandler.y = this.unscaledHeight - resizeHandler.height - 1;
				this.resizeHandler.x = this.unscaledWidth - resizeHandler.width - 1;
				this.resizeHandler.addEventListener(MouseEvent.MOUSE_DOWN, resizeDownHandler);
				this.can.width = 250;
				this.can.height = 250;
				this.can.styleName = "canvas";
				this.rawChildren.addChild(can);
				can.addChild(resizeHandler);
			}
 
		public function resizeDownHandler(event:MouseEvent):void {
			this.can.addEventListener(MouseEvent.MOUSE_MOVE, resizeMoveHandler);
			this.can.addEventListener(MouseEvent.MOUSE_UP, resizeUpHandler);
			this.oPoint.x = mouseX;
			this.oPoint.y = mouseY;
			this.oPoint = this.localToGlobal(oPoint);		
		}
 
		public function resizeMoveHandler(event:MouseEvent):void {
 
			var xPlus:Number = this.can.mouseX - this.oPoint.x;			
			var yPlus:Number = this.can.mouseY - this.oPoint.y;
 
			if (this.menuPanel.height == 150) {
				if (this.oW + xPlus > 215) {
					this.width = this.oW + xPlus;
				}
				if (this.oH + yPlus > 200) {
					this.height = this.oH + yPlus;
				}				
			} else {
				if (this.oW + xPlus > 140) {
					this.width = this.oW + xPlus;
				}
				if (this.oH + yPlus > 80) {
					this.height = this.oH + yPlus;
				}
			}
		}
 
		public function resizeUpHandler(event:MouseEvent):void {
			this.can.removeEventListener(MouseEvent.MOUSE_MOVE, resizeMoveHandler);
			this.can.removeEventListener(MouseEvent.MOUSE_UP, resizeUpHandler);
			this.oW = this.width;
			this.oH = this.height;
			this.oX = this.x;
			this.oY = this.y;
		}
Ce code marchais bien pour resize l'application en entière, mais lorsque je lui dit de resize this.can, cela ne fonctionne pas.
Si je pouvais avoir le moyen de faire un code moins lourd, mais qui fonctionne aussi parfaitement, je vous en remercierais ^^!

PS : Sachant que mon autre problème consiste a bloquer le canvas pour ne pas qu'il passe outre l'application, mais même ne créant un canvas global de l'application, tout mes test ont échoués.

Merci bien, aurevoir.