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


flash/delphi communication

Posted on 2003-02-20
Medium Priority
Last Modified: 2012-08-13
flash/delphi communication

i need to embed a flash movie into delphi application and i wonder if there is some way to pass parametheres from flash movie to delphi app and backwards.

Anyone know how this is possible?

thanks in advance.
Question by:zastava101

Expert Comment

ID: 7992198

Accepted Solution

kake26 earned 400 total points
ID: 9170681
Yes you can pass and do tons of stuff to a flash movie in delphi. Here is how.

The first thing you might want to do is import the flash activex control, if you have not done so already. I use delphi 6 personal, and in the past few days I've expiramented alot of delphi/flash stuff. The Import Activex function is under the compnets menu in delphi. Once you see the big ol list box of stuff you have installed on your system. Look for Shockwave Flash! Once you find it proceed to just hit install and all that.  All goes right, under the activex bar in the delphi IDE there will be a new button. Procced to use it as anyother VCLs, I think they are called. If you create on on a form, the easiest way to specify the movie to use is by double clicking on it. Note you can embed the movie, so all you distrubute is the exe. That covers the install and the basic of it, now lets get into the neat stuff you can do. When we installed the flash activex, delphi stripped all the available functions and stuff from the type libs. If you have code completion on try the following after inserting the flash in a form. Minimize the form and any were in the unit display type "ShockwaveFlash1.", let the code completion popup the list of available functions. Note how many there are and what they can do. I typically use the following very often:

From with in flash:
I use fscommand to pass stuff back to the delphi exe its embeded in.

From delphi to flash:
I use the following alot.

ShockwaveFlash1.SetVariable('varname', value: string);
out1 := ShockwaveFlash1.GetVariable('in1'); // were out1: string and in1 is the flash var you wish to get

Those are the basic 3 I use alot, of course I suggest you do the code compltion thing to see the whole list. You will find you can manipulate practically everything in a flash movie from delphi.

End note: There is an issue I've encountered when having the main form spawn another form with the same flash movie in it. In that case some simple glue code is required, if you wish to pass data between both windows.

I hope this sheds light on your issue if you have further questions let me know.
LVL 10

Expert Comment

ID: 9947712
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept kake26's answer
Please leave any comments here within the next seven days.


Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

EE Cleanup Volunteer

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

569 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