I’m trying to use a Flash file (this one–> [url=]http://www.simplethoughts.com/Reflection.fla) for a current project. Unfortunately the file and it’s actionscript is pretty old and as a result won’t work in newer flash players.
There’s not a lot of scripting in it and the functionality seems pretty basic. Can the code be easily updated? Or is it a matter of completely recoding everything?
There are only three frames (within the main mc):
Frame 1:
tracer = 1;
tracerx = 0;
speed = 1.15;
direction = 1;
while (Number(i)<33) {
set(i add ":x", getProperty(i, _x));
i = Number(i)+1;
}
Frame 2:
if (tracer eq 1) {
x1 = getProperty("tracer", _x);
} else {
x2 = getProperty("tracer", _x);
tracer = 1;
}
tracerx = x1-x2;
// ===first loop store all past coordinates of the slices
//
i = 1;
while (Number(i)<33) {
set(i add ":flexa", eval(i add ":flexb"));
i = Number(i)+1;
}
//
// ===setting of flex the variable that simulate a cyclic movement
//
flex = Number(Number(flex)+Number((speed*direction)))+Number(random(3));
if (Number(flex)<Number(-5)) {
direction = 1;
}
if (Number(flex)>5) {
direction = -1;
}
//
// ===the second loop uses the new value of flex and the previous stored datas
// ===the result is applied to the position of the slices
//
2:flexb = Number(flex)+Number(tracerx);
j = 3;
while (Number(j)<33) {
set(j add ":flexb", eval(j-1 add ":flexa"));
setProperty(j, _x, eval(j add ":x")+Eval(j add ":flexb"));
j = Number(j)+1;
}
x1 = x2;
Frame 3:
tracer = 0;
gotoAndPlay(2);
Can anyone offer any suggestions? I’m not a great scripter (I get by) and can’t figure out how I would recode this.
Thanks!