A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Class Access Problem

  1. #1
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324

    Class Access Problem

    I have a Main class in the fla's directory

    I have a Waters folder which contains WaterHandler and Water1

    The Main class imports Waters.WaterHandler

    WaterHandler when asked, needs to make a new Water1.

    This is where it messes up. For some reason WaterHandler doesn't create the Water1 that is in the Waters directory - it creates a fake one which means when I try and access Water1's methods it says they arent there.

    Weirdly enough, if I put WaterHandler and Water1 in the fla's directory everything works fine. But I want all of my files to be nicely organized.

    Also, if I use:
    var test = new Waters.Water1();

    it works as expected. But why should I have to do that?

    What am I doing wrong? Why cant I simply use 'new Water1()' from WaterHandler successfully seeming as they are in the same directory?

    Thnx in advance!
    Last edited by Cortana; 07-02-2007 at 12:00 PM.

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    You should be able to use new Water1() - may need to provide more info

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