Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Form Assistance

Status
Not open for further replies.

Packet7

IS-IT--Management
Jun 20, 2003
751
US
Hello,

I have a Form embedded as a Movie Clip with the following Action Script applied:
onClipEvent(data){
// show welcome screen
_root.nextFrame();
}

The form consists of three Input Text fields (name, email and message). When I fill out the form in IE, the Tab order doesn't appear to work and I need to click on each field. I thought using the tab index order would correct the problem, but it didn't. I have the following applied to a Key Frame in the movie:
_root.name.tabIndex = 1
_root.email.tabIndex = 2
_root.message.tabIndex = 3

The second issue I have is related to proceeding to the Next Frame after the form is submited and the email is sent via the PHP script. As detailed above, I' using the:
onClipEvent(data){
// show welcome screen
_root.nextFrame();
}
to proceed to the next frame. Unfortunately, it doesn't proceed to the next frame. The good news is that the email is sent, but I would like the "Thank you" frame to appear with a "Back" button.

Any help would be appreciated, thank you.



Rgds,

John
 
Hi,

Obviously, I am a newbie when it comes to Flash. What is "on Stage"? I clicked on the layer and frame in the timeline that highlights all the fields in the movie with a blue box and pasted:
_root.name.tabIndex = 1
_root.email.tabIndex = 2
_root.message.tabIndex = 3

This form is displayed at Frame 5, does "_root" send it back to the first frame in the movie?

Thanks for your help!

Rgds,

John
 
Stage" is your movie.

"_root" is the main timeline of your movie.

If you placed your text fileds directly on Stage that means they are on the main timeline, therefore they are on "_root".

"_root" indicates the main timeline, it does not send playhead to the first frame - that's "gotoAndStop(1)"

You should place your scripts in a frame - your Actions panel should say "Actions - Frame".


Kenneth Kawamoto
 
Hi,

Thanks for the info. The tabIndex is still not working. The script was applied to the frame. It's odd that the shift-tab combination works to tab backwards through the fields. The second "email" entry is black in the Action script. Maybe there is the problem.

Regarding the flow of the movie, I tried gotoAndStop(11), but after I click submit it doesn't take me to frame 11.

Thanks again for all your help.

Rgds,

John
 
Hello,

Good news. I was able to resolve the tab issue. It turns out I had static fields behind the form. I removed the form and fields and rebuilt it.

Bad news. Still unable to proceed to the "Thank you for your email" frame. More info below. Any ideas?

The form has the below script applied.

onClipEvent(data){
// show welcome screen
_root.nextFrame();
}

The submit button has the following applied:
on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}

Email works, but I never make it to the "next frame". I'm guessing it's an issue with my timeline or something. There is a single scene in the movie, but the form page is a child of a parent. Is the "_root.nextFrame();" causing the issue?

Thanks again.

Rgds,

John
 
I applied the code to the action script specified for the Form and tested. The email went through, but nothin changed. After 1 full second, the page displays a swiping effect of an image. I think it's a frame from the main timeline.

Any ideas? Thanks!

Rgds,

John
 
Not that I could see. I'm guessing it would've created a Flash Output Window of some sort?

Rgds,

John
 
OK. I click on the Form on the stage. It highlights in blue, the Properties window shows "Instance of: form" and it indicates it is a "Move Clip". The Actions window shows:

onClipEvent (data) {
trace(data);
_root.nextFrame();
}

Rgds,

John
 
Not that I can tell. No output. It runs a quick animation that I believe is linked in the root movie and displays the form with the information entered. However, the email is sent and does work fine.

Rgds,

John
 
Hi,

I tried that a few days ago and it didn't work. Hoever, I'm not too sure my script was right. Can you send me the code for the form to use? I think it should skip to frame 11. It's also labeled "thanks". This is what I have now...

onClipEvent (data) {
trace(data);
_root.nextFrame();
}

Thank you.



Rgds,

John
 
Try:
Code:
on (release) {
    // send variables in form movieclip (the textfields)
    // to email PHP page which will send the mail
    form.loadVariables("email.php", "POST");
    [b]_root.gotoAndStop("thanks");[/b]
}

Kenneth Kawamoto
 
Hi,

I removed the Action Script assigned to the Form and added your code to the submit button. Unfortunately, it didn't work. The email went through, but it stayed on the form with the info entered.

I'm not a 100% sure, but my contacts page appears to open a child movie. Maybe the root is the parent and the "thanks" frame is not being found. Is there a way to advance it without going back to the root? Or does that code simply implies to return to the root of the current clip?

Thanks.

Rgds,

John
 
Scene 1, "pages" movie clip, "form" layer, frame 11. Does that help?

Rgds,

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top