Hello, I'm trying to create an MC which acts as a Button and additionally has a text label on the top of it.
For that I have created 3 Frames: _up, _over, _down and a dummy onRelease() method. This works ok. I have also a TextField my_txt on the top of my MC and a method setText(str:String) to set its content. When I have my_txt in one big frame extending over _up, _over and _down everything works fine. But to create the illusion of the button being clicked, I have to insert a keyframe at the _down and move my_txt 10 pixels to the right and to the south. After I do that, the value of my_txt.text gets lost, even though the name of the instance is still my_txt. Does anybody have an idea how to workaround this (probably frequent) problem? Here is my code: http://preferans.de/lobby/ And I paste it here too for your convenience: class MyButton extends MovieClip { private var my_txt:TextField; public function setText(str:String):Void { my_txt.text = str; } public function onRelease() { trace('Override me!'); } } And in the Actions Layer at the main Timeline: my_mc.setText('Hello'); Regards Alex -- http://preferans.de _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com