Resizing a box using tween class

Hey guys,

I need to make a white box change size using actionscript when a button is clicked. The code I’ve got at the moment is:

on (release) {
import mx.transitions.easing.*;
import mx.transitions.Tween;
var tw:Tween = new Tween(yourmc, “_width”, mx.transitions.easing.Strong.easeOut, start(number value), finish(number value), time(in frames), false);
var tw2:Tween = new Tween(yourmc, “_height”, mx.transitions.easing.Strong.easeOut, start(number value), finish(number value), time(in frames), false); }

Doesn’t work, but it should. The movie clip that needs to change size is named as a variable as well as exporting for actionscript.

Basically I need the box to change size from what ever size it is at that moment (captured using a variable I think) and then tweening to a size defined by the button.

So i need help in working out:

  1. How to capture the size as a variable (or if there is a simpler way please let me know!)
  2. why the code above doesn’t work!

Cheers in advance

Sam