First off, Kirupa has proven to be extremely useful. I’m familiar with OOP in PHP, so the jump to Flash was painless thanks to the tutorials here. Brilliant stuff!
I’m stuck on one thing though, and it’s a totally n00b question.
I’m spawning objects that have classes attached to them. That is I’ve defined a symbol called “Tree” and a class called “TreeClass”, linked them up and let the tree find it’s own random location. No problems there.
There’s an instance inside the Tree symbol that I’d like to access via the TreeClass class howevere, and I can’t for the life of me work out the syntax to reference it.
The trees are spawned as:
_root.tree1 (with the tree1 part being the incrementally assigned instance name)
So ideally the path to the component I want to access is _root.tree1.treebit - of which I want to adjust the tint and alpha.
None of the following work inside TreeClass:
First question: What should I be doing here?
Second question: How do I reference a path where a component of the path is contained in a variable? If I have _root.tree1 where tree1 increments, what’s the syntax, ie. during a for() loop?
Thanks in advance guys, Kirupa looks like a real oasis in the desert of Flash info.