Copy link to clipboard
Copied
Hi,
Thank you in advance for your help.
I have the following problem. I want to embed a .swf animation into a Captivate project. This .swf is a form, which the user submits and I need to assign the validated value from this form to a variable in the Captivate movie, so it can be used on the other frames. I searched around, tried some code, but unfortunately it didn't work.
submit_btn.addEventListener(MouseEvent.CLICK,validate_func);
function validate_func(e) {
//do some validation here
_parent._parent.UserInputInCaptivateVar=UserInputInFlashVar.text;
How can I assign this value? Should the variable UserInputInCaptivateVar be defined in Captivate or it will be defined only with this AS code?
Thanks!
Copy link to clipboard
Copied
Hi acsemaph,
I am attacthing a AS2 fla file. You can try this.
Please create a captivate project and create a user variable cpVar with some value.
Insert and this into a text caption and set the diaplay for sufficient time.
Then use the attached animation and publish the project. Type something in the input field and press the button.
The text caption will get updated.
NOTE:The variable must be defined in captivate. Also note that when the animation is set to "rest of project" then it is placed on the main timeline. For other display time settings it is placed inside a movie clip of its own, hence referencing will change.
Copy link to clipboard
Copied
Hi acsemaph,
I have attached a fla file. Please have a look.
Please create a captivate project and create a variable by name cpVar with some initial value.
Insert this variable into a text caption and set the display time for the caption to sufficient amount.
Now insert the attached animation and preview the project.
During preview type something in the input field and press the button.
The value will be reflected in the text caption.
NOTE: The variable must be defined inside captivate.All the user defined variables will be present on the main time line of captivate movie. Also note that when the display time for the animation is set to "rest of project", it is placed in the main project movie clip, hence refernce to the main timline will be(_parent._parent) . For other display time settings the animation will be placed inside the slide movie clip hence the reference to main timeline will be(_parent._parent._parent).
Copy link to clipboard
Copied
Hi acsemaph,
I have attached a fla file. Please have a look.
Please create a captivate project and create a variable by name cpVar with some initial value.
Insert this variable into a text caption and set the display time for the caption to sufficient amount.
Now insert the attached animation and preview the project.
During preview type something in the input field and press the button.
The value will be reflected in the text caption.
NOTE: The variable must be defined inside captivate.All the user defined variables will be present on the main time line of captivate movie. Also note that when the display time for the animation is set to "rest of project", it is placed in the main project movie clip, hence refernce to the main timline will be(_parent._parent) . For other display time settings the animation will be placed inside the slide movie clip hence the reference to main timeline will be(_parent._parent._parent).
Copy link to clipboard
Copied
Hi acsemaph,
I have attached a fla file. Please have a look.
Please create a captivate project and create a variable by name cpVar with some initial value.
Insert this variable into a text caption and set the display time for the caption to sufficient amount.
Now insert the attached animation and preview the project.
During preview type something in the input field and press the button.
The value will be reflected in the text caption.
NOTE: The variable must be defined inside captivate.All the user defined variables will be present on the main time line of captivate movie. Also note that when the display time for the animation is set to "rest of project", it is placed in the main project movie clip, hence refernce to the main timline will be(_parent._parent) . For other display time settings the animation will be placed inside the slide movie clip hence the reference to main timeline will be(_parent._parent._parent).
Copy link to clipboard
Copied
Hi acsemaph,
Please create a captivate project and create a variable by name cpVar with some initial value.
Insert this variable into a text caption and set the display time for the caption to sufficient amount.
Now insert the attached animation and preview the project.
During preview type something in the input field and press the button.
The value will be reflected in the text caption.
NOTE: The variable must be defined inside captivate.All the user defined variables will be present on the main time line of captivate movie. Also note that when the display time for the animation is set to "rest of project", it is placed in the main project movie clip, hence refernce to the main timline will be(_parent._parent) . For other display time settings the animation will be placed inside the slide movie clip hence the reference to main timeline will be(_parent._parent._parent).
Not able to attach the FLA. The code inside the fla is as follows:
sub_btn.addEventListener("click",sendText);
function sendText()
{
if(_parent._parent._parent.cpVar != null)
_parent._parent._parent.cpVar = flash_txt.text;
else
_parent._parent.cpVar = flash_txt.text;
}
Please mail me at vikramp@adobe.com to get the SWF file.
Copy link to clipboard
Copied
This might have been a good question which might have sounded interesting and helpful, but I cant seem to find here the most precised answer.