Make a message board with components in Flash MX

Source: Internet
Author: User

This is a simple use of the UI Componets components to make a message board, in the input name, sex, place of origin, hobbies and messages, as long as you click the "Submit" button, you can display the above information in the record, and click the "Empty" button to clear out the message
Demo as illustrated
[UPLOAD=SWF] Uploadfile/2004-3/2004325201012209.sw

[Flash=480,360] Uploadfile/2004-3/2004325201012209.swf[/flash]

because of my FLASH MX The upper component is empty, and A version runs too slowly, so I can only FLASH MX of the The runcomponents Flash UI components.fla Open this as a library to take advantage of its components.

in the FLASH used in 5 Kinds of components, 2 input text and a dynamic text, such as a diagram

[Upload=bmp] Uploadfile/2004-3/2004325195623211.bmp[/upload]

The production process is as follows:

One, enter your name in the scene, set it to static text, and then draw an input text box on the other side of it.bitThe content is opaque and the property name isname, as follows



-, enter your gender in the scene, selectRadioButton, add in the corresponding place2aRadioButton, and set the corresponding parameterslable,DateThe value is "male" and "female"Group nameAll forSex, as shown in the figure

2 , enter text box input, and set the text placement

Ffice:word "/>

the , enter your native place in the scene, select the component ComboBox , and add to the appropriate location, set the entity name to Jiguan , the parameters are set to Beijing, Shanghai, Jiangsu, etc., such as illustration


-, enter your hobby in the scene, and select componentsCheckBox, drag out ofaCheckBox, put them in the right place and arrange them, set up eachCheckBoxon thelables, followed by Left-to-right, namedlove1,love2. .....Love12entity name, such as diagram

6, also enter your message in the scene, and draw an input text box on the right, then select the componentScollbar, and put it in place and name the input styleLiuyan, the font you can choose arbitrarily, the size is also, but to more than one line display, such as the diagram


7, drag a component underneath your messagepushbutton, and set the parameters in the property panel, such as the diagram,

the , input the message record in the scene, the method that makes with your message is same
9 , drag below the message record text box pushbutton , set as illustrated

the , Press the new Layer button, add a layer above the first layer, right-click on the second level, select Insert Keyframe, and enter the following code:

content = new Array (); / / define new array

contenttotal = ""; / / variable

For (I=1 i<=12; i++) {// get checkBox Labels

if (_root["Love" +i].getvalue () = = True) {

CONTENT[I-1] = _root["Love" +i].getlabel ();

} else {

CONTENT[I-1] = "";

}

if (content[i-1]<> "") {

contenttotal = contenttotal+content[i-1]+ ";"; //lables as strings and superimposed

}

}

here are two Pushbotton custom function, in order to Pushbotton executes the corresponding function when the event is triggered.

function Turn () {

_root.jilu.text = _root.jilu.text+ " your name. " +name.text+" ============= "+" Your Gender: "+sex.getvalue () +" your place of origin: "+jiguan.getvalue () +" Your hobby: "+contenttotal+" your message. : "+liuyan.text;

}

function Clear () {

_root.jilu.text = "";
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.