J jeefong Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-15 #1 我写了一个FLASH播放器,将FLASH以资源文件形式编译进去了. 但是在某些没装FLAH插件的电脑上不能播放,请问怎样才能将FLASH的插件一块编译到程序里面去,而不用外部支持?
M Mike1234567890 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-15 #2 你把FLash插件也通过资源方式编译进程序啊 运行时如果检测不到Flash插件,就释放并安装他
网 网络3K Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-16 #4 把ShockwaveFlashObjects_TLB.pas单元封装到EXE里,然后动态创建FLash插件。 procedure CreateOCXObject; //动态创建FLASH.OCX var Flash1:TShockwaveFlash; begin try if Assigned(Flash1) then begin Flash1.Stop; Flash1.Movie:='0'; Flash1.GotoFrame(0); Flash1.Free; Flash1:=nil; end; if not Assigned(Flash1) then begin Flash1:=TShockwaveFlash.Create(Form1.Panel1); //创建到Form1的Panel1里 Flash1.Parent:=Form1.Panel1; //创建到Form1的Panel1里 Flash1.Align:=alClient; Flash1.PopupMenu:=Form1.PopupMenu1; //关联PopupMenu菜单 end; except raise Exception.Create('类没有注册!'); end; end;
把ShockwaveFlashObjects_TLB.pas单元封装到EXE里,然后动态创建FLash插件。 procedure CreateOCXObject; //动态创建FLASH.OCX var Flash1:TShockwaveFlash; begin try if Assigned(Flash1) then begin Flash1.Stop; Flash1.Movie:='0'; Flash1.GotoFrame(0); Flash1.Free; Flash1:=nil; end; if not Assigned(Flash1) then begin Flash1:=TShockwaveFlash.Create(Form1.Panel1); //创建到Form1的Panel1里 Flash1.Parent:=Form1.Panel1; //创建到Form1的Panel1里 Flash1.Align:=alClient; Flash1.PopupMenu:=Form1.PopupMenu1; //关联PopupMenu菜单 end; except raise Exception.Create('类没有注册!'); end; end;
C cuit421 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-18 #5 可以将控件打包到exe里,然后运行时释放并自动注册就可以了。楼上的我没试过,不清楚,如果你搞不定我再给你
风 风铃夜思雨 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-18 #6 用flashplayercontrol控件可以不装flash.ocx http://auction1.paipai.com/08D94510000000000008344D0047BB90 Var FlashCodeStream: TResourceStream;直接把控件以流方式加载 begin FlashCodeStream := TResourceStream.Create(0, 'FlashOCXCode', 'FLASH'); Try FlashPlayerControl.LoadFlashOCXCodeFromStream(FlashCodeStream); Finally FlashCodeStream.Free; end;
用flashplayercontrol控件可以不装flash.ocx http://auction1.paipai.com/08D94510000000000008344D0047BB90 Var FlashCodeStream: TResourceStream;直接把控件以流方式加载 begin FlashCodeStream := TResourceStream.Create(0, 'FlashOCXCode', 'FLASH'); Try FlashPlayerControl.LoadFlashOCXCodeFromStream(FlashCodeStream); Finally FlashCodeStream.Free; end;