Objective To use the resource file in Delphi This order is plus a flash animation to my programs and release it when the program starts. First create a file file write content: flash swftile1 Thanks.swf Save As: swftile. RC then generates a resource file with brcc32.exe .RES and add a line in Delphi (last line) IMPLEMentation
{$ R * .dfm} {$ R SwfFile.RES} // This line is then added a Procedure: procedure FlashResToFile (const ResName, ResType, FileName: string); var FlashRes: TResourceStream; begin FlashRes: = TResourceStream.Create ( Hinstance, ResName, Pchar (Restype)); try flashres.savetofile (filename); // Save resources as file, restore file finally flashres.free; end; end; use: Flashrestofile ('flash', 'swffile1', 'Thanks.swf'); ShockWaveflash1.Movie: = ExtractFilePath (paramstr (0)) 'Thanks.swf'; ShockWaveFlash1.play;