Results 1 to 8 of 8

Thread: Flash contact form

  1. #1
    Join Date
    Jan 2008
    Location
    Lost in cyberspace
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Flash contact form

    I've been building a drop in contact form for a pair of websites, and have gotten most of the scripting complete (albeit borrowed from other sources) except it will not add in the information for my radio buttons.

    I've uploaded the fla and the accompanying php script file to http:www.jestley.com/downloads/contact.rar

    If someone has some suggestions or can help me finish the last bit of this form, it would be greatly appreciated.


    Chase

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    I can't download now as I am at work.. but did you create the radio buttons yourself or are they Flash UI radio buttons?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jan 2008
    Location
    Lost in cyberspace
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    they are just the flash component radio buttons

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Radio (and check boxes) in the UI controls is a bit tricky. You can use them for forms and such, and it is expected, but it takes a slight bit of jiggery pokery to get them to send their data out.

    So let's say you have 2 radio buttons, one for "yes" and one for "no". Place these instances on your stage and click once on one of them, we will stick with the "yes" for now.

    With it selected open the properties panel and select "Parameters" The only 2 parameters you really need to be worried about here are "selected" and "groupName". If you want "yes" selected by default, then change false to true. otherwise leave it false. For the groupName, give it a name, anything you want, this name will affect every radio button with the same name.

    With that done, give it an instance name. Let's name it "radio1". Now we can add some action script:

    Code:
    on(click){
    	_root.radio1 = "YES";
    }
    Because it is a UI component, when it is clicked it will be selected, no matter what, what we are doing here is telling it that there is a value for the selected, and that value = "YES".

    Do the same thing for the "no" radio button, and make sure they have the same groupName, if not then they can both be selected at the same time... that would be bad.

    So now you want to get the value on the form to show up on the next frame in an out put window (or where ever), now you just call it...

    Code:
    var radioTxt = "_root.radio1";
    Then when the radio button is selected and the movie loads a dynamic text box with a var of "radioTxt" it will show either "YES" or "NO" (or whatever you make them equal too)

    If you are coding in AS3, then forget the _root and use the absolute location of the UI component.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Jan 2008
    Location
    Lost in cyberspace
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So I added this to the actions on the button itself?

    Then that being the case, where do i tell it to add this information into the email the php script sends?

  6. #6
    Join Date
    Jan 2008
    Location
    Lost in cyberspace
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Or do I need to put it in the php script?

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Umm.. yes. Either or. The codes are designed to go on the radios themselves, or you can do a separate AS file or all in one actions layer with something like:

    Code:
    radio1.onRelease = function() {
    	this.radio1 = "YES";
    }
    etc..

    the second code set is what reads it, places it in a text field. you can then use your php to pull from that.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #8
    Join Date
    Jan 2008
    Location
    Lost in cyberspace
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks BLiZZaRD, I'll keep poking at it. And I'm sure I'll be back to make this stupid thing work

Bookmarks

Posting Permissions

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