dynamically creating the obj variable for a tween
I'm a few days into learning flash AS3 and I'm stuck. So i have movie clip that is made up of smaller clips, and I want to change the opacity of one of the sub clips. Here's my code so far
//MOUSE OVER EVENTS FOR PORTFOLIO ENTRIES
function entryOver(evtObj:MouseEvent):void
{
//evtObj.target.name is an instance###
//Desired object is portEntry2_mc generated by evtObj.currentTarget.name
trace("MOUSE OVER Target.name: "+evtObj.target.name);
trace("MOUSE OVER currentTarget.name: "+evtObj.currentTarget.name);
//redStr is the string representation of the object i want modified:
//portEntry2_mc.redEntry
var redStr:String = evtObj.currentTarget.name + ".redEntry";
trace("red String: " +redStr);
//attempt to recreate the object
var redObj:Object = {name:redStr};
trace("red Object.name: " +redObj.name);
//the first tween works, but I want to dynamically load in the obj variable
//new Tween(portEntry2_mc.redEntry, "alpha", Regular.easeOut, .8, 1, .25, true);
//Attempts to dynamically load the obj variable
//new Tween(evtObj.currentTarget.name, "alpha", Regular.easeOut, .8, 1, .25, true);
//new Tween(redObj.name, "alpha", Regular.easeOut, .8, 1, .25, true);
}
Thanks in advance for any help. I did some searching and couldn't find how to do this. Which annoyed me since it seems so ease with the trace function....
|