I'm trying to write a custom fadeTo(component, x, y):void
method, which takes an arbitrary Flex Component as an argument and moves it to a given location, but smoothly.
The problem I'm running into is the following.
I want to send the component itself as argument, like this: (using Button as an example only)
fadeTo(myButton, 200, 500);
(this should move myButton
smoothly from its current position to the position indicated as parameter)
However, I don't really know what type an arbitrary Flex Component is. How should I handle that?
What I would like is some advice as to how to proceed.
Thank you