all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

Perpetual loop for one armed bandit


Re: Perpetual loop for one armed bandit JPI
6/9/2004 4:40:33 PM
flash actionscript:
Perpetual loop for one armed bandit Mark
6/9/2004 5:38:17 PM
I need to build a "one-armed-bandit" for a user.

I'm going to build an animated strip, bit like http://www.gsk.com/index.htm,
where the spinning wheel slows down to rest at the desired icon, e.g. the
lemon.

How do I build the strip so I can keep on spinning it through several
rotations, since I don't want to build a movieclip of massive height with a
repeat pattern of the icons.

If you know what I mean and have some clues/pointers they'd be appreciated.

Regards

Re: Perpetual loop for one armed bandit Mark
6/9/2004 5:50:16 PM
Thanks

That helps a fair bit but I've then got to start slowing down 2 clips at the
same rate when I bring the wheel to a halt. I'll slow the first clip by

(distance between its current location and its target location) / by a
number, like 10.

But will it be the same equation for the duplicate clip?

Re: Perpetual loop for one armed bandit privatenews.microsoft.com
6/9/2004 5:50:39 PM
something like this :)

stop();
q = 0;
animItvl = setInterval(reel, 1000);
function reel() {
s = 100;
q++;
//play animation code here set speed at s
trace(" wait called= "+q);
//if (q == 2) {
//play animation code here set speed at s/1.5
//if (q == 5) {
//play animation code here set speed at s/2
if (q == 10) {
//line up nearest image and send result to variable
clearInterval(animItvl);
stop();
}
}
// }
// }


AddThis Social Bookmark Button