Java Reference
In-Depth Information
var h=100;
var text:Text; // text node
// call this fn to apply affect to text node
public function applyEffect(effect:Integer) {
if(effect==0){
text.effect = null;
}
if(effect==1){
text.effect = Reflection{fraction:0.50};
}
if(effect==2){
text.effect = DropShadow{offsetY:4}
}
if(effect==3){
text.effect = Lighting {
light: DistantLight { azimuth: -135 }
surfaceScale: 5
}
}
}
// entry point
public function run() {
text = Text {
content: bind textContent
style: bind "fill:{textColor};"
"font-family:\"{textFont}\";"
"font-size:64pt;"
"font-weight:bold;"
"fill:linear (0%, 0%) to (0%,100%)
stops (0.0, {textColor}),
(1.0,{textColorEnd});"
}
...
}
 
Search WWH ::




Custom Search