Dear Sir/Madam,
I’m author of a video game called “Poppy And Rose”. I have made this game in the program language Delphi6, the game belongs in the “puzzle” tip and it is with logical elements.
I think that my game with a little adjustment it can attract bigger attention, but I have one problem! What is about?!?
I want in my game to insert “Flash” animations so it can be more attractive, and also if it Is possible some kind of “Flash procedures” with set parameters which I will call them from my Delphi program for example with the run function.
Is there any examples of source code for this matter, and where can I find them?
If you have source code of this theme and you will want to share it please send it to my e-mail.
Thank you in advance,
Blagoj Janev
e-mail: jblagoj@yahoo.com

Member Avatar for Micheus

I want in my game to insert “Flash” animations so it can be more attractive,

This is very simple to solve. Take a look at this article Running Flash animations with Delphi (at About.com)

but...

and also if it Is possible some kind of “Flash procedures” with set parameters which I will call them from my Delphi program for example with the run function.

It is more complicated.

I'm not sure that it will work fine but you can try - basically, You will use FSCommand. Just a example:
In the Flash application (exit.swf):
- Drop a circle object from Tools palette. Convert it to button simbol and name it btnExit;
- At btnExit, select Actions option from context menu. Find FSCommand and double-click it. Type "Exit" text to command param. The result must be:

on (release) {
fscommand ("exit");
}

In the Delphi application:
- After have Shockwave object installed on Delphi, drop one to the form (flmFlash) and at OnShow form event You have to put some thing like this:

procedure TF_Tela.FormShow(Sender: TObject);
begin
  flmFlash.Base := SysUtils.ExtractFilePath(Application.Exename) + 'exit.swf';
  flmFlash.Movie := SysUtils.ExtractFilePath(Application.Exename) + 'exit.swf';
  flmFlash.Play;
end;

- select flmFlash component and at OnFS-Command event add:

procedure TFlasfForm.flmFlashFSCommand(Sender: TObject; const command, args: WideString);
begin
  if command = 'exit' then 
    Close;
end;

Original article by proteus_adi: Integração Flash + Delphi

... and an other site about this subject: Delphi+Flash (nothing free, but...)

Bye

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.