Skip to content

Instantly share code, notes, and snippets.

@amowu
Last active December 10, 2015 05:18
Show Gist options
  • Save amowu/4387228 to your computer and use it in GitHub Desktop.
Save amowu/4387228 to your computer and use it in GitHub Desktop.
Flex shake effect.
<s:Panel id="ui">
<!-- anything -->
</s:Panel>
</fx:Declarations>
<s:Sequence id="shake" target="{ui}" duration="30">
<s:Move xBy="20"/>
<s:Move xBy="-20"/>
<s:Move xBy="20"/>
<s:Move xBy="-20"/>
<s:Move xBy="20"/>
<s:Move xBy="-20"/>
<s:Move xBy="20"/>
<s:Move xBy="-20"/>
</s:Sequence>
</fx:Declarations>
<fx:Script>
<![CDATA[
protected function shakeFunction():void
{
shake.play();
}
]]>
</fx:Script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment