好的。所以我有一个函数,我通过它传递了一个名为 objectName的参数。不,我不知道该怎么做或解释它。就这样吧。
public function moveObject(ObjectName):void{
//objectName now holds "myName" which is an object also
//i would now like my variable called myNamePosition to equal 10
//so it would need to grab the value of objectName which is myName:Object.
//turn it into a string of some kind - myName:string
//add "Position" to the end of it so its myNamePosition
// make it equal to 10
trace(myNamePosition);
}
传递的函数参数会改变,所以我实际上不能使用“myName”。而是“objectName”。
谢谢