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){
speed = 1;
_root[myObject].onLoad = function () {
speed += _root[myObject]._x;
if (PCT6._x(speed) <= -1353.0) {
speed = -2
}
else if (PCT1._x(speed) <= -1379.0) {
speed = 0
PCT1._x = 798
}
if (PCT1._x(speed) <= -578) {
speed = -2
PCT2._x = 798
}
else if (PCT2._x(speed) <= -1402.0) {
speed = 0
}
if (PCT2._x(speed) <= -578.0) {
speed = -2
PCT3._x = 798
}
else if (PCT3._x(speed) <= -1303.0) {
speed = 0
}
if (PCT3._x(speed) <= -503.0) {
speed = -2
PCT4._x = 798
}
else if (PCT4._x(speed) == -1407.0) {
speed = 0
}
if (PCT4._x(speed) <= -607.0) {
speed = -2
PCT5._x = 798
}
else if (PCT5._x(speed) <= -1928.0) {
speed = 0
}
if (PCT5._x(speed) <= -1128.0) {
speed = -2
PCT6._x = 798
}
else if (PCT6._x(speed) <= -2153.0) {
speed = 0
};
};
}
initObject(“PCT1”);
initObject(“PCT2”);
initObject(“PCT3”);
initObject(“PCT4”);
initObject(“PCT5”);
initObject(“PCT6”);
HELP ME!!! :q:
As I stated I cutted the strip into 6 pieces, so it isn’t that long anymore, but now I have 6 pieces to deal with. And instead of having to use code individually on each piece I wanted to use it on the time line frame. The fact that there are now 6 parts to form 1 strip also creates the added problem creating code so that each part only apears at specific moment so that all 6 parts appear to be 1 single strip as they roll.
Thank you in advanced for any help you can provide!