A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: [F8] Referencing a static class inside another class's instance

  1. #1
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387

    [F8] Referencing a static class inside another class's instance

    I've got a movie loading into a framework.

    This framework has 1 instance of the class main called main.

    Inside this class, another class is used, but it is used directly, not as an instance. E.g.:
    code:

    import com.StaticClass;
    class main {
    private function UseStaticClass():void {
    StaticClass.init();
    }
    }



    From my movie, I can reference the main instance as _root.main. Can I reference StaticClass at all if there's no explicit instance created or it's not assigned to a public variable?

    I can't modify main to include getter/setter methods, that's why I ask.

    Thanks.
    Last edited by PAlexC; 12-19-2007 at 11:30 AM.
    "What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
    ...and now I have tape all over my face.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center