Archive for category Tree
Back to one of my favorite topics – UI Component customization. Flash’s Tree Component provides a Windows Explorer-like hierarchical menu for displaying data in a “folder” structure.
The structure it displays uses 2 separate icons, a “folder” icon for folder nodes, and a “disclosure” arrow for opening and closing the folders.
To see an example of this, place a tree component on the stage and give it an instance name of “myTree.” Then, use the following loops for some dummy data in the tree:
I’m not sure the exact reason for this, but the component seems to want to open and close folders based on clicking the “disclosure” arrow, not the folder icon.
So, what if you wanted one icon only? For this example, I’ll use the +/- metaphor that the Windows registry and some other apps use. first, create your “plus” and “minus” movie clips, and give them linkage IDs of “plus” and “minus”, respectively.
setStyle to apply these to the tree:
This turns the disclosure arrows into plus an minus signs, but the cliché folders are still there:
The solution is to create a blank movieclip and set it as the folder icon. To do this, create a new MovieClip symbol and give it a linkage ID of “blankicon.” Then, add the following to assign the empty icon:
And there you have it…
- Step 1: copy a bunch of interesting comments on Reddit. Step 2: put them on your own website surrounded by ads. Step 3: profit! - 4 months ago
- #TheWalkingDead the coffin is upside down! - 6 months ago
- #TheWalkingDead they couldn't be bothered with prepositions and modifiers. Of course you couldn't trust them. - 6 months ago
- I would have been really disappointed if that scene didn't end with a dude getting diced by an industrial fan - 7 months ago
- Fight scene. The human shit mine must be defended at all costs - 7 months ago