I have the following problem, I createad a site: www.ruisoaresesteves.com
It’s a simple thing. But it does have it’s problems. Being a begginer I created a strip of photos and animated it with a motion tween. But as you probably know this creates a heavy file. I’ve been trying to convert the motion tween into actionscript in the hopes it will make it lighter! But I’ve stumbled upon a problem I can’t solve.:drool:
First I took the photostrip and cutted it into 6 parts and converted them into mc “PCT1, PCT2, PCT3, etc…”, since the single strip due to it’s high resolution and size was creating all sorts of problems because it was just too long.
My first few attempts with actionscript were written directly into each of the mc individually. but I started think about it and it would make it a lot more easy to make adjustments or changes if the actionscript was in the timeline instead of the mc. So I started writting the actionscript on the timeline frame.
I tried a bunch of diferent combinations but just can’t get it to work…
Now before you read the action script I wrote… and starting to laugh… remember that this is my first attempt at something like this:egg:. I don’t know if any of you can even make sense of what I was trying to accomplish but here it is, and in case you still don’t understand what i want to achieve you can always visit the site and get an idea.
here’s the actionscript:
function initObject(myObject){
_root[myObject].onLoad = function () {
_root[myObject]._x += speed;
if (PCT6._x <= -1353.0) {
speed = -2
}
else if (PCT1._x == -1379.0) {
speed = 0
PCT1._x = 798
}
if (PCT1._x == -578) {
speed = -2
PCT2._x = 798
}
else if (PCT2._x == -1402.0) {
speed = 0
}
if (PCT2._x == -578.0) {
speed = -2
PCT3._x = 798
}
else if (PCT3._x == -1303.0) {
speed = 0
}
if (PCT3._x == -503.0) {
speed = -2
PCT4._x = 798
}
else if (PCT4._x == -1407.0) {
speed = 0
}
if (PCT4._x == -607.0) {
speed = -2
PCT5._x = 798
}
else if (PCT5._x == -1928.0) {
speed = 0
}
if (PCT5._x == -1128.0) {
speed = -2
PCT6._x = 798
}
else if (PCT6._x == -2153.0) {
speed = 0
};
};
}
initObject(“PCT1”);
initObject(“PCT2”);
initObject(“PCT3”);
initObject(“PCT4”);
initObject(“PCT5”);
initObject(“PCT6”);
HELP ME!!! :q: