Hello,
I am developing a flex application in which a person fills a form and the text dynamically gets added in the video preview next to it.
Can anyone tell how the text from form can be dynamically added to the video?
Hello,
I am developing a flex application in which a person fills a form and the text dynamically gets added in the video preview next to it.
Can anyone tell how the text from form can be dynamically added to the video?
You can write a JavaScript method that returns the value from the different fields in your form. You can then call this JavaScript function on the page through ActionScript:
Here is a link to the documentation on the Adobe Site: Calling JavaScript methods from Flex applications
<mx:Script>
import flash.external.*;
public function getFormValue(fieldName:String):String {
var f:String = "jsGetFormValue";
var m:String = ExternalInterface.call(f,fieldName);
trace(m);
}
</mx:Script>
where you have the following JavaScript function on the page:
function jsGetFormValue(fieldName) {
// note, this only handles form fields with a value property, the jQuery
// interface for getting form value is short and more elegant
return document.getElementById(fieldName);
}