-
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!
-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|