Editing control text from FlashPlayerControl

F-IN-BOX for Delphi / Builder C++ / VCL
kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

Editing control text from FlashPlayerControl

Postby kredisov » Sat Apr 28, 2007 8:54 am

Hi all
I put the textedit control on swf movie, but can't edit value from FlashPlayerControl in Delphi.
What is the problem?

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

Postby Softanics » Sat Apr 28, 2007 11:31 am

Thank you for your question.

Is this Textbox a flash textbox or VCL TextBox? How do you edit value? Do you use TFlashPlayerControl or TTransparentFlashPlayerControl?
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

flash textedit

Postby kredisov » Thu May 03, 2007 7:42 am

The flash movie contains textedit and I use it in my TFlashPlayerControl component

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

the code is ...

Postby kredisov » Thu May 03, 2007 7:44 am

Code: Select all

   
prompt = new TextField();
  prompt.type = "input";
  prompt.text = "12";
  prompt.multiline = false;
  prompt.border = true;
  prompt.background = true;
  prompt.selectable = true;
  prompt.height = 20;
  prompt.addEventListener("keyDown", keyHandler);
  prompt.x = 190;
  prompt.y = 150;

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

Postby Softanics » Thu May 03, 2007 8:30 am

Do you need to edit the textbox from the Delphi code?

Create a variable:

Code: Select all

_root.obj = new Object();

_root.obj.set_TextBoxValue = function(txt: String) {
   // set textbox value
}
_root.obj.get_TextBoxValue = function():String {
   return ... ;
}

_root.addProperty("TextBoxValue", _root.obj.get_TextBoxValue, _root.obj.set_TextBoxValue);


Delphi code:

Code: Select all

FlashPlayerControl1.SetVariable("TextBoxValue", "123");
Best regards, Artem A. Razin,

F-IN-BOX support

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

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

Postby kredisov » Thu May 03, 2007 8:57 am

it is my mistake :)
I didn't explain exactly what I want
I can't input value not using a Delphi code, only with keyboard input in running application :)
Is it clear? :oops:

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

Postby Softanics » Thu May 03, 2007 9:34 am

kredisov wrote:it is my mistake :)
I didn't explain exactly what I want
I can't input value not using a Delphi code, only with keyboard input in running application :)
Is it clear? :oops:


You click to the textbox, press keys, but the textbox is not changing?
Best regards, Artem A. Razin,

F-IN-BOX support

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

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

Postby kredisov » Thu May 03, 2007 9:51 am

yes I can't edit nothing

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

Postby Softanics » Thu May 03, 2007 10:47 am

kredisov wrote:yes I can't edit nothing


Could you please send me your movie to support (at) f-in-box.com ?
Best regards, Artem A. Razin,

F-IN-BOX support

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

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

Postby kredisov » Thu May 03, 2007 12:09 pm

ok, check mail.

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

Postby Softanics » Thu May 03, 2007 12:56 pm

kredisov wrote:ok, check mail.


I launch Sample1_SWF_And_FLV_Player.exe included in the demo zip, load your movie into it and... I can enter symbols into the textbox...
Best regards, Artem A. Razin,

F-IN-BOX support

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

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

Postby kredisov » Thu May 03, 2007 1:14 pm

... and try to set Transparent checkbox to True - you'll couldn't edit textbox :)

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

Postby Softanics » Thu May 03, 2007 1:27 pm

kredisov wrote:... and try to set Transparent checkbox to True - you'll couldn't edit textbox :)


Yes :) TTransparentFlashPlayerControl is not derived from TWinControl, that's why TTransparentFlashPlayerControl is not able to handle key input. But there is a workaround. See this code:
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

kredisov
Posts: 10
Joined: Sat Apr 28, 2007 8:48 am

Postby kredisov » Thu May 03, 2007 2:32 pm

well, it's not a best idea but...
thanks :)

Darcy Gong
Posts: 2
Joined: Mon Jun 18, 2007 4:01 am

Postby Darcy Gong » Mon Jun 18, 2007 4:05 am

I don't download this file:
http://f-in-box.com/TEMP/KeyboardInputWorkAround1.zip

please repost download url , thanks


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 19 guests

cron