So I have a function that looks at a MovieClip called char that has its own class and changes its x and y values based on its proximity to another MovieClip. I had this function so that it always ran with char as the MovieClip and it worked fine, but now I want to be able to have other MovieClips that don't have their own class (I could make one for them if that would make solving the problem easier) able to be used by the function as well. Since the char isn't of the MovieClip class, is there a way that I could declare an argument within the function that could be of either the char or MovieClip class? Would it be something like this?:
function changeXY(item:(char, MovieClip)){
//Do stuff
}
Any help would be greatly appreciated