• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Controls collections in Actionscript?

New Here ,
Aug 17, 2010 Aug 17, 2010

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?

Views

360

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2010 Aug 20, 2010

Copy link to clipboard

Copied

LATEST

Hi

     Try to use ArrayCollection or Dictionary

Good Luck

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines