Spark effects: why is procedural code preferred over triggers?

旧街凉风 提交于 2019-11-29 16:19:55

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

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?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!