does home_input_txt exist when you click homeUpdate_btn? ie, it's visible when you click the button?
if yes, is home_input_txt on the parent timeline of the timeline that contains homeUpdate_btn. if yes, use:
to reference it's htmlText property. if it's on the parent.parent timeline, use:
The home_input_txt doesn't exist on the same frame when homeupdate_btn is clicked, because the button is outside the movie clip on another frame....in order to see it when running the swf. so I will try the parent.parent.home_input_txt.htmlText I will let you know if it works. Thanks for the help....I really appreciate it :-)
Is there a way to make the home_input_txt visible throughout your swf...so I can reference it and get the update data without parent.parent or is that the only way? Just curious. I'm a beginner at action script, but I love it. I've done html, but it's nothing like Flash.
if home_input_txt no longer exists when that button is clicked, assign a variable to the text value AFTER text is entered into that textfield. the variable will persist even after the textfield no longer exists:
The action script below (suggested) works..... if the "home_input_txt" is on the same "Timeline" of the "homeUpdate_btn", but I'm needing to retreive the data from the "home_input_txt" that is on another "Timeline" inside of the movie clip. The "homeUpdate_btn" is on top of the movie clip.
Is there a reason why "home_input_txt" (in the script below) can't be read from another "Timeline" within the "SWF"?
Again I'm a beginner so hopefully I'm saying all of this right :-)
//////////HERE IS THE SUGGESTED SCRIPT
yes, so now:
or if it's on the parent.parent timeline, use:
Where would I put the parent.home_text? Where the in the action script from your suggestion?
It's giving me this error message each time: Below when I use the parent.home_text
Error Message: Symbol 'page 1 edit', Layer 'action', Frame 1, Line 1 1086: Syntax error: expecting semicolon before dot.
Sorry I'm not getting it :-( That's a beginner for you.
////////// use this on the timeline/frame where home_input_txt exists
///////// use this where your button exists:
// Validate form fields and send the variables when submit button is clicked
// Ready the variables for sending
homeEdit_variables.sendRequest = "update_home_page";
homeEdit_variables.home_body = parent.home_txt // or parent.parent.home_txt etc
// Send the data to the php file
I'm getting this error message:
Symbol 'page contents', Layer 'actions', Frame 25, Line 44 1119: Access of possibly undefined property home_input_txt through a reference with static type flash.display:DisplayObjectContainer.
////// mc_edit is the name for the movie clip
///// So I thought I would tell it to find.... the home_input_txt.htmlText....in the movie clip container.
////// I changed the line below in the action script where the button is.
homeEdit_variables.home_body = mc_edit.home_input_txt.htmlText
it worked :-)
It may not be the right way but it fix the problem giving me a severe headache...LOL
Thanks for all your quick responses. You have kept me motivated