Salut à tous.

j'ai un bug bizarre en as3 (flash CS6).

je veux faire une fonction qui fait un gotoandplay sur un objet movieclip passer en argument, mais ça ne fait rien.

function UniteChangeEtat ( obj:Object)
{
obj.gotoAndPlay(1)
}

si je met obj.x=100 ça marche.
mon objet est bien un movieclip avec plusieurs frames, le gotoandplay fonctionne quand je le fait directement mais plus quand je passe par un fonction.

U_object.gotoAndPlay(1) // ca marche
UniteChangeEtat(U_object) // ca fait rien

merci de vos reponses. pour info je suis en procedural.