Creating an interactive decision tree
Hello,
I have created a vertical decision tree in Visio Pro and exported it to Illustrator and then imported the diagram into Animate. Due to the complexity of the decision tree, I would like to create an "Interactive" decision where the tree begins with a single box and is subsequently drawn depending on the rectangles clicked by the user. My strategy was
- convert all the rectangles and connectors to symbols
- assign an instance name to each symbol
- except for the topmost button, make all the other symbols invisible
- add Mouse Click Event Handlers to each button that depending on the button clicked would make the relevant symbols visible or invisible accordingly.
Due to the complexity of the diagram and the large number of resulting symbols, using instance names in the Event Handler would quickly become cumbersome. So the two ideas I had in mind:
- create an array containing the relationship between the symbols, that would indicate the relationship between instance names, and then loop though all the symbols in the event handler and look for a match for the currentTarget to make it visible
- Loop through all symbols, and check if symbol is connected to currentTarget AND is lower on the y-axis
Although, this would seem like a common question, I was not able to find much info on creating "Interactive" diagrams using Animate/Flash. Please let me know your thoughts.
Thanks!
Joe
