TransparentFlashPlayerControl runtime creating

F-IN-BOX for Delphi / Builder C++ / VCL
FreeLander
Posts: 3
Joined: Wed Oct 18, 2006 2:02 pm

TransparentFlashPlayerControl runtime creating

Postby FreeLander » Wed Oct 18, 2006 2:07 pm

Hello!
1. Thanks for your great product! :)
2. Im trying to create new TransparentFlashPlayerControl in runtime, for example:

Code: Select all

FFlashAlpha := TTransparentFlashPlayerControl.Create(Self);
Self.InsertControl(FFlashAlpha);
FFlashAlpha.Width := 256;
FFlashAlpha.Height := 256;
FFlashAlpha.Movie := 'c:\border.swf';

But nothing happends... How can i do it correctly?
PS DEMO version.

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

Re: TransparentFlashPlayerControl runtime creating

Postby Softanics » Wed Oct 18, 2006 4:28 pm

Thank you for your question.

FreeLander wrote:1. Thanks for your great product! :)


:) Thank you!

FreeLander wrote:2. Im trying to create new TransparentFlashPlayerControl in runtime, for example:

Code: Select all

FFlashAlpha := TTransparentFlashPlayerControl.Create(Self);
Self.InsertControl(FFlashAlpha);
FFlashAlpha.Width := 256;
FFlashAlpha.Height := 256;
FFlashAlpha.Movie := 'c:\border.swf';

But nothing happends... How can i do it correctly?
PS DEMO version.[/code]


May be you should add

Code: Select all

FFlashAlpha.Owner := Self;
after

Code: Select all

TTransparentFlashPlayerControl.Create(Self);
? Please try.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

FreeLander
Posts: 3
Joined: Wed Oct 18, 2006 2:02 pm

Postby FreeLander » Wed Oct 18, 2006 5:57 pm

Im using Delphi 7 and the result of ".Owner = Self" is "Can't assign to a read only property" :(
Whith TFlashPlayerControl all works fine - it can be created in runtime, placed into any form or another windowed control and so on... but the flash component with transparency cant.
For example:
Code 1:

Code: Select all

FFlash := TFlashPlayerControl.Create(nil);
Self.InsertControl(FFlash);
FFlash.SetBounds(0, 0, 256, 256);
FFlash.Movie := 'c:\border.swf';
Canvas.Draw(256, 0, FFlash.CreateFrameBitmap);

is OK - a TFlashPlayerControl appears on the left-top corner of the form and the same graphic draws at the right.
Code 2:

Code: Select all

FFlash := TTransparentFlashPlayerControl.Create(nil);
Self.InsertControl(FFlash);
FFlash.SetBounds(0, 0, 256, 256);
FFlash.Movie := 'c:\border.swf';
Canvas.Draw(256, 0, FFlash.CreateFrameBitmap);

isnt OK - a TTransparentFlashPlayerControl doesnt appears on the left-top corner of the form and no graphic draws at the right + an error message "Source file not found: FlashPlayerControl.pas" + "access violation ... read of address 0000000" within "FFlash.CreateFrameBitmap" method call :(

Im going to buy the license as soon, as i solve this problem. Help me please :)

FreeLander
Posts: 3
Joined: Wed Oct 18, 2006 2:02 pm

solved

Postby FreeLander » Wed Oct 18, 2006 6:09 pm

You a right! This set of methods works:

Code: Select all

FFlashAlpha := TTransparentFlashPlayerControl.Create(Self);
FFlashAlpha.Parent := Self;


Thanks a lot! Im going to order page... :)

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

Postby Softanics » Wed Oct 18, 2006 6:18 pm

Yes, my small mistake :) I'm sorry!

You are right, setting property Parent instead of Owner solves the problem.
Best regards, Artem A. Razin,

F-IN-BOX support

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

digitalbrain
Posts: 2
Joined: Tue Nov 14, 2006 9:24 am

help, TTransparentFlashPlayerControl and editbox

Postby digitalbrain » Tue Nov 14, 2006 9:28 am

I USE TTransparentFlashPlayerControl in delphi, and load a swf with editbox,but I found that I can't focus in the editbox, so i can't input info into the editbox

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

Re: help, TTransparentFlashPlayerControl and editbox

Postby Softanics » Tue Nov 14, 2006 10:37 am

digitalbrain wrote:I USE TTransparentFlashPlayerControl in delphi, and load a swf with editbox,but I found that I can't focus in the editbox, so i can't input info into the editbox


TTransparentFlashPlayerControl is not a window control, it means that TTransparentFlashPlayerControl can't receive focus.

There is a workaround, here is an example:
http://f-in-box.com/TEMP/KeyboardInputWorkAround1.zip
Best regards, Artem A. Razin,

F-IN-BOX support

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

digitalbrain
Posts: 2
Joined: Tue Nov 14, 2006 9:24 am

thank u for replay, I'l be try again.

Postby digitalbrain » Tue Nov 14, 2006 11:24 am

....


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 12 guests

cron