Page 1 of 1

TransparentFlashPlayerControl runtime creating

Posted: Wed Oct 18, 2006 2:07 pm
by FreeLander
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.

Re: TransparentFlashPlayerControl runtime creating

Posted: Wed Oct 18, 2006 4:28 pm
by Softanics
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.

Posted: Wed Oct 18, 2006 5:57 pm
by FreeLander
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 :)

solved

Posted: Wed Oct 18, 2006 6:09 pm
by FreeLander
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... :)

Posted: Wed Oct 18, 2006 6:18 pm
by Softanics
Yes, my small mistake :) I'm sorry!

You are right, setting property Parent instead of Owner solves the problem.

help, TTransparentFlashPlayerControl and editbox

Posted: Tue Nov 14, 2006 9:28 am
by digitalbrain
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

Re: help, TTransparentFlashPlayerControl and editbox

Posted: Tue Nov 14, 2006 10:37 am
by Softanics
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

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

Posted: Tue Nov 14, 2006 11:24 am
by digitalbrain
....