How to call a function to action without click on button

Here is an example of text effector.

I want to make the text effect load on stage right away without click on the button to trigger the text effect action.

How can I do that?

Thank you everyone that had the knowledge about scripting could help me with this.



The scripts posted below:


import effector.TextEffector;
var myCustomEffect:Object = {time:1.000, effect:“exposeline”, line:1, interval:0.300, transition:“easeinoutcubic”};
var myCustomUpdate:Object = {autoClose:true, DOWN:true};
var _textString:String = “What is Flash Professional? Adobe® Flash® Professional software is the most advanced authoring environment for creating rich, interactive content for digital, web, and mobile platforms. Create interactive websites, rich media advertisements, instructional media, engaging presentations, games, and more. Designers and developers working on both Macintosh and Windows® systems depend on Flash and the ubiquitous Adobe Flash Player software to ensure their content reaches the widest possible audience. Flash is the best :)”;
var _textUpdateString:String = “Effector is really cool class, in next version I will setup more features which will made this class much more richer. so enjoy :), next update is comming soon with more powerful features :)”;
var _globalDepth:Number = 0;
var _myText:TextField;
var _old:MovieClip;
var setTextOnStage:Function = function() {

if(_old != undefined) _old.removeMovieClip();

var myTextHolder:MovieClip = _root.attachMovie(“textContainer”, “textContainer” + _globalDepth, _globalDepth, {_x: 20, _y:20});
_old = myTextHolder;

var myText:TextField = myTextHolder.textHolder._text;

myText.text = _textString;
myText.multiline = true;
myText.autoSize = true;
myText.wordWrap = true;
_myText = myText;

TextEffector.addEffect(myText, myCustomEffect);


butt.onPress = function() {


butt2.onPress = function() {

_myText.text = _textUpdateString;

TextEffector.updateTextField(_myText, myCustomUpdate);

butt3.onRelease = function() {

getURL(“”, “_blank”);