A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Pathing question?

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    4

    Pathing question?

    maybe this isn't a newbie question, but maybe it is...

    I'm trying to do something like this:

    myobj = new myObject();
    myobj.subobject = new mySubObject();

    why doesn't that work as I expect it to?

    Thanks in advance!

  2. #2
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    Hard to say. What doesn't happen that you expect to happen. What is "myObject" and "mySubObject"? AS 2.0 Classes or a AS 1.0 "Class" (A function)?

    /Mirandir

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Posts
    4
    they're AS 1.0 "class"es (functions). I didn't know about AS 2.0 classes until now.

    basically, the subobject doesn't get created...here's a more concrete example:

    intro.image = new MyImage (...);
    intro.image.shadow = new myDropShadow (...);

    so intro.image points to the stuff created by MyImage, but then the intro.image.shadow object never gets created (if I go into the debugger, it's not there). I suspect the problem has to do with if I say getProperty (intro.image, _target) it comes back as "undefined" rather than what I'm expecting, "/intro/image". Am I created an object with the name "intro.image", and not really creating "image" as a subobject of "intro"?

    EDIT: not sure if the shadow object doesn't get created, but at least it's not being created as a subobject of intro.image.

    would using AS 2.0 classes make this a lot easier?

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