Accessing textField after applying FlashEff 2.0 button effect on it

Posted by vjrabanelly 
Accessing textField after applying FlashEff 2.0 button effect on it
December 08, 2009 04:53PM
Hi!

I'm trying to use the button effect from FlashEff 2.0 Premium version, but as soon as the button is added to the scene and the effect applied to it, it looks like the TextField, on which I apply the effect, is removed from the scene, so I can't access the text of the TextField to modify it!

All what I did is :
- Add an instance of TextField to the scene, give it an instance name (textBouton0) and configure it (dynamic text field type, render text as html, anti-alias for animation, embedded fonts).
- Add a FlashEff2 effect on this TextField from the components panel and choose a ScaleForward preset ("Snapp to objects" is activated)
- Add some code in the timeline to try to see what's happening :
trace("Scene loaded : "+this.numChildren+" children");
for(var j:int=0;j<this.numChildren;j++) {
	trace("child "+j+": "+this.getChildAt(j).name+" / "+this.getChildAt(j));
}

When exporting, the output screen shows this :
Scene loaded : 1 children
child 0: effetBouton1 / [object FlashEff2]


So, as you can see, my text field disappeared! And as I'm using this effect in a website, with a lot of different buttons, of which I want to change the text, it's a big problem!

I'd like to know if it's possible to avoid the text field to disappear and if not, how can I modify the text dynamically?

Thanks a lot!

Valentin
Re: Accessing textField after applying FlashEff 2.0 button effect on it
December 10, 2009 01:29PM
vjrabanelly,

the flasheff2 target is placed into the falsheff2 container during the animation that's why you can not see the textField anymore. Please note that in order to access the target you will have to use the FlasHEff's 2 target property like in the sample bellow .

trace (flasheff2InstanceName.target)

I hope this helps.
Sorry, you do not have permission to post/reply in this forum.