Page 1 of 1

Ever consider making flash player controls interfaces?

Posted: Wed Nov 12, 2008 4:26 pm
by jpierce
I've been dealing a little bit with TFlashPlayerControl and TTransparentFlashPlayerControl. Each is it's own separate class. You've stated before that TFlashPlayerControl is more efficient so you should use it when you don't need transparency.

But it makes the code a little gross if you want to have your program able to switch between the two. I have to do things like:

Code: Select all

  if FlashPlayer is TFlashPlayerControl then
    Result := TFlashPlayerControl(FlashPlayer).CallFunction(request)
  else if FlashPlayer is TTransparentFlashPlayerControl then
    Result := TTransparentFlashPlayerControl(FlashPlayer).CallFunction(request);


This made me wonder why you don't just make an IFlashPlayerControl interface. It would have all the functions and properties that are common to both classes (the majority of stuff after "// Loading movie from stream").

Then you could get the benefits of both FlashPlayer components inheriting from a common source with only a slight hassle of having to use IFlashPlayerControl.

Posted: Wed Nov 12, 2008 5:37 pm
by Softanics
Thank you for your question.

This is a historical reason... When the project was started, only TFlashPlayerControl was exist.

Posted: Wed Nov 12, 2008 6:05 pm
by jpierce
Understood. But you could fairly easily add the interface now with 100% backwards compatibility, while still allowing new projects to be better written.

Posted: Wed Nov 12, 2008 6:17 pm
by Softanics
You're right. I think, we'll add it.

Thank you.

Posted: Wed Nov 12, 2008 6:20 pm
by jpierce
Cool!

I just want to note that you are definitely one of the most responsive component creators I've dealt with, free or commercial. I really appreciate how open to your customers' suggestions you are. Keep up the good work!

Posted: Wed Nov 12, 2008 7:54 pm
by Softanics
jpierce wrote:Cool!

I just want to note that you are definitely one of the most responsive component creators I've dealt with, free or commercial. I really appreciate how open to your customers' suggestions you are. Keep up the good work!


Oh, thank you very much :)

Posted: Sat Dec 06, 2008 8:58 am
by coolshadow
Yes, jpierce is right.
In recent version, it's difficult to change between tflashplayercontrol and TTransparentFlashPlayerControl at runtime.
So I think it's better to have a same interface.
And can you tell me, may be when this feature can be added? :wink:
I can't wait to wait for version with this feature. :P