Hi, this is my first post to this forum
I’m trying to dynamically pass different movieclip names as strings to a function in order to tween them but im stuck with making flash understand that the mc names im passing are actual movieclips in the library.
public function receivedFromJavaScript(mc:String):void {
var tMC:Class = getDefinitionByName(mc) as Class;
var newMc:MovieClip = new tMC() as MovieClip;
Tweener.addTween(newMc, {alpha:1, time:0.2, transition:"linear"});
}
So when I pass “MyMC” to the function abobve i recieve following error:
“ReferenceError: Error #1065: Variable MyMC is not defined.”
Could anyone please point me in the right direction with this one?
/I