在Delphi中有一个这样的控件,好象要先装Flash

解决方案 »

  1.   

    http://www.csdn.net/Expert/forum.asp?typenum=8&searchKeys=flash&roomid=3&author=&tabletype=now
      

  2.   

    在Delphi中Import<System>\Macromed\Flash\swflash.ocx,Delphi会生成一个封装文件,其中有该OCX的输出函数;并且会在Component Palette上生成一个图标,将它拖到你的窗体上,再试试吧。
    以下是一个示例:unit Main;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      OleCtrls, StdCtrls, ShockwaveFlashObjects_TLB; //最后一个就是Delphi生成的type
      TForm1 = class(TForm)
        swf: TShockwaveFlash;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
    begin
      with swf do
      begin
        Playing := false;
        Visible := false;
        if FileExists('c:\temp\zk.swf') then
        begin
          Movie := 'c:\temp\zk.swf';
          Playing := true;
          Visible := true;
        end;
      end;
    end;end.
      

  3.   

    安装一下Flash,然后在Component,菜单中选Import ActiveX Control....
    找到ShockWave Flash(Version 1.0) 点Install 即可,
    然后可以在ActiveX组找到该控件,用法和Timage差不多,
    在Movie中写上文件名即可,
    记得结帐.