How do i do that?

  • maario
  • Novice
  • Novice
  • User avatar
  • Posts: 17

Post 3+ Months Ago

Hi everyone,

I'm trying make a tween motion with the tween class for a handful of movie clips i want to animate.

function tweenAnim(var mcNumber:Number) {
var myTween = new Tween(mc[mcNumber], "_y", ......);

Flash donĀ“t recognize my movie clip (mc[mcNumber]).
There's any other way to do this? I've already tried many different syntaxes like "mc"+mcNumber, or other stupid things like that, but none of them works. All i need is a reference to a movie clip instance....
I've mc1, mc2, mc3, mc4...and so, till mc10, and for all of them i want the same animation.
If i put one instance name directly, like " Tween(mc1, "_y", ......);" it works perfectly.

Thanks... :?
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1252
  • Loc: Ro

Post 3+ Months Ago

Code: [ Select ]
function tweenAnim(var mcNumber:Number) {

var crtMC = this["mc"+mcNumber];
var myTween = new Tween(crtMC, "_y", ......);

  1. function tweenAnim(var mcNumber:Number) {
  2. var crtMC = this["mc"+mcNumber];
  3. var myTween = new Tween(crtMC, "_y", ......);
  4. }

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.