FLASH AS3 PROGRAMMING PROBLEM SOLVING PROBLEMS ABOUT BALL MOTION

Updated on technology 2024-02-08
8 answers
  1. Anonymous users2024-02-05

    The method used on the 3rd floor is as2.

    There is a mistake on the 4th floor, and it would be nice to fix it.

    Draw a ball on the scene and name it AA MC

    var speed=10

    var jian=2

    aa_,ona)

    function ona(e:event){ eNeeds to be declared.}

    aa_if(aa_> aa._<0){

    speed=-(speed-jian)

    That's it.

  2. Anonymous users2024-02-04

    Draw a ball on the scene and name it AA MC

    var speed=10

    var jian=2

    aa_,ona)

    function ona(e){

    aa_if(aa_> aa._<0){

    speed=-(speed-jian)

  3. Anonymous users2024-02-03

    **Write? It's really persistent!

    **Set the property values of the ball, xscal and yscale.

    In addition, add the setting of speed, pay attention to the parameters and ** writing.

  4. Anonymous users2024-02-02

    It's over with a tween.

    Draw a circle on the first frame, insert a keyframe on frame 10, pull the ball to the edge, compress it a bit, insert a keyframe on frame 20 to pull the ball back to the position of the first frame, and the shape is restored. Right-click at the middle point of each two stitches to insert a motion tween. Ctrl+Enter will have an effect.

  5. Anonymous users2024-02-01

    First, the path is first known.

    1.With the dotting method, it is approximate.

    2.Then extract the coordinates of the above points and add them to the array:

    var mapdata=;

    var maparray:array = [[879,57],[832,55],[648,48],[418,49],[142,68],[66,134],50,225],[53,335],[76,458],[135,542],[300,559],546,558],[677,542],[741,491],[746,378],[734,259],679,155],[564,150],[336,159],[180,193],[158,262],154,351],[207,434],[312,484],[482,474],[591,456],635,384],[613,277],[473,234],[309,251],[289,356],]

    You can view the path using the following method:

    function initmap(arr:array) while (true);

    return t2;

    Returns the total number of steps required.

    public static function init($p_start:point, $p_ctrl:point, $p_over:

    point, $speed:number):uint else {

    return ;

    Generated points: These are the paths!!

    These dots are **, not guided!

    2. Application: omitted, because it is not in this issue].

  6. Anonymous users2024-01-31

    The Write Path algorithm is best, and it can be composed of successive key points. Set the distance that the ball moves with each step speed, then calculate the distance between the current position and the next key on each step, if the distance is greater than the speed, move in the direction of the next key, set the current position to the next key, and move the remaining distance to the next key.

  7. Anonymous users2024-01-30

    It's best if you can write the path algorithm, and if you don't, you can use continuous keys to compose the path. Set the distance that the ball moves with each step speed, then calculate the distance from the current position to the next key on each step, if the distance is greater than the speed then move in the direction of the next key, otherwise set the current position to the next key, and then move the remaining distance to the next key. When there are more key points, the better the effect.

  8. Anonymous users2024-01-29

    If it's just a curve, wouldn't it be okay to use trigonometric functions?

Related questions
5 answers2024-02-08

Is this date lunar or new? In the lunar calendar, your new calendar is April 7, which is Aries. If this date is new, then you are Pisces.

5 answers2024-02-08

Don't listen to the upstairs, hehe, that kind of tirade won't solve the problem.

38 answers2024-02-08

Like me, he's really disgusted by people who don't feel it.

8 answers2024-02-08

To love one is to bear the shortcomings and strengths of the other. Inclusive. >>>More

14 answers2024-02-08

Solution: x=-3 8

Because:|m-3|+|n-2|=0 and the absolute value of any number is greater than or equal to 0, so: |m-3|=0,|n-2|=0; >>>More