stop(); th = this; import mx.transitions.Tween; import mx.transitions.easing.*; point_arret = -985; tabPoints = [0, -985, -1970]; pose = 0; count = 0; function Bt(num) { if (num == count) { th["bouton"+num].gotoAndStop(5); } else { th["bouton"+num].gotoAndStop(1); } } Bt(0); Bt(1); Bt(2); function wait() { count++; if (count>2) { count = 0; } Bt(0); Bt(1); Bt(2); point = tabPoints[count]; var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 20, false); } inter = setInterval(this, "wait", 4000); bouton0.onRelease = function() { clearInterval(inter); pose = 1; count = 0; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 20, false); }; bouton1.onRelease = function() { clearInterval(inter); pose = 1; count = 1; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 20, false); }; bouton2.onRelease = function() { clearInterval(inter); pose = 1; count = 2; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 20, false); };
bouton0.onRelease = function() { clearInterval(inter); pose = 1; count = 0; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 20, false); inter = setInterval(th, "wait", 4000); };
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question// Mon site : http://:www.com-u-nic.fr // Mon tel si besoin : 03 86 33 30 72 //Pierre Pucel alias Pi'ère2 stop(); th = this; import mx.transitions.Tween; import mx.transitions.easing.*; point_arret = -985; tabPoints = [0, -985, -1970]; pose = 0; count = 0; function Bt(num) { if (num == count) { th["bouton"+num].gotoAndStop(5); } else { th["bouton"+num].gotoAndStop(1); } } Bt(0); Bt(1); Bt(2); function wait() { count++; if (count>2) { count = 0; } Bt(0); Bt(1); Bt(2); point = tabPoints[count]; var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 40, false); } inter = setInterval(this, "wait", 4000); bouton0.onRelease = function() { clearInterval(inter); pose = 1; count = 0; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 40, false); inter = setInterval(th, "wait", 4000); }; bouton1.onRelease = function() { clearInterval(inter); pose = 1; count = 1; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 40, false); inter = setInterval(th, "wait", 4000); }; bouton2.onRelease = function() { clearInterval(inter); pose = 1; count = 2; point = tabPoints[count]; Bt(0); Bt(1); Bt(2); var t:Tween = new Tween(clip, "_x", Strong.easeOut, clip._x, point, 40, false); inter = setInterval(th, "wait", 4000); };