Sorry if this quesiton has been posted, but I don’t think I am using the right terms to search. I am trying to learn how classes can interact with each other and I came across a problem I can’t solve.
On my stage I have a MovieClip called “myMovieClip”.
Toplevel.as:
package edu.mydomain{
import flash.display.Sprite;
public class TopLevel extends Sprite {
public function TopLevel() {
var temp:SecondClass = new SecondClass;
}
}
}
SecondClass.as:
package edu.mydomain{
import flash.display.*;
class SecondClass extends MovieClip{
public function SecondClass(){
root.myMovieClip.x = 0;
}
}
}
How do I access the [COLOR=black][FONT=Verdana]properties [/FONT][/COLOR]of myMovieClip. root.* gives me an error.
Another question; If one class creates the object dynamically in actionscript, can I have a different class edit the [COLOR=black][FONT=Verdana]properties [/FONT][/COLOR]of that class?
Thanks in advance.