Trying to learn how to make custom classes. Just want to have two functions from the class. One to fade a mc(circle_mc) out and another to fade it back in again. I can get the class to trace to the fla file but can’t get the movieclip to tween at all. Any help on this would be greatly appreciated.
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
import mx.transitions.easing.Strong;
==================class file====================
class BallClass extends MovieClip {
private var _mcFade:MovieClip;
private var _tweener:Tween;
public function get mcFader() {
trace(“getting…”)
return _mcFade;
}
public function set mcFader(mcFade:MovieClip) {
trace(“setting…”)
_mcFade = mcFade;
}
public function fadeOut(mcFade:MovieClip) {
this._alpha = 0;
trace(“fadeout”);
}
public function fadeIn() {
this._xscale = 500;
trace(“fadein”);
}
}
==================fla file====================
var ballTest:BallClass = new BallClass();
trace(ballTest.mcFader);
ballTest.mcFader = circle_mc;
trace(ballTest.mcFader);
circle_mc.onRollOver = function () {
ballTest.fadeOut(circle_mc);
}
circle_mc.onRollOut = function () {
ballTest.fadeIn(circle_mc);
}