Flash in Delphi ??

Hey.

I have readed this Question http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20436224.html but how can I play a movie on my form??

I hope someone will help me, plz..

/Kallesen
kallesenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lukasz LachCommented:
Import ActiveX Component...
0
kallesenAuthor Commented:
Yes i have fint it out by me self....
0
steve_hskCommented:
Hi Kallesen ...

The following links will help. One is macromedia's support, and the second is where you can download a component to do the job for you :

1. MacroMedia provide an ActiveX component which you can install into delphi, place on a form, and program directly :
http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/

2. There is a unit called TShockwaveFlash

http://www.delphipages.com/news/detaildocs.cfm?ID=61

If you install this component (shockwav.pas)into delphi the usual way, and you have a flash played already installed to provide the activeX file : swflash.ocx, then you can use this component as follows :

unit formFlashPlayer;

interface

uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, MPlayer, ExtCtrls, OleCtrls, ShockwaveFlashObjects_TLB, Buttons, StdCtrls, ShellAPI;

type TfrmFlashPlayer = class(TForm)
    // define variables
    swfPlayer: TShockwaveFlash;
    pnlControls: TPanel;
    btnPlay: TButton;
    bntStop: TButton;
    btnFile: TButton;
    odlgFlashFile: TOpenDialog;

    // define methods
    procedure btnFileClick(Sender: TObject);
    procedure btnPlayClick(Sender: TObject);
    procedure bntStopClick(Sender: TObject);
end;

var frmFlashPlayer: TfrmFlashPlayer;

implementation

{$R *.DFM}

procedure TfrmFlashPlayer.btnFileClick(Sender: TObject);
begin
  if odlgFlashFile.Execute then
    swfPlayer.Movie := odlgFlashFile.FileName;
end;

procedure TfrmFlashPlayer.btnPlayClick(Sender: TObject);
begin
  if swfPlayer.Movie <> '' then
    swfPlayer.Play
  else
    btnFileClick(Sender);
end;

procedure TfrmFlashPlayer.bntStopClick(Sender: TObject);
begin
  if swfPlayer.Playing then
    swfPlayer.Stop;
end;

This should do the job ! Hope it helps,
Steve

Example Code owned by :-
Jimmy Tharpe - Used-Disks,
2546 Stonington Road
Dunwoody, Ga. 30338

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

ILECommented:
ccc

100% working solution

put one panel
and one mediaplayer component

mediaplayer1.display:=panel1;
mediaplayer1.filename:='c:\ile.avi';
mediaplayer1.autoopen:=true;
mediaplayer1.play


so easy

0
kallesenAuthor Commented:
Thanks a lot I am, verey happy because your will help me, and by the way, do you have som good delphi page ??? I come from Denmark and i am good to English!! so you can give me English pages, plz, I am Newbe so giv me som good articels ;-) and se my company homepage on www.smartware.dk !! all the software is Freeware!!

/Kallesen
0
steve_hskCommented:
Kallesen,

I have 1000's of Delphi links, but am unsure on how to copy and paste the addresses here, without spending time doing it 1 by 1.

I can email you these links very easily if you wish ? Unless somebody has a better idea ?

Steve

0
kallesenAuthor Commented:
Thanks a lot Steve my mail is Kalle@mail.tdcadsl.dk
;-)
0
CleanupPingCommented:
kallesen:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
snehanshuCommented:
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: steve_hsk

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.