QML ScriptAction ElementThe ScriptAction element allows scripts to be run during an animation. More... Inherits Animation This element was introduced in Qt 4.7. Properties
Detailed DescriptionScriptAction can be used to run a script at a specific point in an animation. SequentialAnimation { NumberAnimation { // ... } ScriptAction { script: doSomething(); } NumberAnimation { // ... } } When used as part of a Transition, you can also target a specific StateChangeScript to run using the scriptName property. State { name: "state1" StateChangeScript { name: "myScript" script: doStateStuff(); } // ... } // ... Transition { to: "state1" SequentialAnimation { NumberAnimation { /* ... */ } ScriptAction { scriptName: "myScript" } NumberAnimation { /* ... */ } } } See also StateChangeScript. Property DocumentationThis property holds the script to run. This property holds the the name of the StateChangeScript to run. This property is only valid when ScriptAction is used as part of a transition. If both script and scriptName are set, scriptName will be used. Note: When using scriptName in a reversible transition, the script will only be run when the transition is being run forwards.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. |