Http://www.cnblogs.com/devcjq/articles/2906224.html
Flash is Macromedia Company produced, used in the Internet dynamic, interactive Shockwave. Its advantages are small size, can be downloaded side play, so that the user to avoid long waits. Flash can use it to generate animations, and you can add sounds to your Web pages. This allows you to generate multimedia graphics and interfaces, while making the file size small. Although Flash can not be programmed as a language, you can also make a highly interactive homepage with its built-in statements and Javascripe. Another feature of Flash is the need to install plugins plug-in to be accepted by the browser! Of course, this also avoids the differences between browsers, so that the same! But you know what? In Delphi, you can directly open the Flash animation and control it to play and stop. You can also get its total frame number, know how to implement it? Come with me, please. The component in Delphi|Import ActiveX contrals ... Select the ShockwaveFlash (Version1.0), and click Install, an install window will appear. If you want to add it to a package that already exists, in the "into existing Packagedialog box, select the path you want to install in the File Name: window, and click OK, and a confirmation dialog will pop up asking you "package DCLUSR50.BPL'll be rebuilt." Continue? ", click" Yes "and click" Install "in the pop-up window and the plugin is ready to install. If you want to add it to a new package, in the "into new Packagedialog box, select the path you want to install in the Filename: window, and create a new package, if named Test, and click OK; it asks you "package TEST.BPL would be built." Continue? ", click" Yes ". Click "Install" in the pop-up window and the plugin is ready to install. At this point, you will find a new control under the control bar's ActiveX, named Shokewaveflash, click it to place it in the form, place a OpenDialog control and a panel in the form, place four buttons on the panel, Their caption attributes are named "Openfile", "Play", "Stop", "Close", respectively. Set the align properties of the Panel1,shockwaveflash to Alleft and alclient, respectively; Write the following code in the OnClick event for each of the four buttons: PRocedure Tform1.button1click (Sender:tobject); begin ifOpendialog1.execute ThenShockwaveflash1.movie:=Opendialog1.filename; End; procedureTform1.button2click (Sender:tobject); beginShockwaveflash1.play; End; procedureTform1.button3click (Sender:tobject); beginShockwaveflash1.stopplay; End; procedureTform1.button4click (Sender:tobject); beginshockwaveflash1.freeonrelease; Close End; You can get the total number of frames of the open flash image, add a label to the Panel1, and write the following code in the Form1 onclick eventproceduretform1.formcreate (Sender:tobject); beginLabel1.Caption:=Shockwaveflash.totalframes; EndYou can also control the open flash image to play from that frame, add a button and an edit control on the Panel1, and add the following code to the button's onclick event. ifShockwaveflash1.playing ThenShockwaveflash1.gotoframe (Spinedit1.value); Shockwaveflash1.play; You can do this by filling in the edit with the frame you want to jump to and clicking the button. How about, try it, the effect is not bad. Data reference: http://www.knowsky.com/335327.htmlturn from: http://www.knowsky.com/335327.html
Delphi Operation Flash D7~XE10 all have import ActiveX control shockwave