directx click

The directx object for mac flash does not have an onclick event. How would i make it act as on click ?

procedure TForm1.ShockwaveFlash1click(Sender: TObject);
begin
 SHOWMESSAGE('ddHI');
end;

doesnt work as there is no such event...

966Asked:
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.

Emmanuel PASQUIERFreelance Project ManagerCommented:
can you tell us more about this directX / shockwave object ? where can we find it ? is it free or trial ?
0
966Author Commented:
i downloaded mac flash, then went to install directx component. Then found mac flash. Then it installed a component to direct X.
0
966Author Commented:
when i say it installed a component to directx i mean the directx tab.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Emmanuel PASQUIERFreelance Project ManagerCommented:
you're not very clear.
where do you downloaded that ?
0
966Author Commented:
I just followed that site, but there is no onclick event in the component installed,

http://delphi.about.com/od/graphics/l/aa040103a.htm
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
aaaahhhh ok !!!
That's not DirectX but ActiveX (one as nothing to do with the other).

Ok, once you have imported the activeX, you have a ShockwaveFlashObjects_TLB.pas file that you can alter to add support for the OnClick property (adding a windows message manager for the left mouse button up event)
Then recompile the package where yo put that imported unit, the OnClick event will appear (and work) in your project

I give you the modified file (imported with Delphi7)

If you have to do it for other Delphi versions, here are the mods I did :
// in interface
Uses ..., Messages; // Need to add Messages unit

  TShockwaveFlash = class(TOleControl)
   private
...
    FOnClick : TNotifyEvent; // HERE I ADDED THE EVENT PRIVATE MEMBER
...
  protected
// That is my simple button UP event message handler. 
// I don't manage DOWN/UP evts for all mouse buttons, just Left UP = Click
    procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP;
...
  published
...
// This is my published property
    property  OnClick:TNotifyEvent read fOnClick write fOnClick;
...
  end;


// in implementation :

procedure TShockwaveFlash.WMLButtonUp(var Message: TWMLButtonUp);
begin
 if Assigned(FOnClick) Then FOnClick(Self);
end;

Open in new window

ShockwaveFlashObjects-TLB.pas
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
966Author Commented:
THANKYOU very much mate, but i get a problem when i try to install it like i normally do.

double click it, install component, then click install. Gives error: Its not a valid identifer
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
you tend to be sloppy in the descriptions of your problems. In this case :

What invalid Indentifier ?
Which Delphi version ?
In my file ?
What line ?
0
966Author Commented:
incomplete. but works
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.