Archive for November, 2009
Although the ScrollPane
Posted by Admin in Uncategorized on November 28th, 2009
Although the ScrollPane does not require any ActionScript at all to work, there are plenty of functions that you can use to determine which part of the movie clip is being viewed or to change the width and height of the pane.
You can also use the Properties panel to change the width and height of the scroll pane. When you do this, the scroll pane looks distorted in Flash, but it looks fine when you run the movie.
One useful ActionScript command is the loadScrollContent command. This command takes a URL and gets an external movie clip to display in the pane.
The scroll pane can be useful as an image browser.
ScrollBar
The last component is the ScrollBar. This adds scrolling bars to text fields. You can use this component without any ActionScript at all. Just drag and drop a ScrollBar component to a text field, and it adds itself there.
The ScrollBar component does have a small list of ActionScript-accessible properties. For instance, you can use getScrollPosition() to get the current scroll position and setScrollPosition() to change it.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
ScrollPane
Posted by Admin in Uncategorized on November 25th, 2009
The next two components are different from the previous five. They are not used to allow the user to make choices, but are instead used to display large amounts of information in small spaces.
The ScrollPane component consists of a vertical and horizontal scrollbar and a rectangular viewing area. Its main parameter is Scroll Content. This is the Linkage name for a movie clip. When you run the movie, the movie clip is copied from the Library and placed in the view area of the scroll pane. The scrollbars then allow the user to view different parts of the movie clip.
Figure 21.9 shows the ScrollPane with a movie clip inside. You can see this example in the movie 21scrollpane.fla.
If you set the Drag Content parameter to true, the user can also click in the display area and drag the image around. The scrollbars follow the dragging.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
shows all three variations
Posted by Admin in Uncategorized on November 22nd, 2009
shows all three variations of a combo box. The box on the left is what a combo box looks like when it is inactive. The second box shows what happens when the user clicks the combo box. The third box shows what happens when there are more choices than rows.
When a user selects a new choice in the combo box, the Click Handler is called. Here is one that simply tells you the label that was selected:
You can also use getSelectedIndex() to get the zero-based number of the selected choice.
The example movie 21combobox.fla shows an example of a ComboBox component.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
ComboBox
Posted by Admin in Uncategorized on November 19th, 2009
A combo box is something that Windows users will be familiar with, but no such thing exists in standard Macintosh interfaces. It is a pull-down menu where the user can also type in a value manually.
Fortunately, you can also turn off the option to edit the value. This turns the combo box into a normal pull-down menu. The parameter for doing this is the first one in the Properties dialog for a combo box, named Editable. In addition to that parameter, you can also provide arrays for the Labels and Data.
Another parameter for a combo box is the Row Count. Combo boxes can act a little like list boxes. When the user clicks them, they expand into a list of choices. If the number of choices exceeds the Row Count, a scrolling bar appears to the right to allow the user to scroll through the choices.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
There is also a PushButton
Posted by Admin in Uncategorized on November 16th, 2009
There is also a PushButton component in the example movie. When it is clicked, it runs this function. It uses the getSelectedItems() function to get an array of the choices selected in the list box. Each item in the array is an object with a label and data property. Because we didn’t use the data properties of the list box, we’ll get the labels instead.
You can also add or remove lines from the list box using ActionScript. For instance, addItem adds an additional choice to the list box.
myListBox.addItem(”Choice Four”);
You can use addItemAt, removeItemAt, and replaceItemAt to make even more changes to the list box with ActionScript.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
Best Place to Get Best Swimwear
Posted by Admin in Uncategorized on November 15th, 2009
Do you like swimming? If you like it, you should feel and know the benefit of this activity. Yes, you can relax as well as exercise with swim.
But, like other activity, you need best equipment to make it easy to do. And swimwear is one of the important equipment that you need. Swimsuitsforall.com is the best place to get best womens swimwear. There’re many types and color product with best price that you can find here.
You also can get best bathing suits here. So, everything that you need for activity on the water is here. So, visit now or call the number here for more information and get the best product for your swimming hobby.
In addition
Posted by Admin in Uncategorized on November 13th, 2009
In addition, you must set the Labels parameter. However, this is not a single value but an array of values. Flash has a special interface for entering these values. When you click on the Labels parameter in the Properties panel, you get a dialog that looks like Figure 21.7.
You also have a Data parameter that can take an array of data. This Data parameter, like the one used with radio buttons, allows your code to get additional information about the choice(s) that the user made. However, it is not required.
In the example movie 21listbox.fla, I have placed a ListBox component with three choices on the screen. It is set to accept multiple selections. When the user clicks on a line, the listBoxChange function is called. This is specified by its Change Handler parameter. This function tells you which line was just selected:
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
ListBox
Posted by Admin in Uncategorized on November 10th, 2009
A ListBox is a simple way to allow the user to select one or more options. A ListBox can take the place of either a set of CheckBoxes or a set of RadioButtons. It is particularly useful when you have many choices but limited screen space.
Figure 21.6 shows a ListBox with three choices. It looks a lot like a scrolling text field—in fact, it is. Each line represents a different choice for the user. If there were more choices than could fit in the space, the user could scroll up and down the list to see them all.
When you create a new ListBox instance, you must set its Select Multiple parameter. If true, the user can use the Shift, Command, or Ctrl keys to select more than one line. If false, only one line may be selected at a time.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
The Data parameter
Posted by Admin in Uncategorized on November 7th, 2009
The Data parameter is an optional one that can be used by you in your scripts. You can access it with the getData() function. You can store instructions that your script can pick up on when the choice is made. Or, you could avoid the Data parameter and refer to the name of the RadioButton.
In the example movie, the three RadioButtons are named choice1, choice2, and choice3. The labels for these buttons are Choice One, Choice Two, and Choice Three.
Determining which choice the user has made is done when the PushButton in the movie is clicked. The PushButton then runs this script to determine which choice has been made. The script loops through the three buttons looking for a button that returns a true from the getState() function. This is the RadioButton that is turned on.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours
RadioButtons
Posted by Admin in Uncategorized on November 4th, 2009
RadioButtons are similar to CheckBoxes, except that they are arranged in groups. Only one RadioButton in a group can be on at one time. You can see what RadioButtons look like in Figure 21.5.
The example movie 21radiobuttons.fla has three RadioButtons. If you select one of the buttons and bring up the Properties panel for that button, you will see that it has more parameters than the CheckBox or PushButton components.
In addition to the parameters seen in the CheckBox component, there are Group Name and Data parameters. The Group Name parameter specifies which group the RadioButton belongs to. In the example movie, all three RadioButtons have this set to firstGroup. If there was a second group of buttons with a different name, these two groups would be treated separately when it comes to deciding which RadioButton is on.
Taken From: Sams Teach Yourself Flash™ MX ActionScript in 24 Hours


Recent Comments