Creative TextFX v2 Forum


box Creative TextFX v2
With Creative TextFX v2 you can create stunning text effects in FLASH. This Flash component gives you access to more than 300 predefined text effects that are customizable from the user interface or directly with ActionScript elements - properties, methods, constructor parameters and events - thoroughly documented in the complete product manual or in the Contextual Help.

Find out more about Creative TextFX v2

Thread: Rendering Dynamic Text as HTML

title left
User Details
message
title right
Pedro Sostre

post date:
2009-08-15 23:31:52
I am using Actionscript to create the TextFX instance and I need to know how to load text with html tags and have it render as HTML.

In case you need it - below is the code I'm using:

if (this.loaderInfo.parameters.textField1) {
this.textField1.text = this.loaderInfo.parameters.textField1;
}

import xtd.textFX_v2.effects.CameraDepthEffect;
import xtd.textFX_v2.effects.NoneEffect;
import xtd.textFX_v2.presets.actions_NoneEffect;
import xtd.textFX_v2.presets.out_BlindsEffect;
import xtd.textFX_v2.TextFXMain;
var tfx:TextFXMain;
var a:CameraDepthEffect;
var b:NoneEffect;
var c:xtd.textFX_v2.effects.NoneEffect;
this.html = true;
this["textField1"].visible=false;

tfx = new TextFXMain(
this,
"CameraDepthEffect",
"NoneEffect",
"NoneEffect",
"NoneEffect",
"verticalPosition=200;fade=100;blurQuality=2;maxBlur=30;ordering=Random;delayBetweenPieces=0.1;horizontalPosition=75;duration=60;easingType=Regular.easeOut;blockType=Word;",
actions_NoneEffect.Extend_Default,
actions_NoneEffect.Extend_Default,
actions_NoneEffect.Extend_Default,
TextField(this["textField1"]).htmlText,
null,
"moveEasing=Regular.easeOut;moveDuration=50;moveFromX=200;moveFromY=200;delayTime=0;loop=false;useIn=true;useWait=true;afterInDelay=0;afterWaitDelay=0;useOut=false;useInAsOut=false;"
);

tfx.container.x=200;
tfx.container.y=150;

tfx.start();
Pedro Sostre

post date:
2009-08-16 01:35:39
I solved it - right in the beginning I had:

this.textField1.text = this.loaderInfo.parameters.textField1;

That needed to be:

this.textField1.htmlText = this.loaderInfo.parameters.textField1;
Andrei Rinciog [Extend Studio]

post date:
2009-08-17 08:21:15
Hello Pedro,

Yes, you need to add the text in the textfield using the "htmlText" property in order to render it as HTML. You could also select the TextField on the stage and check the "render as HTML" box from the properties panel.

Regards,
Andrei