Component->Import ActiveX Control->Add 然后选择系统目录(system or system32)下
Macromed->Flash->Flash.ocx然后点安装。然后在窗体上添加ActiveX页下的ShockwaveFlash,
再放上四个按钮。
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, ShockwaveFlashObjects_TLB;
type
TForm1 = class(TForm)
ShockwaveFlash1: TShockwaveFlash;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
ShockwaveFlash1.LoadMovie(0,'e:/downloads/1694.swf');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShockwaveFlash1.StopPlay;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShockwaveFlash1.Play;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
ShockwaveFlash1.Forward;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
ShockwaveFlash1.GotoFrame(ShockwaveFlash1.FrameNum-10);
end;
end.