Spark effects: why is procedural code preferred over triggers?

后端 未结 2 439
悲哀的现实
悲哀的现实 2020-12-22 03:23

In Flex 3, MX effects could be triggered like this:



相关标签:
2条回答
  • 2020-12-22 03:47

    Effect triggers are not officially supported in spark in the current release. You can track the progress of this feature here: http://bugs.adobe.com/jira/browse/SDK-19743

    0 讨论(0)
  • 2020-12-22 03:52

    I'll add that the Flex 4 button still has effect triggers documented in the ASDocs, including a mouseDownEffect. Are you sure they don't work?

    That said, behind the scenes, in the component's code, effect triggers work the same way as your second sample. Some code somewhere to get the effect, if it exists, and manually deal with the effect's playback.

    Since Spark has a half baked component set, it is possibly such things were not implemented yet. It is also possible that the effect is not being passed to your button skin class which, I suspect, should probably be dealing with such visual changes.

    Perhaps you should provide us with some runnable samples?

    0 讨论(0)
提交回复
热议问题