as3 custom functions
Posted
by pixeltocode
on Stack Overflow
See other posts from Stack Overflow
or by pixeltocode
Published on 2010-05-28T09:23:48Z
Indexed on
2010/05/28
10:11 UTC
Read the original article
Hit count: 136
why is it that every time moveSlide() is called, the values traced are the same?
var slideWidth:Number = 680;
var newPos:Number;
function moveSlide () {
var currentPos:Number = image_holder.x;
newPos = currentPos + slideWidth;
trace('currentPos ' + currentPos);
trace('newPos ' + newPos);
}
moveSlide();
moveSlide();
moveSlide();
(image_holder is a movieclip with the images)
© Stack Overflow or respective owner