PDA

View Full Version : More help with Functions and _x positioning



wyclef
April 20th, 2004, 01:05 AM
Hello,

Could someone take a look at this fla and tell me how I can take the code in the "random" layer, and create a function, much like the startMove function at the bottom that stops the movement of the bars moving around and moves them back to their initial _x positioning. The bars that get moved around are in the "trend bars" layer. There seem to be a lot of ways to do this but since there are only going to be 6 bars, I would be open to a funciton that hard coded the initial target _x positioning in for each bar and then stopping the movement. But I need some help with this.

Thanks.

wyclef
April 20th, 2004, 11:11 AM
Specifically this function in the "Random" layer.



function loadTransition() {
for (var i = 1; i<=8; i++) {
this.trendMC["bar"+i].targx = this.trendMC["bar"+i].originalx;
}
}


Supposedly calling this function will return the bars to their original _x position because you are setting those values (origix) early on when you call the startMove function. However I can't get the loadTransition function to work.

wyclef
April 20th, 2004, 11:58 AM
???

wyclef
April 20th, 2004, 03:48 PM
???