Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-02-2007, 07:38 PM   #1
mhbb32
Registered User
 
Join Date: Feb 2007
Posts: 6
Default external swf and input text boxes

i am loading an external swf into my main movie. this external swf has input text boxes for users to fill out a "contact us" form. this form then exports the values and emails it. it works perfectly separate from the main swf. the problem occurs when i load it as an external swf. i test the form out and it sends information, but the values are "undefined". is there something i have to do for the main swf to recognize these values inputted into the external swf? i don't know if the send button is looking for values in the wrong place. is there a way i can make sure the send button only looks for values in the external swf MC? please help!
mhbb32 is offline   Reply With Quote
Old 02-02-2007, 09:05 PM   #2
Prpl_Ppl_Etr
Queror
 
Prpl_Ppl_Etr's Avatar
 
Join Date: Mar 2006
Location: Vancouver,BC
Posts: 148
Default

Your description almost makes sense, but if you include the relevant code snippets, we might be better able to find a solution.
__________________
Ascii Abe says,
"Design to an interface!"
Prpl_Ppl_Etr is offline   Reply With Quote
Old 02-03-2007, 06:08 PM   #3
mhbb32
Registered User
 
Join Date: Feb 2007
Posts: 6
Default

to call the external swf i have this on my button:

on (release) {
loadMovie ("feedback.swf","movie");
}

this calls the movie fine and it works.
inside the external swf i have this to send the form:

on (release) {
// Now import the variables we
// need to send in this movie clip
sender_mail = _root.Semail.text
sender_name = _root.Sname.text
sender_subject = _root.Ssubject.text
sender_message = _root.Smessage.text
sender_city = _root.Scity.text
sender_address = _root.Saddress.text
sender_state = _root.Sstate.text
sender_zip = _root.Szip.text
sender_phone = _root.Sphone.text
sender_heard = _root.Sheard.text
// all the vars we just imported
// will be sent via POST method now
loadVariables("sendmail.php",this,"POST");
// and when receives the answer from
// the server...
this.onData = function()
{
// ok, next frame
_root.nextFrame();
if(this.output=='sent')
{
// in case of success
_root.errTitle = 'Thank You.';
_root.errType = "Your message has been succesfully sent.";
} else {
// else
_root.errTitle = "Error!";
_root.errType = "Attention, an error occurred. Please try again later.";
}
}
}


i got this from a tutorial online and modified the code to work for what i need. like i said, the external swf works fine on its own, but has trouble finding the values to send once imported to the main swf. any help would be great. thanks!
mhbb32 is offline   Reply With Quote
Old 02-03-2007, 07:09 PM   #4
Human
Senior Member
 
Join Date: Jun 2006
Posts: 100
Default

Have you tried to embedd the font in the text box? I am assuming you are using Dynamic text.

J
Human is offline   Reply With Quote
Old 02-03-2007, 07:29 PM   #5
mhbb32
Registered User
 
Join Date: Feb 2007
Posts: 6
Default

i am tried that. that was my first idea.
mhbb32 is offline   Reply With Quote
Old 02-03-2007, 07:47 PM   #6
Human
Senior Member
 
Join Date: Jun 2006
Posts: 100
Default

I have had issues like this before where the swf works fine by itself but when you call it externally from another swf it looses its functionality. Just a thought on this I know it worked once for me. Try checking your code to see if it matches with the new code in other words

say this is the original code
Code:
ExternalClip_MC.OldMovieClip_MC.gotoAndPlay(2);
new code would be something like this

Code:
NewMovieClip.ExternalClip_MC.OldMovieClip_MC.gotoAndPlay(2);
Just a thought I know it worked once for me. wont hurt to try just make sure you save your previos version.
Human is offline   Reply With Quote
Old 02-03-2007, 08:57 PM   #7
mhbb32
Registered User
 
Join Date: Feb 2007
Posts: 6
Default

i don't know how that code would work since ive already created a blank MC and inserted it in the main file with an instance name of movie
i tried to figure it out. but im not that good with actionscript. any other suggestions?
mhbb32 is offline   Reply With Quote
Old 02-03-2007, 10:54 PM   #8
Human
Senior Member
 
Join Date: Jun 2006
Posts: 100
Default

Sorry bro but that is probably were the problem is laying. There are other methods for loading external swf. You might want to try that but it does take some knowledge of actionscript.
Human is offline   Reply With Quote
Old 02-03-2007, 11:16 PM   #9
mhbb32
Registered User
 
Join Date: Feb 2007
Posts: 6
Default

could you post your entire snippet of code that you used. id like to take a look at how you did it. thanks
mhbb32 is offline   Reply With Quote
Old 02-03-2007, 11:19 PM   #10
aeon
Visit aendirect.com
 
aeon's Avatar
 
Join Date: May 2003
Location: Singapore
Posts: 104
Send a message via MSN to aeon Send a message via Skype™ to aeon
Default

All your variables are referencing to _root.
Since your movie is no longer in the _root (loaded externally), you got to change _root to point to where your textfields are.

If you have loaded the swf into e.g. an empty movieclip named "holder" on _root, just change _root to _root.holder
aeon is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:26 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.