Bonjour,

J'ai essayé de suivre ce tuto pour dialoguer entre flash et delphi.
Lorsque j'écris sur la zone de texte, rien ne se passe dans le flash. Je pense que c'est l'actionscript 3 qui bug.

Pouvez-vous m'indiquer d'autres tutos ou me donner des conseils ?

merci d'avance, gcvoiron.

[Code Delphi]
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
unit Unit1;
 
interface
 
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, ShockwaveFlashObjects_TLB, StdCtrls;
 
type
  TForm1 = class(TForm)
    OpenDialog1: TOpenDialog;
    Edit1: TEdit;
    Button1: TButton;
    ShockwaveFlash1: TShockwaveFlash;
    procedure ShockwaveFlash1FSCommand(ASender: TObject; const command,
      args: WideString);
    procedure Button1Click(Sender: TObject);
    procedure Edit1Change(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;
 
var
  Form1: TForm1;
 
implementation
 
{$R *.dfm}
 
procedure TForm1.ShockwaveFlash1FSCommand(ASender: TObject; const command,
  args: WideString);
begin
      //
end;
 
procedure TForm1.Button1Click(Sender: TObject);
begin
    OpenDialog1.Execute;
    ShockwaveFlash1.Movie:=OpenDialog1.FileName;
    //ShockwaveFlash1.SetVariable(text,'kkk');
    //ShowMessage('Hello Word');
end;
 
procedure TForm1.Edit1Change(Sender: TObject);
begin
ShockwaveFlash1.SetVariable('monTexte', 'hello');
ShockwaveFlash1.SetVariable('monTexte', 'hello');
ShockwaveFlash1.SetVariable('monTexte', 'hello');
 
ShockwaveFlash1.SetVariable('monTexte.text', 'hello');
ShockwaveFlash1.SetVariable('monTexte.text', 'hello');
ShockwaveFlash1.SetVariable('monTexte.text', 'hello');
end;
 
end.
[Code ActionScript 3]
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
	var monTexte:TextField = new TextField();
	// propriétés du champ de texte
	with(monTexte)
	{
		x = 10; //coordonnée x
		y = 10; //coordonnée y
		autoSize = TextFieldAutoSize.LEFT; //largeur et hauteur automatique à partir du bord gauche
		selectable = false; // Le texte ne peut pas être sélectionné
 
		text = "Variable monText"; // Contenu du champ de texte
	}
	// affichage du champ de texte
	this.addChild(monTexte);