First do a section of the arrow rotation animation, as far as possible to set the frame more, for example, my set has 192 frames. The frame rate is increased by one fold, similar to playing one frame at every other frame, and so on. So I wrote a function:
function playratectr (Movie:movieclip, Rate:number) {
Movie: A movie to control the speed of playback; rate: Frame rate Multiples
(Rate = = undefined)? Rate=1:null;
(movie = = undefined)? Movie=this:null;
Set the default movie and rate values
var cframe = Movie._currentframe;
var nframe = cframe+rate;
Movie.gotoandplay (Nframe);
}
Suppose the arrow's movie name is: Logo_part_1 (part of the logo I'm going to do)
Write:
Logo_part_1.onenterframe = function () {
_root.playratectr (this,3);
}; Then, the arrow animation will play at the original three times times the frame rate. (3lian material)
in order for the mouse position to be associated with a multiple of the playback speed, the following functions are also available: function dtorate (Movie:movieclip, Rate_max:number, tran:number) {
//movie: Movie Name: Rate_max: Maximum controllable speed multiple: Tran: Distance
//units converted to multiples
(movie = = undefined)? movie=this:null
(Rate_max = = undefined)? Rate_max=3:null;
(tran = = undefined)? tran=50:null;
var dx = movie._xmouse;
var dy = movie._ymouse;
var dr = Math.min (Rate_max, Math.floor (math.sqrt (Math.pow (DX, 2) +math.pow (DY, 2))/tran);
//Get the mouse distance from the movie, which is a converted
return (rate_max-dr+1);
} Overwrite the original Onenterframe function: Logo_part_1.onenterframe = function () {
var rate = _root. Dtorate (this,15,35);
//trace (rate);
_root.playratectr (this, rate);
};