11th Mar 2010

Scripted Animation

  • Is there a limit to the number of objects that can be animated at once with ActionScript? I have 5 items on the stage, they all use the same function with different parameters to control the movement, but only 3 move, the others don't.


  • Here's the primary function:


    function SimpleMovement (stepX, stepY, endX, endY, clip) {
    if (clip._x < endX) clip._x += stepX;
    if (clip._y < endY) clip._y += stepY;
    }

    Here's the actions I'm using in Flash:


    #include "Simple_Motion.as"

    title_mc.onEnterFrame = function() {
    SimpleMovement(0, 12, 0, 0, this);
    }
    subtitle_mc.onEnterFrame = function() {
    SimpleMovement(0, 12, 0, 50, this);
    }
    vcam_mc.onEnterFrame = function() {
    SimpleMovement(12, 0, 95, 0, this);
    }
    box_mc.onEnterFrame = function() {
    SimpleMovement(12, 12, 400, 45, this);
    }
    mag_mc.onEnterFrame = function() {
    SimpleMovement(0, 12, 0, -239, this);
    }


    Only the first three items in the script move.


  • no. its a glitch in your script probably. flash limits are set really high to the point if the computer doesnt lock up you can do it.

    Post up your prototype, or function or what ever you used and we can check it out.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Scripted Animation , Please add it free.

    Posted by rose under enart.88083.com |