public property van hoofd klasse ophalen via andere klasse


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. package {
  2. public class HoofdKlasse {
  3. public static var instantie:HoofdKlasse;
  4. public var pijl:String = "pijl";
  5. public function HoofdKlasse() {
  6. HoofdKlasse.instantie = this;
  7. }
  8. }
  9. }
  10.  
  11. package {
  12. public class AndereKlasse {
  13. public function AndereKlasse() {
  14. trace(HoofdKlasse.instantie.pijl);
  15. }
  16. }
  17. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.