-
-
Ok for now i will use another.
I found on koolexchange a mailform.
Filename: mailform
I imported the .fun into my file.
My file has 7 frames. I opened it on frame 2 and it goes on till frame 7..
(Or is it cause it says it isn't connected to the server)
I want this cause my file is 7 frames long, but if i go to frame 3,4,5,6,7 i see the Mailform.
Can i do something like: Open in frame 2 and stop.
Or must i increase my frames?
Excuse me, if my english isn't correct. I hope u understand what i mean.
Thanks
Last edited by trendsetterz; 06-11-2009 at 07:03 PM.
-
KoolMoves Moderator
-
Hi i have version 7.0.
Thanks
-
Don't worry. Thanks.
I increased already the frames.
It worked. One thing, when an error ocurs (when u don't fill the form) than u can press the button Back, than he starts again at frame 1 and not 3.
But thanks anyway!
-
KoolMoves Moderator
Probably need to just change the action for the back button to go to the correct frame.
-
-
In a new file it is workin.
But in the .fun i'm workin, its gives a error:
PHP Code:
The following AS1 code was removed from the movie because it will definitely not compile as AS3.
It is possible there is other code which will need to be converted to AS3.
Object btn1:
on (release) {
problem="";
lf="\n";
if (n.text.length<3){
problem+="Name to Short"+lf;
}
if (e.text.indexOf(",")>0){
problem+="one Email address only please "+lf
}
if (m.text==""){
problem+="Please enter a message"+lf;
}
if (e.text.length<7){
problem +="email too short "+lf;
}
if (e.text.indexOf("@")==-1){
problem+="Email missing @"+lf;
}
if (e.text.indexOf(".")==-1){
problem+="Email Missing dot"+lf;
}
if (e.text.indexOf("@")>e.text.indexOf(".")){
problem+="Mal formed email"+lf;
}
if (e.text.lastIndexOf(".")>e.text.length-3){
problem+="invalid Domain"+lf;
}
if (n.text==""){
problem+="You must enter a name"+lf;
}
if (problem.length<1){
emailvar.name=n.text
emailvar.email=e.text
emailvar.message=m.text
emailvar.sendAndLoad("jjhsuhs.php",result,"POST");
nextFrame();
}
if (problem.length>1){
p.text="problem"
gotoAndPlay("form_error");
}
}
---------------------------------------------
Object mc2:
on(release){
m.text=e.text=n.text="";
}
Is this because i didn't fill the mail yet.
And when i press ok: i got this error:
There are some instance name conflicts. The following changes have been made in exporting the swf.
Action script code which references these instance names has not been changed.
S56 -> S56_52
btn1 -> btn1_71
btn3 -> btn3_78
-
KoolMoves Moderator
This is because the form is AS1 from KM6. I'm working on a new one for AS3 as we speak. Be patient I will get it done soon.
[note] I moved this to the proper thread
Last edited by blanius; 06-12-2009 at 09:30 AM.
-
Ok thanks man,
appriciate.
Goodluck!
Peace
-
KoolMoves Moderator
Almost there.
Just need to finish up and test the server side PHP
Try the form, Extra feature try to add email headers to the text like bcc: or to: etc... This is what spammers do...
Last edited by blanius; 06-19-2009 at 11:22 PM.
-
up to my .as in code
Also have one coming that utilizes an RTE to create formatted html mails. Yes, it has injection control
Running here:
http://www.km-codex.com/?page_id=421
KM7/AS3/PHP
-
KoolMoves Moderator
as usual one step ahead of me Chris lol
-
up to my .as in code
No...just happened to have one lying around.
Cleaning up the code now.
-
KoolMoves Moderator
I'm pretty much done here as well just not getting my response back from server correctly, Server is sending it my AS3 is just bad....
PHP Code:
//code snippet of sending data status_txt.text="Sending..."; submit_btn.enabled=false; //first we create a URL formated variables email_data="name="+name_txt.text +"&email="+email_txt.text +"&subject="+subject_txt.text +"&message="+message_txt.text; txt1.text=email_data; //then we create a URLVariables object and load our text URL_vars=new URLVariables(email_data); //Set it to use Text URL_vars.dataFormat=URLLoaderDataFormat.TEXT; //set the URLRequest data to our variables vRequest.data=URL_vars; //Actuall send it to the server vload.load(vRequest); //wait for it to be done sending vload.addEventListener(Event.COMPLETE,done);
this is working but Event.Complete is not
PHP Code:
function done(e:Event){ var loader=new URLLoader(e.target); email_status=new URLVariables(loader.data).success; txt1.text=email.status; status_txt.text=email_status; if (email_status=="ok"){ status_txt.text="Email recieved"; }else{ status_txt.text="There was an error. not sent"+email_status; } }
-
up to my .as in code
Just posted in source section.
-
Uhhhhhhhhhhhhhhh it's now going a little to fast for me :P
Or is the solution not find yet??
Blanius the code you pasted is that of the mailform.fun file?
&
Chris Seahorn, i downloaded KM Codexcontactform and when i'm opened it and want to play it, it says:
Can't find package etc.
Greets!
-
KoolMoves Moderator
Chris's example uses the tweenmax or tweenlite classes. You need those to compile his version or remove the references to it.
What I pasted is from mine, it's just quite working yet... I've having a problem with it still. AS3 is still new for me and I am away from it for long periods so I forget half of what I learn. I dealt with this same issue before but forget how I fixed it.
-
up to my .as in code
Since the source needs to be edited to insert your subject lines, I had hoped the commented section here:
//Tweenmax classes need to be present!
import gs.*;
import gs.easing.*;
import gs.events.*;
import gs.utils.tween.*;
import gs.plugins.*;
would do the trick
Last edited by Chris_Seahorn; 06-14-2009 at 09:35 AM.
-
KoolMoves Moderator
I've upload mine now to the KoolExchange (look in the input forms section) for you to download as well. You would do well to look at both and see what you can learn from both, I know I'm studing Chris's example, he always does great work and usually has added features like using tweenmax which is pretty cool. Mine is a little simpler.
Good luck Trend
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|