Flash mouse Effects selected examples (2)--4d mouse

Source: Internet
Author: User
Tags final

Section II: 4D mouse

This instance implements, imitates the 4D mouse middle key effect, when clicks the middle mouse button, drags the mouse to control the text to scroll, the final effect as shown in Figure 2.1, to achieve this effect, the concrete steps are as follows:

Figure 2.1 Simulating the middle mouse button effect

1. Create a new movie, set its size to 400pxx300px (in pixels) with the background color of #cccccc, through the property panel.

2. Create a new diagram Open component "TXT", enter its edit state, the default layer renamed to "text", input text in the workspace, you can enter any input, will not affect the effect. Create a new layer "background", create a background for "text", use the Rectangle tool, and set its fill color (in this case: 99CCCC), the effect is as shown in Figure 2.2:

Figure 2.2 Making "TXT" components

3. Create a new movie clip "text to scroll", drag the "TXT" component from the library and drop it into the workspace, select Frame 125th in the Timeline window (if you want to scroll faster, you can build fewer frames) insert a keyframe, move the "txt" component vertically up a distance, and select frame 1th. Right-click to create a motion tween, and enter the following Actionscrip script in the frame:

Stop ();

The purpose is to effectively control the scrolling of text

4. Create a New button symbol "Drag on", the button component is very simple to make, just in the "bounce" frame to draw a rectangle without fill color, "click" to draw a ratio of "bounce", the frame rectangle to a larger rectangle as shown in Figures 2.3 and 2.4:

Figure 2.3 Rectangle 1

Figure 2.4 Rectangle 2

5. Create a new movie clip "Drag1", in the workspace, draw a mouse-like button-click Effect as shown in Figure 2.5, and add "stop" in frame 1th (). To control the playback of the movie clip.

Figure 2.5 middle mouse button

6. Create a new movie clip "Up DN Graphics", Draw the "mouse" pattern shown in Figure 2.6 in the workspace, and insert a keyframe at frame 2nd of the timeline. Add script to 1th and 2nd keyframes "Stop" (). To control the playback of the movie.

Figure 2.6 Drawing the mouse

7. Create a new movie clip "Drag2" with its final timeline window as shown in Figure 2.7:

Figure 2.7 "Drag2" Timeline window

Its detailed production process is as follows:

Select the Black/arrow layer, insert a keyframe at frame 2nd, insert a "Up DN Graphics" component from the library panel into the workspace, and take its instance name "Up" for subsequent program control.

Select the script layer to add the following code for each frame:

Frame 1th:

Stop ();

Control whether movie clips are played or not

Frame 2nd:

CenterY = GetProperty ("/load", _y);

Arrowy = GetProperty ("/drag", _y);

if (number (centery) telltarget ("/txt") {

NextFrame ();

}

Telltarget ("ud") {

gotoAndStop (2);

}

}

CenterY = GetProperty ("/load", _y);

Arrowy = GetProperty ("/drag", _y);

if (number (centery) >number (arrowy)) {

Telltarget ("/txt") {

Prevframe ();

}

Telltarget ("ud") {

gotoAndStop (1);

}

}

Frame 3rd:

gotoAndPlay (2);

Go back to frame to make the movie loop

8. Return to the main scene and rename the default layer to: "TXT, drag the" text to scroll "from the library panel to create an instance and name it" TXT ", a new mask layer" Text/mask ", a rectangle in the worker, and a black fill. As shown in the control text, the effect is shown in Figure 2.8:

Figure 2.8 Creating a matte effect

9. Create a new "button" layer and drag the made button symbol "drag on" to the workspace at Frame 1th. and adjust its position and insert a key frame at frame 2nd, create a new "LOAD/MC", drag the Made movie clip "Drag1" at frame 1th, and drop it into the workspace. Create

Instance "Load", adding the following ActionScript script for that Keyframe:

Fscommand ("Allowscale", "false");

"Allowscale" specifies false, the player is set to always draw the movie at its original size and never scale. Specify true to force the movie to zoom to 100% of the player.

Stop ();

Controlling playback of a movie

10. Create a new layer of "DRAG/MC", drag and drop the made movie clip "Drag2" into the workspace, and take the instance named "Drag".

11. So the whole mouse button simulation effect on the production, save the work, press the "Ctrl Enter" preview the final effect.

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.