Package | com.greensock.plugins |
Class | public class ScrambleTextPlugin |
Inheritance | ScrambleTextPlugin TweenPlugin Object |
You can simply pass a string of text directly as the scrambleText
and it'll use the defaults
for revealing it, or you can customize the settings by using a generic object with any of the following properties:
"upperCase"
, "lowerCase"
, "upperAndLowerCase"
,
or a custom string of characters, like "XO"
or "TMOWACB"
, or "jompaWB!^"
, etc.
(Default: "upperCase"
)tweenLength
to false
.
(Default: true
)revealDelay
to define the time you'd like to elapse before the reveal begins. For example,
if the tween's duration is 3 seconds but you'd like the scrambled text to remain entirely visible for
first 1 second of the tween, you'd set revealDelay
to 1
. (Default: 0
)1
but you could slow things down by using 0.2
for example (or any number). (Default: 1
)" "
(space). (Default: ""
)ScrambleTextPlugin is a Club GreenSock membership benefit. You must have a valid membership to use this class without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
USAGE:
import com.greensock.TweenLite; import com.greensock.plugins.TweenPlugin; import com.greensock.plugins.ScrambleTextPlugin; TweenPlugin.activate([ScrambleTextPlugin]); //activation is permanent in the SWF, so this line only needs to be run once. //use the defaults TweenLite.to(yourTextField, 1, {scrambleText:"THIS IS NEW TEXT"}); //or customize things: TweenLite.to(yourTextField, 1, {scrambleText:{text:"THIS IS NEW TEXT", chars:"XO", revealDelay:0.5, speed:0.3}});
Copyright 2008-2013, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.