You can select any component in the layers panel and put an effect on it as a result of an interaction. I have attached a simple example you can take a look at. Let us know if this has helped.
Catalyst Automation Test Developer
I think I ve the same problem. Here is my case:
I ve a panel (with a few states, which are the screens of my application) and a menu (with buttons) at the root level. I want to add an interaction to every button of my menu, in order to navigate through the different screens of the panel.
But I can't because the states of the panel arent displayed in the "Custom Interactions" Catalyst's popup: indeed, I can only see the states of the application and the ones of the menu.
Any idea to do this ?
I've come up against the same wall. It would be really nice to be able to access any state of any component from anywhere in my application. I would guess this is a restriction for a reason. Can anyone explain why this is, so we can better understand?
Hi, the Choose State menu in the Interactions panel gives access to
a. the states of the main application
b. the states of the component you're currently working in (e.g. Custom Component1)
c. the states of any custom components that are children of the current component
As you've discovered, there are other possibilities that are not available on this menu. We decided to limit the possibilities in order to keep the menu to a reasonable size and complexity. Like everything else in Catalyst, this feature can evolve and become richer in the future.
I can suggest 3 approaches to doing what you need:
1. make the buttons be siblings of the component whose state they want to change, rather than 'nephews'. you can do this by restructuring your Catalyst project a little bit
2. in Flash Builder, you can edit the actionscript code that handles button clicks, to point to the correct object. The code you write in Builder woudl look something like:
protected function Button_click(): void
currentState = 'xxxx'
which combines snippets from the automatically-created code from cases (a) and (c) above.
3. in a larger, more code-heavy application, you might want to look into the kind of design patterns found in Cairngorm or other flex frameworks, where the 'menu' component would throw some kind of event or command request, and then some central agent interprets the request and changes the state of the appropriate component. This 3rd approach is more scalable and maintainable than approach #2, but requires more programming.
Hope this helps...
At first I didnt fully understand how the "Action Sequence" works but now i see its power thx to your lil example.
I solved my problem by doing all the interactions and animations by using Action Sequence, with only 1 page, and buttons appearing and dissappearing from stage.
I might post it when i am done.
PS: a great time saver would be if one would be able to copy and paste motions between states and actions sequences...
I choose the first option ("make the buttons be siblings of the component whose state they want to change") and it s working.
In fact, first, I tried not to do so because I was sad about creating a layout which doesn't fit to the developpers. But I realized that whatever I did, the developpers d change the layout anyway, depending on the frontend architecture they ll choose.
This is a good demo, kpkp. I am trying to build a visual configurator in FC as well and not having much luck.
I am new to the world of Flash/Flex and have no scripting background. I can't open the colorchange2 sample file in FC. Am I missing anything obvious?