Bonjour,
Après avoir lut plein de choses intéressantes sur comment récupéré une variable PHP dans flash, je me suis lancé et j'ai fait ceci:
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
 
var externalData:LoadVars = new LoadVars();
externalData.onLoad = function(){
	var count = externalData.vis;
}
 
externalData.load("http://benjy51.free.fr/compteur.php","0","POST");
//loadVariables("http://benjy51.free.fr/compteur.php", "", "POST");
//count = vis;
//count = "12345";
if (length(count) == "1")
{
    count = "0000" + count;
} // end if
if (length(count) == "2")
{
    count = "000" + count;
} // end if
if (length(count) == "3")
{
    count = "00" + count;
} // end if
if (length(count) == "4")
{
    count = "0" + count;
} // end if
c1 = substring(count, "1", "1");
c2 = substring(count, "2", "1");
c3 = substring(count, "3", "1");
c4 = substring(count, "4", "1");
c5 = substring(count, "5", "1");
temp_c1 = "0";
temp_c2 = "0";
temp_c3 = "0";
temp_c4 = "0";
temp_c5 = "0";
Les variable temps_c1 à temps_c5 sont attribué a des champs texte dynamique.
Mais mon code ne marche pas j'obtiens UNDEF.
Je ne comprend pourquoi
Merci pour votre aide