DelphiÓëFlashÖ®¼äµÄÊý¾Ý´«µÝ¼¼ÇÉ
ҪʵÏÖÕâÒ»¹¦ÄÜ£¬Ê×ÏÈÒªÓõ½ActiveX¿Ø¼þÖеÄTShockwaveFlash¿Ø¼þ¡£
Ê×ÏÈÈÃÎÒÃÇÀ´½«TShockwaveFlash¿Ø¼þ¼ÓÈëµ½DelphiµÄ×é¼þÃæ°åÖУ¨Ã»ÓÐ×°FlashµÄÅóÓÑ¿ÉÒÔ´ÓÍøÉÏÏÂÔØÒ»¸öFlash8.ocxÎļþÀ´½øÐа²×°£©
1.´ò¿ªDelphi£¨±¾ÈËÓõÄÊÇDelphi7.0£©µã»÷²Ëµ¥ÖеÄComponent->Import ActiveX Control...
2.ÔÚµ¯³öµÄ´°¿ÚÖеÄImport ActiveX×Ó´°¿ÚÖÐÕÒµ½Shockwave Flash(Version1.0)£¬È»ºóµã»÷Install...°´Å¥£¬¸ù¾ÝÌáʾִÐоͿÉÒÔÁË
3.°²×°Íê³Éºó£¬Äã¿ÉÒÔ·¢ÏÖTShockwaveFlash¿Ø¼þÒѾ¼ÓÈëµ½DelphiµÄActiveXÃæ°åÖÐÁË¡£
ÔÚÕâÀïÓбØÒª¸ú´ó¼Ò½²Ò»Ð©¹ØÓÚTShockwaveFlash¿Ø¼þµÄÊôÐÔÓë·½·¨£º
ÊôÐÔ£º
ReadState£º¶ÁÒ»¸öFlashÎļþʱµÄ״̬¡£
TotalFrames£º×ÜÖ¡Êý£¬Ö»Óе±ReadyState£½4ʱ²ÅÄÜ·ÃÎʸÃÊôÐÔ¡£
FrameNum£ºµ±Ç°²¥·ÅµÄÖ¡¡£
Playing£º²¥·Å»òÔÝÍ£Ò»¸öFlash¡£
Quality£ºÖ¸¶¨µ±Ç°äÖȾµÄÖÊÁ¿£¬0=Low¡¢1=High¡¢2=AutoLow¡¢3=AutoHigh¡£
ScaleMode£ºËõ·Åģʽ£¬0=ShowAll¡¢1=NoBorder¡¢2=ExactFit¡£
AlignMode£º¶ÔÆëģʽ£¬Left=1¡¢Right=2¡¢Top=4¡¢Bottom=8¡£
BackgroundColor£º±³¾°É«£¬£1ΪĬÈÏÑÕÉ«¡£
Loop£ºÊÇ·ñÑ»·¡£
Movie£ºÖ¸¶¨²¥·ÅµÄFlashÎļþ·¾¶£¬¿ÉÒÔΪһ¸öURL¡£
ʼþ&·½·¨£º
Play()£º¿ªÊ¼²¥·Å¶¯»¡£
Stop()£ºÍ£Ö¹²¥·Å¶¯»¡£×¢Ò⣺ҪʵÏÖÍ£Ö¹¹¦ÄÜ£¬±ØÐëͬʱµ÷ÓÃStop()ºÍRewind()º¯Êý¡£
Back()£º²¥·ÅÇ°ÒÔÖ¡¶¯»¡£
Forward()£º²¥·ÅºóÒ»Ö¡¶¯»¡£
Rewind()£º²¥·ÅµÚÒ»Ö¡¶¯»¡£
SetZoomRect(int left,int top,int right,int bottom)£ºÉèÖÃËõ·ÅµÄÇøÓò¡£
Zoom(int percent)£ºËõ·Å£¨°´°Ù·Ö±È£©¡£
Pan(int x,int y,int mode)£ºËõ·Å²¥·ÅÃæ°å£¬ÆäÖÐģʽ0Ϊ°´ÏñËØ¡¢1Ϊ°´´°¿Ú°Ù·Ö±È¡£
TsetProperty£¨target:widestring£¬property_:integer,const value widestring£©£ºÉ趨FlashÖÐӰƬµÄÊôÐÔ¡£
TgetProperty£¨target:widestring,property_:integer£©£ºÈ¡µÃFlashÖÐӰƬµÄÊôÐÔ¡£
GetVariable£¨const name:widestring£©£ºÈ¡µÃFlashÖбäÁ¿µÄÖµ¡£
SetVariable£¨const name:widestring,const value:widestring£©£ºÉ趨FlashÖбäÁ¿µÄÖµ¡£
OnProgress£¨int percent£©£º¶ÁÈ¡Ò»¸öFlashʱ´¥·¢¡£
OnReadyStateChange£¨int state£©£º×´Ì¬¸Ä±äʱ´¥·¢¡£StatesµÄÖµ0=Loading¡¢1=Uninitialized¡¢2=Loaded¡¢3=Interactive¡¢4=Complete¡£
OnFSCommand£¨const command,args:WideString£©£ºÓÃÀ´¶ÁÈ¡Flash°´Å¥ÖеIJÎÊý¡£
ÎÒÃÇҪʵÏÖDelphiÓëFlashÖ®¼äµÄÊý¾Ý´«µÝ
Ïà¹ØÎĵµ£º
½ñÌì¿´ÁËÍâ¹úһƪÎÄÕ£¬¾õµÃºÜÓÐÒâ˼£¬ÓÚÊÇÔÚÕâÀï¼Ç¼һÏ¡£²Êɫͼת»»³ÉºÚ°×ÕÕ¡£ÔÚps ÒªÊǽ«²ÊÉ«µÄͼת»»ºÚ°×Õյķ½Ê½Ö»ÊÇÐèÒª¼òµ¥µÄ¶¯×÷¡£¶øÔÚflash ´¦ÀíÆðÀ´Ò²·Ç³£¼òµ¥¡£
ÏÈÑ¡ÔñÒ»ÕÅϲ»¶µÄͼƬ£¬È»ºó½øÐд¦Àí¡£ÀýÈçÕâÕÅÕÕƬ£¬Í¼Æ¬ÖеÄÊÇÒ»¸öºÜ²»´íµÄö¦Å®¡£ºÇºÇ
ÏÖÔÚͨ¹ýÒ ......
uses WinInet;
procedure TForm1.Button1Click(Sender: TObject);
begin
if InternetGetConnectedState(nil, 0) then
ShowMessage('ÒÑÁ¬½Ó')
else
ShowMessage('ÒѶϿª');
end; ......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Button2: TButton;
procedure Butt ......
Delphi²Ù×÷XMLÊǺܷ½±ãµÄ£¬Ö÷ÒªÓÐÁ½ÖÖ·½·¨£»
1.ÓÃTClientDataSet²Ù×÷XML£»TClientDataSetÊǸöºÃ¶«Î÷£¬ÓÃËü²Ù×÷XMLÊǺܼòµ¥µÄÊ£¬²»¹ýȱµãÊÇÖ»ÄܲÙ×÷¹Ì¶¨¸ñʽµÄ XML£¬ËüÊʺϲÙ×÷±í½á¹¹µÄÊý¾Ý£¬Èç¹ûÄãÐèÒª°ÑÊý¾Ý±íµ¼³ö³ÉXMLÄÇÓÃTClientDataSetÊǸöºÃÖ÷Ò⣬±ÈÈçÏÂÃæÊÇÒ»¸öÊý¾Ý¼¯µ¼³ö³ÉXMLµÄ· ......
flashÊÇmacromedia¹«Ë¾³öÆ·µÄ£¬ÓÃÔÚ»¥ÁªÍøÉ϶¯Ì¬µÄ¡¢¿É»¥¶¯µÄshockwave¡£ËüµÄÓŵãÊÇÌå»ýС£¬¿É±ßÏÂÔر߲¥·Å£¬ÕâÑù¾Í±ÜÃâÁËÓû§³¤Ê±¼äµÄµÈ´ý¡£
flash¿ÉÒÔÓÃÆäÉú³É¶¯»£¬»¹¿ÉÔÚÍøÒ³ÖмÓÈëÉùÒô¡£ÕâÑùÄã¾ÍÄÜÉú³É¶àýÌåµÄͼÐκͽçÃ棬¶øʹÎļþµÄÌå»ýÈ´ºÜС¡£
flashËäÈ»²»¿ÉÒÔÏóÒ»ÃÅÓïÑÔ ......