Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Flash in Delphi ??

Posted on 2003-03-05
10
Medium Priority
?
361 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:kallesen
9 Comments
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 8075031
Import ActiveX Component...
0
 

Author Comment

by:kallesen
ID: 8075253
Yes i have fint it out by me self....
0
 
LVL 2

Accepted Solution

by:
steve_hsk earned 80 total points
ID: 8075279
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:ILE
ID: 8076780
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
 

Author Comment

by:kallesen
ID: 8078745
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
 
LVL 2

Expert Comment

by:steve_hsk
ID: 8078883
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
 

Author Comment

by:kallesen
ID: 8078890
Thanks a lot Steve my mail is Kalle@mail.tdcadsl.dk
;-)
0
 

Expert Comment

by:CleanupPing
ID: 9316926
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
 
LVL 5

Expert Comment

by:snehanshu
ID: 10044559
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question