How do i do that?

  • maario
  • Novice
  • Novice
  • User avatar
  • Joined: Nov 09, 2006
  • Posts: 17
  • Status: Offline

Post July 9th, 2007, 2:40 am

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 "...new Tween(mc1, "_y", ......);" it works perfectly.

Thanks... :?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 9th, 2007, 2:40 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post July 10th, 2007, 12:36 am

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. }
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 55 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.