Flash
  Home arrow Flash arrow Page 3 - Building Web Forms In Flash
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

Building Web Forms In Flash
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 279
    2002-08-07

    Table of Contents:
  • Building Web Forms In Flash
  • Access Granted
  • Alien Invasion
  • Loading Up
  • Coming Back For More
  • A Fine Balance

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Building Web Forms In Flash - Alien Invasion


    (Page 3 of 6 )

    If you're using the latest version of Flash, Flash MX, you'll be happy to hear that Macromedia's included a bunch of new form controls in it. These controls allow you to build ever more complex forms, including forms containing list boxes, radio buttons and check boxes.

    To access these, use the Window -> Components command to pop up a panel containing these new form components.



    Let's build a simple form using some of these components. Pop open a new Flash movie, and add a couple of static text boxes to it



    Next, add form input fields next to each of these - name the corresponding variables "name" and "species" respectively.



    How about checking the species type as well? Drag a couple of radio button instances from the Components panel into your form,



    and click on each one to set the properties for it.

    In the Properties panel that opens up, click the Parameters tab and set the label for each radio button.



    The label attached to the radio button instance on the Stage should change simultaneously.



    Also set the group name for the radio buttons. Since this is an either-or choice, you should make sure that both radio buttons have the same group name - I've used "speciesType".



    Next, how about adding a list box? Drag and drop a copy of the Combo Box symbol from the Components panel into the Stage. Name it "residence".



    At this point, the box doesn't have any values in it - but you can fix that by popping open its Properties panel, going to the Parameters section, and filling up the Labels and Data sections. The Labels section contains the items to be displayed within the box, while the Data section contains the corresponding values to be sent to the server-side script.



    And here's what the combo box should look like once you're done.



    Finally, we need a button to actually submit the form. Pull out a Push Button symbol instance from the Components panel, and add it to your almost-complete form. Alter the label via the Properties panel, so that it says something a little more helpful.



    While in the Properties section, add a click event handler to the form. This is an ActionScript function that is invoked whenever the button is clicked.



    At the end of all this activity, here's what your form should look like:

    More Flash Articles
    More By icarus, (c) Melonfire


     

       

    FLASH ARTICLES

    - Building Web Forms In Flash
    - Building Data-Driven Flash Movies
    - Flash 101 (part 6): The Final Countdown
    - Flash 101 (part 5): Spiralling Out Of Control
    - Flash 101 (Part 4): Don't Touch Me!
    - Flash 101 (part 3): Bouncing Around





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway