?
Solved

Flash in Delphi ??

Posted on 2003-03-05
10
Medium Priority
?
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 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
Technology Partners: 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

764 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