Copy link to clipboard
Copied
Hello
I am creating a map of a building. I have symbols created in Flash that represent doors and need to access their play() method according to which door needs to be opened. I have a door.swc file created in Flash and imported into Flash Builder as a library. Then I have created a subclass of door (doorway) so that I can add an id property to it. Now when I receive some event, such as an incoming message, I need to iterate through the doorway controls and locate the doorway by the id property and invoke its play() method.
I do stuff like this regularly in java and C# but cannot find the following: a) a controls collection or something like it, b) a way to search through a collection of controls, c) a generic collection class that I could use to manually manage the doorway controls. If I can find how to do this, I would then need to cast the located control to a doorway type and in light of the trouble I'm having, I'm wondering if that is even possible. Is actionscript really this limited??
Is any of this even possible in an Actionscript project?
Copy link to clipboard
Copied
Hi
Try to use ArrayCollection or Dictionary
Good Luck