clearInterval inside function

[AS]stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
//oq
function Goq(num1) {
clearInterval(myInterval1);
var anim1:Tween = new Tween(oq, “_y”, Back.easeOut, oq._y, num1, 2, true);
var anim2:Tween = new Tween(oq, “_alpha”, Back.easeOut, 0, 100, 2, true);
}
//oq
function Gobrasao(num1) {
clearInterval(myInterval2);
var anim1:Tween = new Tween(obrasao, “_y”, Back.easeOut, obrasao._y, num1, 2, true);
var anim2:Tween = new Tween(obrasao, “_alpha”, Back.easeOut, 0, 100, 2, true);
}
//onome
function Gonome(num1) {
clearInterval(myInterval3);
var anim1:Tween = new Tween(onome, “_y”, Back.easeOut, onome._y, num1, 2, true);
var anim2:Tween = new Tween(onome, “_alpha”, Back.easeOut, 0, 100, 2, true);
}
//
// var myInterval = setInterval(functionName, interval, num1)
var myInterval1 = setInterval(Goq, 8000, -100);
var myInterval2 = setInterval(Gobrasao, 9000, 100);
var myInterval3 = setInterval(Gonome, 10000, 180);[/AS]

have this code nd it’s working ok
thing is when i put
var myInterval2 = setInterval(Gobrasao, 9000, 100);
inside first function like so…
[AS]
//oq
function Goq(num1) {
clearInterval(myInterval1);
var anim1:Tween = new Tween(oq, “_y”, Back.easeOut, oq._y, num1, 2, true);
var anim2:Tween = new Tween(oq, “_alpha”, Back.easeOut, 0, 100, 2, true);
var myInterval2 = setInterval(Gobrasao, 1000, 100);
}
[/AS]

the clearInterval(myInterval2); won’t work no more…

any clues?!
hope I explain myself clearly :slight_smile: