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  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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: starstarstarstarstar / 310
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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

    - An Overview of Flash and ActionScript
    - 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-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT