dunno what’s wrong in here… its suposed to call the function inItems() with different parammeter value…
menu1
menu2
menu3
…
:hangover:
[AS]function inItems(who) {
var anim1:Tween = new Tween(who, “_alpha”, Strong.easeOut, 0, 100, 2, true);
}
var intervalId:Number;
var count:Number = 1;
var maxCount:Number = 6;
var duration:Number = 500;
function executeCallback():Void {
inItems([“menu”+count]);
trace(“menu”+count);
if (count>=maxCount) {
clearInterval(intervalId);
}
count++;
}
intervalId = setInterval(this, “executeCallback”, duration);[/AS]
hey, pensamente,
You just discovered one of the many benefits of typing your variables…
[“menu”+count] is an Array instance containing a single member which is a String instance. Neither an array nor a string can be animated with the Tween class - you need a MovieClip… You can do that using array access (which is what I think you were going for)… Try something like this:
[AS]import mx.transitions.Tween;
import mx.transitions.easing.*;
//
// type your “who” argument, so if you try to pass anything but a movieclip, Flash will throw a type mismatch error
function inItems(who:MovieClip):Void {
var anim1:Tween = new Tween(who, “_alpha”, Strong.easeOut, 0, 100, 2, true);
}
// create a reference to the _root level…
var myRoot:MovieClip = this;
var intervalId:Number;
var count:Number = 2;
var maxCount:Number = 4;
var duration:Number = 500;
function executeCallback():Void {
// use array access to target the movie clips on the root with your custom root reference
inItems(myRoot[“menu”+count]);
if (count++>=maxCount) {
clearInterval(intervalId);
}
}
intervalId = setInterval(this, “executeCallback”, duration);[/AS]
i think i understood the logic, but to be honest it’s quite new to me to “type my variables”… i used just to
myvar = x
or
_global.myvar = x
never read nothing about this known benefits
but i start using some cause i saw scripts write this way
thx for the class 
(heheh…i know, some english classes would be great!)