Cagri Kasap
Cagri Kasap

Reputation: 1

ActionScript 2.0 to ActionScript 3.0 transition

I have a button 'buttonGo' and five different balls with different names (ballA, ballB, ballC, ballD and ballE). I have an ActionScript 2.0 code like the one below. Can anyone help me write a proper ActionScript 3.0 code?

`import mx.transitions.Tween;
import mx.transitions.easing.*;

tweenBall(ballA, Bounce.easeOut);

function tweenMC(targetMC,easeType) {
  var begin = 20;
  var end = 380;
  var time = 12;
  myTween = new mx.transitions.Tween(targetMC, "_x", easeType,
                                 begin, end, time, true);
}

buttonGo.onRelease = function() {
  tweenMC(ballA, Bounce.easeOut);
  tweenMC(ballB, Regular.easeOut);
  tweenMC(ballC, Strong.easeOut);
  tweenMC(ballD, Elastic.easeOut);
  tweenMC(ballE, Back.easeOut);
}`

I have an ActionScript 2.0 code and need it to be re-coded for ActionScript 3.0.

Upvotes: 0

Views: 16

Answers (0)

Related Questions