11th Mar 2010
Scripted Animation
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.
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.# |
Posted by rose under enart.88083.com |