Ever consider making flash player controls interfaces?

F-IN-BOX for Delphi / Builder C++ / VCL
jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

Ever consider making flash player controls interfaces?

Postby jpierce » Wed Nov 12, 2008 4:26 pm

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.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Nov 12, 2008 5:37 pm

Thank you for your question.

This is a historical reason... When the project was started, only TFlashPlayerControl was exist.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

Postby jpierce » Wed Nov 12, 2008 6:05 pm

Understood. But you could fairly easily add the interface now with 100% backwards compatibility, while still allowing new projects to be better written.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Nov 12, 2008 6:17 pm

You're right. I think, we'll add it.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

Postby jpierce » Wed Nov 12, 2008 6:20 pm

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!

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Nov 12, 2008 7:54 pm

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 :)
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

coolshadow
Posts: 67
Joined: Fri Oct 10, 2008 7:42 am

Postby coolshadow » Sat Dec 06, 2008 8:58 am

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


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: Bing [Bot] and 16 guests

cron