How to use Flash to make message board

Source: Internet
Author: User
Tags interface modify

How to use Flash to make a message board?

Solving ideas

We can implement a simple example of a message board with the build that comes with the Flash MX. It is convenient to use the components in Flash. This example is only involved in the production, the message board in the specific application of a lot of other than flash knowledge, here is not introduced to you.

Specific steps

1, run Flash MX, document properties default.
2, import a wallpaper picture of the background of the message board. Friends can also set the Flash document background or create a layer as the background. As shown in Figure 1.

Figure 1 Importing a background picture

3, create a new layer and use the Text tool to enter static text. and set their location. As shown in Figure 2. The placement of the text can be done by using the Alignment Panel in window | Align, or by using the guides inside the view | ruler.

Figure 2 Entering static text

4, we select the Text tool and create an input text on the right side of the "Forum ID" in the scene. Enter the Text property setting as shown in Figure 3.

Figure 3 "Forum ID" Enter Text property settings

5, "Window" | "Components", open the build panel, drag the build RadioButton into the scene two times. Select a component in the scene. In the following property panel, make the following settings. As shown in Figure 4.

Figure 4 Radion The button component's property settings

The Label is the name of the component. Our component is "male", so Add "male" to the label item.
Initial state Specifies whether the radio button is initially selected or unchecked. True is selected, False is unchecked. We choose True.
Group Name Specifies the radio button groups to which this radio button belongs. We add "Xingbie".
Data is the one associated with the radio button label. We added "male".
Label placement to the left or right of the radio button when the label is specified. The default is the right side.
Change Handler is the name of the function to be executed when a user selects a radio button in a group, and there is no function.

6, choose another Radion button component, in the same way, only changing the label and initial state items. As shown in Figure 5.

Figure 5 Property settings for another Radionbutton component

7, select the ComboBox component from the library and place it on the right side of the book time. ComboBox is a checkbox component. As shown in Figure 6.

Figure 6 ComboBox components

7, select the ComboBox component, in the following parameter options, click Labels, open the value panel, use "+" in this panel to add the options. As shown in Figure 7.

Figure 7 Setting the value parameter

8, below we select the Data input button in the parameter option to associate it. The content is the same as the labels option. The Row count option specifies the number of items to display in the combo box before the scroll bar is displayed. The default value for this parameter is 8.

9, let's make the check box for the "option category". Locate the checkbox component in the Build panel and drag it to the corresponding position in the scene. Modify its label option to "Flash" in the parameters panel below. Using the same method, drag and drop two of components, and modify their label options for "Flash as" and "Web page production". As shown in Figure 8.

Figure 8 Modification of the label parameter for a checkbox component

10, select CheckBox component Flash and switch to the Properties panel. The name of the instance named it is "Xg1". In the same way, the "flash as" and "Web page production" are named "Xg2" and "Xg3". As shown in Figure 9.

Figure 9 Instance names for movie clips

11, let's make a message box. Using the Text tool in the toolbar, pull a text box on the right side of the message. Set his properties in the Properties panel, the text type is input text, the instance name is "Liuyan", the font is bold, the size is 20 pixels, multiple lines are displayed, and the border is displayed around the text box. As shown in Figure 10.

Figure 10 Property settings for the input text

12, in order to prevent the user input too much text and the text box is too small problem, we use the ScrollBar component to solve. The scrollbar component is a scrollbar component that we drag and drop onto the right side of the input text box, using the Freeform tool inside the toolbar to change its height to the input text. As shown in Figure 11.

Figure ScrollBar Components

13, only the input text "Liuyan" and the component ScrollBar establish some kind of association, the function of the build can play out. We open the parameters panel of the ScrollBar component and enter the instance name "Liuyan" for the text in the target TextField option. This allows the component to contact the input text "Liuyan" through target TextField text. As shown in Figure 12.

Figure 12 Control of the target text

14, OK, we'll just make a submit button. Drag the Pushbutton component from the build panel to the appropriate location in the scene. and parameters are set. As shown in Figure 13.

Figure pushbutton parameter settings for components

15, the user submits the page we have all finished. Below we will make the user information feedback page.

16, create a new layer and insert the keyframe at frame 2nd. Draw a user Information feedback page within the editing area. As shown in Figure 14.

Figure 14 User Feedback page

17, select the Text tool and create a text box on the feedback page. Text size to cover user Submission page. The properties of the text box are instance name Fankui, font bold, font size 20, font color black, multi-line editing, and a border around the text. As shown in Figure 15.

Figure 15 Property settings for dynamic text

18, click "Return" static text and convert to a button symbol. Double-click into the edit area of the button and draw a rectangle in frame 4th to enlarge the range of the button's response.

19, add the following as statement on the 1th frame of the feedback layer:

Stop ();
function clickOK (component) {gotoAndPlay (2);//If you click the Submit button, go to frame 2nd for execution.
if (Xg1.getvalue ())//If the selected name is the Xg1 check button.
{Xg=xg1.label;} Just call this name XG1. The Label property value of the Check button to the Xuexi variable.
if (Xg2.getvalue ())///If the selected name is called Xgi2 Check button
{xg+= "and" +xg2.label;} Just call this name Xg2. The Label property value of the Check button to the XG variable
if (Xg3.getvalue ())//Ibid.
{xg+= "and" +xg3.label;} The above three SELECT statements are used to get the value of the variable XG.
_root.disptext.text= "Forum ID:" +id.text+ "\ R sex:" +xingbie.getvalue () + "\ r buy Book time" +shijian.getvalue () + "\ r purchase Category:" +xg+ "\ R message content: \ r "+liuyan.text; Calculates the string of information that should be displayed in dynamic text in the final feedback interface
}

20, how to add a stop () on the 2nd of this layer;

21, select the Return button and add as as on the button:

On (Press) {
gotoAndPlay (1);
}

22, save, Test. Please refer to the source file message board. FLA

Note-for example, the radio button component, using the Freeform tool inside the toolbar, cannot change its size property. If you want to change its properties, you can open the component skins file in the Flash UI Components folder in the library, select the FLA bel file in the global skins, enter the editing area, and modify the properties of the dynamic text in it to change the appearance properties of the component. It is worth noting that multiple builds share the appearance of a component. Changing the appearance properties of one component means changing the appearance of other builds.

Tip The--combobox component can change the width by using the Freeform tool inside the toolbar, but it cannot change the height of the build. If the text of the list box is longer than the length of the combo box, the text is truncated.

Special tips:

The settings for each parameter in the component are described in the previous example. The interaction of components with as is not covered in this example. We just introduced the use of flash components to make a simple message board, in fact, the message board system is not only the realization of the knowledge of Flash. He needs a lot of network technology to support.

Special Notes

A component is a complex movie clip with defined parameters that are set during document authoring while the component also comes with a unique set of action scripting methods that you can use to set parameters and other options at run time.

Figure 16 Common components

Flash MX includes seven flash UI components: CheckBox, ComboBox, ListBox, pushbutton, RadioButton, ScrollBar, and ScrollPane. You can use these components alone to add simple user interactions to Flash movies, or combine them to create a complete user interface for a WEB form or application.

CheckBox: check box component
ComboBox: Scrolling Drop-down list Component
Lisbox: Scrollable radio and multiple-selection list box components
Pushbutton: Submit Button Component
Radio button: radio button Build
ScrollBar: Used to add vertical and horizontal scroll bar components to dynamic text fields and input text
ScrollPane: You can add a window pane with vertical and horizontal scroll bars



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.