Bonsoir,

Je veux créer un Textarea sous Flex qui change de texte automatiquement. J'y suis presque mais il ne fait pas exactement ce que je souhaite 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="858" height="748" creationComplete="init()">
   <mx:Script>
	<![CDATA[
 
	import flash.utils.Timer;
	import mx.controls.Alert;
 
 
 
	public function init():void{
    var mTimer:Timer=new Timer(1000,5);//ticks for 5 sec’s
 
 
	mTimer.addEventListener(TimerEvent.TIMER,Countsec);
	mTimer.addEventListener(TimerEvent.TIMER,Countsec1);
	mTimer.addEventListener(TimerEvent.TIMER,Countsec2);
	mTimer.addEventListener(TimerEvent.TIMER_COMPLETE,Comple);
 
	mTimer.start();
}
 
 
	private function Countsec(e:TimerEvent):void
	{
		lbltime.text="bonjour";
	}
	private function Countsec1(e:TimerEvent):void
	{
		lbltime.text="ola";
	}
	private function Countsec2(e:TimerEvent):void
	{
		lbltime.text="hello";
	}
	private function Comple(e:TimerEvent):void
	{
		lbltime.text="Time Complete";
	}
 
	]]>
</mx:Script>
 
 
	<mx:Image x="80.5" y="52" source="assets/OpenYourEyes (images)/Sans titre.png"/>
	<mx:Image x="34" y="632" source="assets/OpenYourEyes (images)/barreactualite.png" width="790" height="67"/>
	<mx:Label id="lbltime" x="367.5" y="617" width="369" height="61" fontWeight="bold" fontSize="30"/>
</mx:Canvas>
Il n'affiche que Hello pendant environ 3 secondes puis le Time Complete. Quelqu'un peut m'aider à afficher simultanément bonjour, ola et hello svp et ceux à l'infini ... ce que je n'ai toujours pas trouvé... quelqu'un a une idée svp ?

Merci