Thank you for your comments Julien and Helen.

I'll try it out (it always takes me some time,
because I do Flash on evenings only,
when the kid shuts up ;-)

The invisible layer to prevent button-flipping
makes sense too, I'll add it.

Also I think there is a 3rd method -
to use a variable bound to the textfield...

Regards
Alex

On 9/28/06, Julien Vignali <[EMAIL PROTECTED]> wrote:
One solution is to
nest the TextField in a MovieClip, and use that clip in your button
movieclip instead of the TextField.
So you would use the path : MyButton -> label_mc -> label_txt

class MyButton extends MovieClip {
   private var label_mc:MovieClip;

   public function setText(str:String):Void {
    label_mc.label_txt.text = str;
   }
}

Another solution would be to simulate the _up, _over and _down effects
with code and only 1 frame in your button clip:

class MyButton extends MovieClip {
   private var label_txt:TextField;

   public function setText(str:String):Void {
     label_txt.text = str;
   }

   public function onRollOver():Void {
   }

   public function onRollOut():Void {
   }

   public funtion onPress():Void {
     this._x += 10;
     this._y += 10;
   }

   public function onReleaseOutside():Void {
   }

   public function onRelease():Void {
     this._x -= 10;
     this._y -= 10;
   }

}


--
http://preferans.de
_______________________________________________
[email protected]
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

Reply via email to