A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 27

Thread: multi page forms in FLASH MX

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367

    multi page forms in FLASH MX

    I recently bought both the Flash MX and Actionscript MX bibles, i needed a reference guide as well as a foundation to my knowledge. I have however reached a dead end in one major aspect of both your books. I am referring to Multipage forms.

    Apart from inconsistencies between the book and the CD file itself (ie, in the FLA, it says nextButton._visible rather then enabled which is in the book.) I cant apply the lessons from this chapter to my current project.

    I have a Multipage form made up of 4 pages,,, it consists of components which i have labelled independently (not via actionscript) and text input boxes. your example only has components in it. However i used a previous lesson to integrate the text fields in the script.

    Needless to say, when i test the movie, if i fill text in page 1, then 2,, page 3, i hit prevButton to go back to page 2,, the text is prefilled, but hit prevbutton again, and page 1 is empty. Further more hit nextbutton and the next page is empty as well.

    As for the components,,, their states dont seem to be saved on the the pageset function.

    I am in dyer straits here with this situation. I am a music producer and song writer for a living,, I am building this site for my father as there is no money available. I would much appreciate any kind of advice or tutorials that could show me how to make a multipage form incorporating text input boxes and components. I only need the actionscript to gather the inputted text and componant data, save it for prefilling revisited pages,, and finally sending it all out of flash to an email address...

    Many thanks

  2. #2
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    hi,
    can you post the FLA you're working on? From what you've posted so far, i can only assume that you have some sort of script either on the buttons for next/prev frame or the frame itself that initializes the variables assigned to the text fields when you enter that frame..
    cant be for sure though, until i can see some script.

    as for the tutorials, take a look at this, it may help..
    http://www.flashkit.com/tutorials/In...-778/index.php

    later,
    -myk

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367

    can i email it to u ?

    it wont let me post the file,, its 112k do u have an email i can send it to?

  4. #4
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    negative, i'll kinda protective about the email address because of problems with the Sobig virus... can you zip it or post it to your webserver?
    i'm glad to help, but am not to willing to give my address.
    sorry.
    -myk
    -moooooooooo

  5. #5
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    i think this should do it,, i compressed it to ZIP,, though i am using a mac

    may the force be with u

  6. #6
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    tell me if u got it

  7. #7
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    got it.. may be later tonight or tomorrow before i post back.. I can look at it for a little bit, but i have to go teach a music class shortly.
    i'll see what i can do until then, though.

    later,
    -myk

    -moooooooooooooooo

  8. #8
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    @#$%!!, thats a lot of script.
    on intial glance, the only thing i can think of is that you may want to use variable names instead of giving the text field an instance name in this case. That way, the variable name can stay assigned unless the variable is changed by the user in some way..

    will look more in depth later.

    If anyone else wants to take a stab at this, go ahead, i may not get it soon enough for him.

    thanks,
    -myk

    -mooooooooooooooooooooo

  9. #9
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    i will take that as a compliment ,,, ha ha,,, im no brainiac though,, considering the dam thing doesnt work ,, buuuuut,, u have definnatly given me food for thought about the VAR thing,,,, get back to me if u can ,, peace

  10. #10
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    gotta get to class, but i made this real quick.. Its only a one page form, but notice how the variables are assigned instead of the text property..
    hope this helps
    Attached Files Attached Files

  11. #11
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    one more thing i noticed...
    the "problem" doesnt occur until you hit the 4th frame, where you have "if not registered, state reason" and you list the desc. of lost or damaged items.. If i just go one page forward, then back, the stuff on the first form stays.. If i go two, then back, all but the first text field are blank... I'll check over the scripting to see if you have something that may be reinitializing the values..
    i think thats gotta be it!
    -myk
    -mmmmooooooooooooooooooooooooooo

  12. #12
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367

    well im one step closer

    ok, i managed to solve ( i believe) some of the TEXT field saveing problem...spot the difference:
    function pageSave(page){
    if(page == 2){
    formData.contactName = contactName.text;
    formData.businessName = businessName.text;
    formData.postCode = postCode.text;
    formData.policyNo = policyNo.text;
    formData.natureOfClaim = natureOfClaim.text;
    formData.dateTimeOfLoss = dateTimeOfLoss.text;
    formData.dateTimeDiscovered = dateTimeDiscovered.text;
    formData.fulladdressOfClaimLocation = fullAddressOfClaimLocation.text;
    formData.NameAddressDiscoverer = NameAddressDiscoverer.text;
    formData.claimsDetails = claimsDetails.text;
    }

    ANNNNNNNNNNNNNND

    function pageSave(page){
    if(page == 2)
    formData.contactName = contactName.text;
    formData.businessName = businessName.text;
    formData.postCode = postCode.text;
    formData.policyNo = policyNo.text;
    formData.natureOfClaim = natureOfClaim.text;
    formData.dateTimeOfLoss = dateTimeOfLoss.text;
    formData.dateTimeDiscovered = dateTimeDiscovered.text;
    formData.fulladdressOfClaimLocation = fullAddressOfClaimLocation.text;
    formData.NameAddressDiscoverer = NameAddressDiscoverer.text;
    formData.claimsDetails = claimsDetails.text;



    YES ,,, u guessed it,,, the blasted "{" and "}",,,, i mean come on,, wtf dont they teach u simple things like that,

    regardless,, i have to work out now, why the component states are not being saved,, or prefilled properly, and why the text is not saved or prefilled properly for the last frame of the multiform...hmmmmmm

    any advice would be greatfully recieved,, i have posted the revised FLA

    many thanks

    avi

  13. #13
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    ....guess i missed the bracket too.. Real easy to miss something like that when you got so much script, but at least you found it.
    -i'll try to take another look when i get home and see if i can help in any way.

    later,
    -myk

  14. #14
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    ok,, i have now solved the teext field problem in the last frame,, apparently i hast only applied the pageSave function to the nextButton, so if u pressed the prevButton, it would not save what was on that form,,,which makes sence since the last page does not have a next button, only a prev button. The only problem that remains is the question of getting back the radiobutton or even better,, ANY components state, value, data or what ever,, from the savedobject. if i hit yes ,, when i go back, i want yes to be there too !

    FINNNALLLYYY,, is there a way i can send all these variables to my soulsongwriter@aol.com address? so when i test the movie, i can see how it presented the whole damn result ?

    many many many thanks,,

    avi

    myk,,, by the way,, if u solve this for me,, i run and own a state of the art recording studio in Manhattan NY, if u ever there, ill give u a day to do what the hell u want. I am an established producer myself

  15. #15
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    my post has disappeard,,, i found it by user name,, whats going on

  16. #16
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    we'll start with the variable sending part.. Do you know how to write an ASP page? You can send the variables to an ASP using the "sendAndLoad" method... for example, i think you have all your form data going to an object you named formData or something like that.. anyway, your script on the submit button would be something like:
    Code:
    _root.formData.sendAndLoad("http://www.mykURL.com/myASPpage.asp", 0, "POST");
    this would send all variables in the formData object to the ASP, which would then process and sort the info, and send it to your desired email address..
    I may be able to help a little with that.. As far as the other goes, post back the FLA of what you have now, and i can take a look...

    BTW- looks like you did most of the work..

    -myk
    -"moo, dammit"

  17. #17
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    wow

    thatsl ot of code there

  18. #18
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    So where are you on this?

  19. #19
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    sorry, man.. been a busy week, and i just totally forgot.. dropped the ball.

    Like oldnewbie said, where are you at this point, do you just need help with the ASP page?

    also, someone else here may have some ideas as to ASP versus PHP or some other script.. which would be more efficient and/or easir to edit for someone who doesnt totally understand it?

    -myk

  20. #20
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    well,, right now i am stressed,,, i have to fly back to NY to produce on this album for a major label in 14 days !!!!! I have to complete this web site for my father, including designing the stationary and artwork, annnnnnnnnd making sure the website it up and running. Amazing how the need for money may not be such a material thing after all. I am attempting to help my family from being homeless lol anyway...

    Hope u have been well, here is my shopping/wish list....

    1. The current FLA can be used to do this,,,, why are the componanants not being saved,, or reloaded when those pages are revisted,, if i answer yes on one page,, go forward and go back again,, i want that yes to remain CHECKED....

    2. I have made a 50 frame movie that i want to turn into a preload for the main FLASH movie. I want to actionscript to do the following

    stop at frame 10, check if 15% of the movie is loaded, if yes, then play and stop at frame 20. if not,, then stop until it is 15% loaded.
    then play and stop at 20. then check if 30% is loaded, if yes,, play and stop at frame 30. if not, wait until 30% is loaded and then play........... this needs to continue to frame 40,, then frame 50 where if it is 50% loaded then the main movie can play.

    3. I have no idea about anything to do with getting the movie on the web, asp, php, blah blah blah,,, nothing whatsoever,,,

    u mentioned that the asp will format the results,,, in what way does it do this,,? does it present it in an email to me in a list? so my father can make sence of it ? like

    name = avi
    address = the moon
    are u male = Yes (radio button)
    age range = 1-18 (combo box)

    this i would find acceptable,,

    thanks for annnnnny help u can give

    avi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center