Infopath + ActiveX + Flash

P

Pablo Clavel

Hello.

I need to use a flash movie inside an Infopath form. To do this, I developed
an ActiveX control that contains the Shockwave Flash ActiveX and exposes the
Value and Enabled methods. The Flash movie has a text box and a button. When
I press the button the text on the textbox is sent outside the flash through
the Value property. Also, when the Value property is set, the textbox on
flash shows the value.

When I drop the activex, Infopath creates a "field1" for the Value property.
If I write into the field1, flash shows the text correctly. But If I use a
second field (field2) and a button that assigns the text on field2 into the
field1, the flash movie disapears.

I'm using C# to write the code of the field.

Can anyone help me?
 
P

Pablo Clavel

Hi again.

I have done the same action using the script instead of .net template and
everything is right.

This is my code:
script
------
function CTRL8_5::OnClick(eventObj)
{
var t = XDocument.DOM.selectSingleNode("//my:campo4").text;
XDocument.DOM.selectSingleNode("//my:campo2").text = t;
}

..net
----
[InfoPathEventHandler(MatchPath="CTRL23_5",
EventType=InfoPathEventType.OnClick)]
public void CTRL23_5_OnClick(DocActionEvent e)
{
IXMLDOMNode nodo12 = this.thisXDocument.DOM.selectSingleNode("//my:campo12");
IXMLDOMNode nodo13 = this.thisXDocument.DOM.selectSingleNode("//my:campo13");

nodo12.text = nodo13.text;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top