-
1. Re: Library MovieClip linkage and class inheritance
kglad Jul 10, 2013 6:15 PM (in response to xTLS)i don't see that problem: http://www.kglad.com/Files/forums/test.zip
-
2. Re: Library MovieClip linkage and class inheritance
xTLS Jul 11, 2013 9:28 AM (in response to kglad)That's because you didn't set up the code the way I explained. You put
public function set tfF(value:String):void {
this.tf.text = value
}
into the child classes. I'm saying Flash throws a compile-time error if you put that in the base class (Page in your sample), even if the child has that TextField
-
3. Re: Library MovieClip linkage and class inheritance
kglad Jul 11, 2013 11:42 AM (in response to xTLS)oh, i see. that's a compiler screw-up.
just cast "this" in your base class as a MovieClip:
public function set labelText(value:String):void {
MovieClip(this).textLabel.text = value
}
-
4. Re: Library MovieClip linkage and class inheritance
xTLS Jul 11, 2013 12:30 PM (in response to kglad)Wow, I never would have thought of that! That did the trick. Thank you very much!
-
5. Re: Library MovieClip linkage and class inheritance
kglad Jul 11, 2013 12:40 PM (in response to xTLS)you're welcome.
that's a common compiler short-comming though that's the first time i've seen it in that guise. a more typical problem triggering an 1119 error is with:
root.variable_defined_on_root; // root will need to be cast as a MovieClip
or
this.parent.variable_defined_on_a_parent_timeline; // this.parent often needs to be cast as a MovieClip



