Okay, I learning here and have made a lot of progress (mostly thanks to other posters).
My question now is this. I have accomplished getting the mc to expand and contract as I want it but now I want to figure out how to get it to expand
one direction rather than both ways equally. In other words, rather than it expanding 3 pixels to the right and left, I want it to expand 6 pixels to
the right etc.
I have tried adding this in their respective functions but it does weird things:
________onRollOver___________
|
if (this._y < 206) { |
this._y = this._y + 3; |
} |
|
_____________________________|
_______onRollOut_____________
|
if (this._y > 200) { |
this._y = this._y - 3; |
} |
_____________________________|
Here is my code w/out the above.
_____________________________________________________________
button1._alpha = 30;
button1.onRollOver = function() {
this.onEnterFrame = function(){
if (this._width < 206) {
this._width = this._width + 3;
}
if (this._height < 36) {
this._height = this._height + 3;
}
if (this._alpha < 100) {
this._alpha = this._alpha + 35;
}
else {
this._width = 206;
delete this.onEnterFrame;
}
}
}
button1.onRollOut = function() {
this.onEnterFrame = function() {
if (this._width > 200) {
this._width = this._width - 3;
}
if (this._height > 30) {
this._height = this._height - 3;
}
if (this._alpha > 30) {
this._alpha = this._alpha - 35;
}
else {
this._width = 200;
delete this.onEnterFrame;
}
}