Flash code (2)

Source: Internet
Author: User
Tags bmp image stop script

30. Q: How can I optimize Flash animation to make files smaller and smoother?
A: Flash is a professional software developed by Macromedia for webpage production and animation creation. It is easy to operate and has functions.
Powerful and has become the de facto standard for interactive vector graphics and Web Animation.
However, if the size of the Flash Movie File is large and hundreds of KB, it will often keep online viewers
Waiting for patience. It is necessary to optimize Flash movies, but the premise is that we cannot damage the movies.
Playback quality.
1. Use multiple symbols ). If an element in a movie is used more than once, consider converting it.
Is the symbol. Repeated use of symbols does not significantly increase the size of a movie file, because the file only needs to store a symbolic graph once.
Data.
2. Use gradient animation whenever possible. Whenever possible, try to use "Create motion tween "(
), Instead of "frame by frame gradient" (-.
The more key frames are used, the larger the movie file.
3. Use solid lines instead of dotted lines. Limit the number of special line types, such as dashes, dotted lines, and wavy lines. By
The line diagram for solid lines is the simplest, so using solid lines will make the file smaller.
4. Use multiple vector images and less bitmap images. Vector images can be scaled at will without affecting the image quality of flash. Bitmap
Generally, an image is used only as a static element or background image. Flash is not good at processing bitmap images. Therefore, bitmap images should be avoided.
Element animation.
5. Use a simple vector image. The more complex a vector image is, the more effort the CPU can perform. Menus available
Command modify (modify)/curves (curve)/optimize (optimize) to delete unnecessary lines in a vector image
To reduce the file size.
6. The imported bitmap image file is as small as possible and compressed in JPEG mode.
7. It is best to compress audio files in MP3 mode. MP3 is a format that minimizes sound usage.
8. Limit the font and Font Style quantity. Try not to use too many different fonts. The more fonts, the more electricity
The larger the shadow file is. Use the font set in flash as much as possible.
9. do not include all font shapes. If the text field is included, consider (
In the text domain Attributes dialog box, select include only specified font outlines (excluding the specified font only ).
And do not select include all font outlines (including all font shapes ).
10. Try not to scatter the font (the menu command is modify/break apart ). After the font is dispersed, it becomes
This will increase the file size.
11. use as little as possible the transition fill color. Fill an area with a transition fill color than fill an area with a solid color
It takes about 50 bytes.
12. Try to narrow down the action area. Limit the area in which the key frame changes.
It may be in a small area.
13. Try to prevent multiple objects from generating actions at the same time. Do not associate objects with other objects with actions.
Static objects are arranged in the same layer. Action objects should be arranged in their respective dedicated layers to accelerate fl
The processing process of the ash animation.
14. Run the load movie command to relieve the burden on starting a Movie Download. If necessary, consider dividing movies
Into multiple sub-movies, and then use the load movie and unload movie commands in the main movie to call and uninstall sub-movies at any time.
Movie.
15. Use the pre-Download screen. If necessary, you can add a predownload image (preloader) at the beginning of the movie)
So that the video can be played smoothly. Large audio files must be pre-downloaded.
16. The smaller the length and width of a movie, the better. The smaller the size, the smaller the movie file. You can use the menu command modify
(Modify)/movie (movie) to adjust the length and width of the movie.
17. Make a small-sized movie and then enlarge it. To reduce files, you can consider
The size is smaller, and then the mini SWF movie is exported. Next, set the menu file/publish settings...
(Release settings ...) In the HTML tab, the film size is larger, so that the page will display the size
The quality of a large movie is intact and elegant.
When making the above changes, do not forget to test the playing quality, download status, and view movie files at any time.
Size.
31. Q: Why do I always follow a straight line when I use flash for "moving along the track"? I compared it with the tutorial. The practice is exactly the same. Why can't I?
A: This question seems to always plague beginners, but it is actually very simple. The center position of the first and second frames is not placed on the track. A simple check method: You can set the screen size to 4 00% or greater to check whether the circle in the middle of the graph is aligned with the motion track.
32 . Q: Why is it always unpleasant to rotate in flash. Is there any way to make it faster?
A: You can adjust the playback speed quickly, for example, 38 Gb/s/second. The method is as follows: Main Menu-> modify (modify)-> movies (video), and increase the rate (film speed) can be
33 . Q: What is "hit" used to create a button? When will it be used? I have not explained the usage of "hit" in many tutorials.
A: Hit specifies the exciting area of the button. The areas set in hit are not displayed during playback. If the hit area is not specified, flash usually uses your new area as the excitation area by default. For example, when using text as a button, it is best to define a rectangle as the trigger area, rather than the default text content.
34 . Q: How can I put flash in fp2000 and fp98?
A: fp98 and fp2000 have poor support for flash. Flash Animation cannot be directly inserted in the flash file. The solution is to release the SWF file Code After the file is generated, copy the <; Object> part of the HTML file. It is recommended that you use dreamweave to create a flash animated webpage, which is much more convenient.
35 . Q: How to output a FLA file to a GIF file like SWF?
A: First, choose publish Settings> Format> GIF image and set it accordingly. Then, use publish (publish) function to output GIF files. If the FLA file contains MC, The GIF file will not contain the animation in MC, but will only convert the first segment of m c to GIF.
36 . Q: Why do I have to wait a long time for the flash to be displayed after I put a completed flash with only a dozen K flash into the webpage and preview the webpage.
A: Check whether the SWF file name and path are correct. If the path is incorrect, the system will try to wait for a long time.
37 . Q: How do I set the background of flash?
A: To set the background color, press Ctrl + m to select the background (background) in the color item. To use a picture as the background, you only need to import (input) at the bottom layer) an image is ready.
38 . Q: How do I draw a circle in flash and modify the color of the circle?
A: Set the fill color (the upper left corner of the color setting) to none when the circle is drawn! Set the border color to the corresponding color.
39 . Q: How can I create a circle and rotate it around the center of the circle?
A: You can use CorelDraw or related software to import it to flash!
40 . Q: How can I change the font color of a TXT file imported externally?
A: Set the font color when setting the text box.
41 . Q: I can use the Pencil tool to draw a circle when I open flash4, but when I create a new one, I use the Pencil tool to draw a circle (the pattern is smooth), but it is not a circle or an elliptic! What's going on?
A: You can draw a circle while holding down shift!
42 . Q: The text I made is always difficult to align with the image. How can I align the target and put them in the desired position.
A: select the target, and then choose Main Menu> Windows> Inspector> object to adjust its height (H) width (W), start position (x, y), and use center ).
43 . Q: How can I adjust the playback order among multiple scenarios of Flash 4?
A: Choose "Main Menu"> "Windows"> "Inspector"> "scene" to adjust the playing sequence, change the name, and delete the scenes.
44 . Q: How can I watch Flash Animation in Linux? Is there a plug-in for Linux?
A: http://www.openswf.org/yes.
46 . Q: How can I generate an EXE file directly from the FLA file?
A: An SWF file with a title bar can generate an EXE directly through the menu. in Flash Player, open the SWF file and select File> creat projector to create a project ). If the file title bar is not displayed in full screen with the FS command, you can use the CTRL + F hotkey to generate the file. The generated execution file has a built-in player, which is more than two hundred K larger than the SWF file.
47 . Q: How can I convert the flash to screen protection?Program?
A: Use SWF browser 2.8 or screensaver. Download http://iching.topcool.net.
48 . Q: How can I borrow content from others' works. Whether the SWF file can be fully decoded into a FLA file.
A: SwF browser 2.8 can be used to unbind other SWF files and extract and save the images and sounds. So far, no software can completely convert SWF files into FLA files.
49 . Q: How to Implement 3D effects in flash.
A: In flash, 3D animations cannot be generated. You need to use other software. For example, 3D max, and then install vecta3d or javasstrate! The 4.0 (4.1) Plug-in can directly output an animation in swf format.
50 . Q: Can the animation background of Flash be transparent? How to Set it?
A: Of course. One of the HTML columns in the release settings is window mode. Select a transparent window and click OK. If Flash is referenced in HTML, you can add the following statement in front of the HTML file: "usage of transparent flash: insert <Param name = "wmode" value = "Transparent"> in the flash code to make the flash background transparent ". However, transparency can only be used in IE, and becomes invalid in NC.
51 . Q: How can I convert a normal bitmap image into a vector image?
A: Use the adobestreamline software. download the software at http://iching.topcool.net/and have a simple tutorial, or use the freehand8.
52 . Q: which format (suffix) is vector image? Which software can be used to browse these vectors?
A: *. ai *. EPS *. WMF *. CDR. The first three can be directly referenced in flash. The CDR format must be converted to the first three formats for reference. If you have installed corldraw, You can preview the CDR format in resource manager. No software in other formats can browse a large number of images as ACDSee does.
53 . Q: In SWF, how does one remove the content displayed by right-clicking?
A: Check show menu in publish settings. However, for the flash on the web page, it will always contain the flash words. If you make it an EXE file, nothing will happen.
54 . Q: How can I enable full screen playback when I double-click a SWF file?
A: Select fscommond in the action of the last response, and then select fullscreen and true on the right!
55 . Q: How do I create a music switch?
Train of Thought: put the music into MC and use tell target to control the playing and stopping of this MC.
Related Article Source File: www.flashempire.com/tutorial/tutor/t3.html Author: bianchenglang, netschool.cpc#com/homepage/tool/flas H4/advanced/advanced1_htm 56 . Q: How can I adjust the volume?
A: You cannot adjust the volume continuously with pure flash. You can only adjust the volume in segments.
In.
57 . Q: How can I add controllable background music to a file?
A: There is a tutorial on Skynet. Http://sh.cpcw.com/netschool/homepage/tool/flash4/index.htm
Author: starwind
58 . Q: How can I control Flash animation by frame splitting on a webpage?
A: There are tutorials in the morning space. Http://starwind.yeah.net by newfish
60 . Q: How can I extract music?
A: There is soundforge in the Flash zone (http://zippy.yeah.net/), recording with the method of inner recording, the effect is very good, if the volume is smaller, the dynamic -- Graphic -- expand in effect can be expanded. In addition, cooledit and goldwave are also good choices.
61 . Q: How do I save a sound file in a CD or VCD? I think the sound I saved can be exported and used in flash. How can I add data to flash?
A: Use sthvcd, vcdcutter, or other stuff to cut it down. MP3 cannot be added to flash. If it is in MP3 format, you can convert it to WAV through Winamp or other software, and then use s oundforge 4.5 for editing.
62 . Q: Is there a Sound Forge 4.5 tutorial?
Answer: http://yongong.topcool.net/music editor.
63 . Q: How can I convert MIDI to WAV?
A: The method for converting MIDI to EAV is as follows:
1. Use the soft wave table wingroove for direct conversion. However, the tone is provided by wingroov and there is no choice!
So this is the simplest and most primitive method, and the effect is average! This software is available in H ttp: // www.cc.rim.or.jp /~ Hiro
Download ki/english.
2. Use two sound cards, one for one recording. Use a soft wave table, such as yamaha100, or a hard wave that comes with the sound card.
Table. noise can be reduced after recording! This method is also available! But it would be better to combine the following methods!
3. Use soft audio source software, such as reality or gigasampler, to replace the wave table and use a dedicated audio library for conversion.
You only need a sound card to solve the problem! This method can use the tone that you think is the best, and the sound quality is almost impeccable.
The quality of W av is close to the following method!
4. If you have a lot of money, use a dedicated audio source and hard disk recorder!
64 . Q: How can I deform a text or image?
A: Ctrl + B. Just scatter the beginning and end of the action! Symbol cannot be used for shape.
65. Q: How can I create a mask with blurred edges?

A: After completing the mask effect, add a color block with blurred edges on it.
66 . Q: How can I make a snowflake like when my TV is disturbed?
A: First draw some short white lines (finer, slightly grayscale), then make several key frames, randomly place them in each frame, and play them continuously.
67 . Q: How can I hollow out text or graphs?
A: To scatter a word or image, first use the border Coating Tool to color its edge, and then select the middle part to delete it.
68 . Q: How can I send an email to someone else by clicking the button.
A: Get URL: mailto: flash8@flash8.net
69 . Q: How can I use the get URL function to open a window?
A: Enter Java: op('dongua.htm ', 550,400) in the get URL. The get URL supports Simple ja
Va statement. This method is different from selecting _ blank.
71 . Q: Will the stop script in the key frame take effect?
A: The stop statement only stops frame playback and does not stop the execution of the Action Statement on the key frame of the Stop statement.
72 . Q: Can I download the SWF file from "someone else's webpage" to my own hard disk?
Answer: Method 1: Right-click a single machine on the Flash Animation and choose Save as a target ...... OK!
Method 2: You have viewed the Flash SWF file in the buffer directory of your browser! The default directory of the system.
Yes:
Windows-> Temporary Internet Files, find the SWF file, where the number of SWF files saved and the browser settings
It depends on the specified cache space, and then copy it out.
73 . Q: What is the effect of changing a string of words or images from fuzzy to clear?
A: At the beginning, set alpha (transparency) to a smaller value. The final position is alpha = 100%, and motion is used between key variables. Note that it is symbol that can be used for motion. In addition to a lpha, the most important thing is to use different layers with the same content to stagger and blur the effect!
74 . Q: How does the typing effect (that is, the words come out one by one) convert each word into a component?
?
A:
Method 1: Create a MC for each word, then reference the first word in the first frame, every two to three bytes, press F6, copy
The key phrase is to reference the second word, and then the second word, the third character, the third character, and so on. If typed
The effect will be better. This method is suitable for scenarios with few words.
Method 2: If you just make them appear, you can add a layer to the word, and then use the background color as a rectangle to put the word
Cover. Set the rectangle to MC, give the object a name (I nstance name), and then use set Property
Statement programming enables the rectangle to jump and move. This method is suitable for scenarios with a large number of words.
75 . Q: How do I calculate sin, cos, and other functions?
Idea: Convert functions using related mathematical formulas
Related Articles or source files: www.flashempire.com/tutorial/tutor/t12.html Author: little witch dongua.163.net/flash4/fla/.fla donggua Xuan
76 . Q: How do I write the expression to obtain the remainder of a value divided by B?
A: A-B * int (A/B!
77 . Q: How can I play a part of the video multiple times in flash and then jump back to the video?
Answer: Set variable: "I" = 1
Set variable: "Time" = 5
Comment: time indicates the number of repetitions.
Comment: The frame name of the content to be repeated is repeat.
............
If (I <= Time)
Set variable: "I" = I + 1
Go to and play (Repeat)
End if
You can.
78 . Q: How do I create a mouse-Follow animation?
Answer: The idea is to use the start drag statement to let a MC move with the mouse, and then use the attributes of the MC such as X and Y coordinates to generate relevant changes. Related Articles or source files: www.flashempire.com/tutorial/tutor/t5.html Author:
Ww.flashempire.com/tutorial/tutor/t9.html Author: jimbob 202.106.124.57 /~ Eastecho/fbbs/forum7/html/00002 9.html
79 . Q: How do I use fscommand to create a clock?
Answer: netschool.cpc#com/homepage/tool/flash4/advanced/advanced18.htm Author: newfish
80 . Q: How to perform collision detection?
Answer: Train of Thought: 1. Use get property to detect the position of the motion MC;
2. For collision detection related to mouse following, use _ droptarget
Related Articles or source files:

Www.flashempire.com/tutorial/tutor/t19.html Author: flashgun
202.106.124.57 /~ Eastecho/fbbs/Forum2/html/00021 5.html
81. Q: How do I represent spaces and other special characters in the returned values or text files that need to be loaded into the animation?
A: Replace the space with "+" and write "name = xiaogangua" as "name = + xiaogangua"
There is a conversion table corresponding to special characters in the landscape space (http://iching.topcool.net.
82. Q: How can I use an executable file of .exe, for example, an executable file compiled by VC.
A: Use fscommand ("EXEC", "execution file name. Check whether the path of the execution file is correct.

83 . Q: How to disable the menu and zoom in (out) functions, and how to enable full screen when double-clicking the SWF file
: in the first example, enter the following command:
full screen-> FS command ("fullscreen", true)
disable zoom-> FS command ("allowscale", false)
Disable menu-> FS command ("showmenu", false)
84 . Q: How can I perform an action after the music is complete?
answer: http: // 202.106.124.57 /~ Eastecho/fbbs/Forum2/html/000382.html
85 . Q: How do I load an external animation (*. SWF) and control the position of the loaded animation?
answer: Related Articles or source files:

202.106.124.57 /~ Eastecho/fbbs/forum7/html/00000 9.html
202.106.124.57 /~ Eastecho/fbbs/Forum2/html/00057 2.html 202.106.124.57 /~ Eastecho/fbbs/Forum2/html/00015 9.html
86. Q: How can I determine whether a plug-in has been installed on the webpage?
Answer: http: // 202.106.124.57 /~ Eastecho/fbbs/Forum2/html/000753.html are described in detail.
87. Q: How does flash4 create a chat room?
A: CGI support is required. Such as ASP, Perl, and PHP. There are few sites dedicated to CGI and flash joint programming in China. You can visit some overseas sites.
88. Q: How to Make a message board?
A: Two parts are provided. Implemented Using ASP + flash. Www.flashempire.com/tutorial/tutor/t15.html Author: bianchenglang son www.flashempire.com/tutorial/tutor/t16.html Author: bianchenglang son

89. Q: How do I perform counters?
A: The CGI program (Asp, Perl, PHP, etc.) is used to write values to text files, and then the flash function is used to read and display numbers.
90. Q: How to Make fireworks?
A:

Http: // 202.106.124.57 /~ Eastecho/fbbs/Forum2/html/000590.html Author: Boat

91. Q: How can I change the color dynamically?
A: The idea is as follows:
1. Call frames or MC of different colors;
2. Use RGB, CMYK, or other color modes to change the tint type.
In addition, the Alpha attribute is dynamically changed for superposition.
Related Articles or source files are as follows:

202.106.124.57 /~ Eastecho/fbbs/Forum2/html/00014 2.html
203.39.170.10/HTTP/movies/zips/colour.zip by Richard James Rose 203.39.170.10/HTTP/movies/zips/cmyk.zip by Martyn van Beek
92. Q: How to Create loading?
A: Use the _ sloaded and _ totals variables.
Related Articles or source files:

Www.flashempire.com/tutorial/tutor/t4.html Author: bianchenglang son W
Ww.flashempire.com/tutorial/tutor/t10.html Author: xiaogangua
93. Q: How can I determine the progress of loading external SWF?
A: You can use the _ sloaded and _ totals variables loaded into SWF, and add the name of the loaded animation.
Word.
Related Articles or source files:

202.106.124.57 /~ Eastecho/fbbs/Forum2/html/00051 6.html
94 . Q: How can I save the input text in flash to another text file!
A: Flash cannot! It must be programmed together with other software. For example, ASP and Perl.
95 . Q: I often hear people talk about paths. What is the role of paths in flash?
A: If you have used dos, you can easily understand the flash path. Simply put, the path is the path through which variables or symbols can be found during flash programming. Similar to d OS, this method is divided into two types: relative and absolute.
Let's take a look at the following two addresses: 202.106.124.57 /~ Eastecho/fbbs/forum7/html
/00000 9.html 202.106.124.57 /~ Eastecho/fbbs/Forum2/html/00052 5.html
96 . Q: What tools and software are used for flash programming?
A: With actionclip1.4, you write the program in any text editing software, copy the program part to the clipboard, and then run actionclip to convert it, then you can set paste in F lash. This tool is very small. In the flash zone (http:/zippy.yeah.net), there is a better tool for Flash Action tool beta2 registration download. It supports all flashw commands and can generate some simple programs.
97 . Q: How can I convert a. FLA file to a. AVI file?
A: You can convert it to mov format, but you cannot convert it to Avi directly. You can convert it to gif sequence and convert it to AVI (such as premiere) through other software)
98 . Q: How can I test loading on a local machine?
A: during test movie, press Ctrl + enter again, or select the menu View> Show streaming to enable bandwidth profiler.
99 . Q: In Flash 5, how can I eliminate the Import image's sawtooth?
A: Use a BMP image or a vector image. Because of the dot matrix problem, you should first check the pixel size of the image before importing the image, and then convert it to BMP format, use the "Modify --> trace bitmap" command in flash to optimize the image!
100 . Q: How can I display one of several different SWF animations every time I refresh the page?
A: loadmovienum ("movie" + random (5) + ". SWF ")
Assume that there are 6 SWF files named respectively
Movie0.swf,movie1.swf ,...... Movie5.swf
As shown in the preceding figure, the interface may be different for every refresh.
101 . Q: How to shield the hand shape of the button? I only need the arrow!
A: You can use mouse. Hide (); and then use the startdrag command to drag an arrow-shaped MC.
102. Q: How can one Mc Call a variable set in another MC?
Enter this statement in MC: (a B is the variable name, And mcname is the entity name of MC)
A = _ root. mcname. B;
This statement makes variable A of the current Mc Call _ root. mcname variable B of the MC
103. Q: How can I open a Word document in flash?
Flash does not support the use of Word files, but the browser can directly open the .doc file, so you can use geturl to solve the problem. The path uses the absolute address http: // www.../word.doc.
104. Q: How can I call an mpeg file in flash?
Flash does not support calling MPEG files. First install a third-party software named swiffcanvas1.0. Then open the FLA file. If the directory of the mpeg file is AA and the mpeg file name is BB, then you can add the following statement:
FS command ("EXEC", "swiffexec (local: AAA \ 111. MPEG )");
Then, output the FLA file as an EXE file, open the EXE file with swiffcanvas, and set it in swiffcanvas to fulfill your requirements. The output is the. exe file.
105 . Q: How do I enter Chinese characters in the action editing window?
You can change the font of flash, that is, delete WINDOWS \ fonts \ modern. Fon. In this way, the font of the window can be edited much more.
105. Q: How does flash connect to a database?
A: You can only use background files, such as CGI scripts, Active Server Pages (ASP), or personal home page (PHP. Transfer the value to flash to perform database operations.
106. Q: Can I call Java in fscommand?
A: fscommand can call the JS function moviename_dofscommand to load the Flash animation. Moviename is the name of the Flash Animation. It is specified by the name attribute of the embed tag or the ID attribute of the object tag. If the Flash Player name is mymovie, The JS function name should be called mymovie_dofscommand.
107 . Q: How to learn about flash)
Bbs.flash8.net: 8000/cgi-bin/topic_show.cgi? Id = 14205 & H = 1 & BPG = 1 & age =-1
108 . Q: How to Achieve random color conversion of Flash backgrounds (erik168)
Bbs.flash8.net: 8000/cgi-bin/topic_show.cgi? Id = 16519 & H = 1 & BPG = 1 & age =-1
109 Q: Flash 5.0 actions overview! (Djsgh)
A: http://bbs.flash8.net: 8000/cgi-bin/topic_show.cgi? Id = 7607 & H = 1 & BPG = 1 & age =-1
 110 . Q: How to make a coherent black man? (Land reclamation)
A: http://bbs.flash8.net: 8000/cgi-bin/topic_show.cgi? Id = 35539 & H = 1 & BPG = 1 & age =-1
111 . Q: How do beginners lay a solid foundation for action? (Xiaojing)
A: http://bbs.flash8.net: 8000/cgi-bin/topic_show.cgi? Id = 15164 & H = 1 & BPG = 1 & age =-1
112 . Q: How to Achieve the image quality (Wooyun)
A: http://bbs.flash8.net: 8000/cgi-bin/topic_show.cgi? Id = 7552 & H = 1 & BPG = 1 & age =-1

113 . Q: How does flash connect to the background? [ Source code]
A: Use the sendandload () method of the loadvars () object to send and receive data.
114 . Q: How can I pause or play a sound?
A: When running the stop () command, you can use the position attribute of the sound object to obtain the playback Time of the current sound file (
In milliseconds), and then play the video at the current position using start (time, loop.
115 . Q: How do I define a two-dimensional array?
A: The following defines a 20*20 two-dimensional array with all values 0.
Sarray = [];
For (VAR I = 0; I <= 19; I ++)
Sarray [I] = [];
For (var j = 0; j <= 19; j ++ ){
Sarray [I] [J] = 0;
{}
}
116 . Q: How do I open a window for a specified attribute? [Source code] [/color]
A: First, JS defines the function in the HTML page, and then calls it using geturl () in flash.
117 . Q: How can I use the button in MC to jump to a scenario?
A: Add a tag to the cursor to jump to and use the tag to jump to: gotoandstop ("yourlable ")
118 . Q: How do I randomly set the MC color?
A: The name of the MC instance is "MC"
Mycolor = new color ("MC ")
Mycolor. setrgb (random (0 xffffff ))
119 . Q: How to Achieve double-click results?
A: Put the following code on the button:
On (Press)
Time = gettimer ()-down_time;
If (time <300 ){
Trace ("OK ");
{}
Down_time = gettimer ();
}
(Turbine)
120 . Q: How to Make Mc always follow the mouse Rotation

A: calculate the difference between the vertical and horizontal coordinates of MC and the mouse, and then use math. atan2 () to calculate the rotation angle.
M_x = _ root. _ xmouse-MC. _ x;
M_y = _ root. _ ymouse-MC. _ y;
MC. _ rotation = Pi = 180/Math. Pi * Math. atan2 (m_y, m_x );

121. Q: How to Achieve the mouse-following effect??
A: The basic code is as follows. Step A is the step size.
MC. _ x + = (_ root. _ xmouse-MC. _ x)/
MC. _ y + = (_ root. _ ymouse-MC. _ y)/
(Turbine)
122. Q: How do I create class inheritance in?
A: Create an inherited Mc class.
Myclass = ()
......
{}
Myclass. Prototype = new movieclip ();
(Turbine)
122.Q: Can I explain loadmovie in detail?
A: The question about loadmovie is the setting of attributes after loading ..
Loadmovienum (URL, level, method );
The URL is the relative or absolute URL of the SWF file you want to load. For example, "snow.swf" or "http://go8.163.com/6s
Now9/myflash/snow.swf ", we strongly recommend that you put all SWF files to be loaded under the same directory
Level specifies the level to which the loaded SWF is placed. The value range is 0 --- n.  

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.