PDA

View Full Version : fabric over roller movement


texbala
10-02-2002, 05:43 PM
hi,

am trying to get a animation of a fabric moving over a roller surface.

It is seen from the side view, hence just a line has to be moved over the rollers. I was thinking of creating a shape tween. I was confused how to animate the fabric (seems like moving the fabric) over the roller edges??

does guide layer be helpful?

anyone with anyideas? or similar animation effect? want to get an idea of how to proceed..

advanced thnx!!

vosgien
10-02-2002, 10:28 PM
Hi,
You could try this code :

onClipEvent (load) {
speed = 11;
xPos = 800;
}
onClipEvent (enterFrame) {
targetx = xPos;
_x += (targetx-_x)/speed;
}

xPos is where you want your line to finish, so if it is moving right to left place the line mc off stage to the far right and it will move across - the higher you set your speed the slower it will move and it should go with a little bit of inertia.
Also somewhere on this site ( and you will have to do a thorough search) Jesse published a function that does the same thing but without the inertia

Hope that helps

Vosgien