Example details the properties of instances in Flash

Source: Internet
Author: User
Detailed

Original tutorial, reproduced please indicate the source: Web Teaching Network

When we make animation with flash, we always use symbols (components or components), there are three kinds of types: MC, BUTTON, GRAPHIC. When we press the F8 key, the object you select is converted to a symbol, but the essence of Flash is to interact, that is, we have to learn the action. When we drag a symbol from the library to the scene, then the symbol is called an instance. Usually when we use the action, some instructions call the instance name of the MC, and the instance of graphic is not callable.

When we call the MC first to the MC to set an instance name, in the action instruction we can make full use of the example to achieve special effects. For example: GetProperty (), setproperty () and so on! During the invocation of an instance, we usually change its properties to achieve the effect. We already know that using these movie properties can design a lot of dazzling effects, but perhaps many readers are not really familiar with it. Proficient in mastering and using these movie properties, not only can improve the programming ability of their own flash. If in time, your flash level will be "higher".

First give you 2 examples to let you understand: finally provide you with the source file download

   Example 1:

   Example 2:

So what are the properties of the instance? Specifically, describe the properties of the instance:

Property name Description description
_alha Transparency, expressed as a percentage, 100% indicates opacity, and 0% is transparent.
_accprops Availability. screen reader Accessibility options for controlling SWF files, movie clips, buttons, dynamic text fields, or input text fields at run time. These properties override the settings provided in the accessibility panel at authoring time. In order for the changes to these properties to take effect, you must invoke Accessibility.updateproperties (). For information about the accessibility panel, see the Accessibility panel for Flash. To determine whether your player is running in an accessibility-enabled environment, use System.capabilities.hasAccessibility.
_currentframe The frame number that the current movie or movie fragment symbol instance plays.
_droptarget When the first movie fragment instance is dragged onto the second movie fragment symbol instance, it is set to the name of the movie fragment symbol instance that was last dragged to.
_focusrect Whether the button symbol in the movie displays a yellow border when you use the TAB key to toggle the focus. The yellow border is displayed by default, and when set to 0 o'clock, the button symbol's up state is displayed.
_frameloaded Returns the number of frames completed for download over the network. Often used during pre-download.
_height The height of the movie fragment symbol instance, or the height of the movie, in pixels.
_highquality Visual quality settings for movie films. 1 is low, 2 is high, 3 is best.
_name Returns the name of the movie fragment symbol instance.
_quality Returns the playback quality of the current movie.
_rotation The angle that the movie fragment symbol instance rotates in relation to the vertical direction. But with property rotation, small changes in size can occur.
_soundbuftime The sound in Flash is downloaded and played before playback, which indicates the time of the download.
_target A string that specifies the exact character of the movie fragment symbol instance. Often used when using tell target.
_totalframes Returns the total number of frames for a movie or movie fragment symbol instance on the timeline.
_url Returns the full path name of the SWF file.
_visible Specifies whether the movie fragment symbol instance is displayed: 1 is displayed, and 0 is not displayed.
_width The width of the movie fragment symbol instance, or the width of the movie, in pixels.
_x The horizontal distance between the center point of the movie fragment symbol instance and the upper-left corner of the stage where it is located. When a movie fragment symbol instance moves, it changes the value dynamically, in pixels. Needs to be used with the property panel.
_xmouse Returns the position of the mouse pointer relative to the level of the stage.
_xscale The percentage of the movie fragment symbol instance's scaling relative to the actual width of its parent class.
_y The vertical distance between the center point of the movie fragment symbol instance and the upper-left corner of the stage where it is located. When a movie fragment symbol instance moves, it changes the value dynamically, in pixels. Needs to be used with the property panel.
_ymouse Returns the position of the mouse pointer vertically relative to the stage.
_yscale The percentage of the movie fragment symbol instance's scaling relative to the actual height of its parent class.

  Finally provide the source files for the two files above



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.