PDA

View Full Version : creating a wipe



Jaica
08-25-2005, 08:36 PM
I hope someone can help out? I have tried this effect with tweening, Then I have tried it with actionscript using this code by adding a mask so that it would movie from left to right.

move.targetx = 50; then
onClipEvent (load) {
friction = "0.45";
}
onClipEvent (enterFrame) {
speedx = difx*friction;
setProperty (this, _x, _root.move._x+speedx);
difx = int(targetx)-this._x;
}

but for some reason I cannot get this effect right like this site: 140db (http://www.140db.com/)

!) top row, click on middle picture
2) the effect I am looking for is how the brown color comes as if it s a wipe?

Can anyone help out?

Tim
08-27-2005, 02:38 AM
I hope someone can help out? I have tried this effect with tweening, Then I have tried it with actionscript using this code by adding a mask so that it would movie from left to right.
I'm not sure exactly what you're trying to accomplish here. Say what specifically you're trying to do ie move a mask movieclip across a stage with a slowdown?

move.targetx = 50; then >>lose the 'then'
onClipEvent (load) {
friction = "0.45"; >>>do not put numerical values into quotes. You are using a string literal, and flash sees this as a string "0.45" rather than the number 0.45. Also be careful of the event load. I'd simply add this property directly without using this function.
}
onClipEvent (enterFrame) {
speedx = difx*friction; >>>what is difx? it hasn't been defined yet.

setProperty (this, _x, _root.move._x+speedx);>>> don't use this method, it's deprecated old flash 4 blech stuff. should be this._x = _root.move._x+speedx

difx = int(targetx)-this._x; >>now you finally define difx. This should be first.
}

but for some reason I cannot get this effect right like this site: 140db (http://www.140db.com/)

!) top row, click on middle picture
2) the effect I am looking for is how the brown color comes as if it s a wipe?

Can anyone help out?..