To begin, I have been able to draw rudimentary shapes on the main timeline by
importing this class on the main timeline (first frame) and plugging in the
requisite parameters
Once the shapes are drawn I cannot seem to manipulate them on the main
timeline to make them move about and alpha up and down. Is there some way to do
this? [The first frame code is posted below the class code]. When I have
created movieclips without actionscript, then attached AS 2 classes to them I
can manipulate them. If there is not a way that I can manipulate AS-generated
clips on the main timeline, is this doable from within the class?
Thanks for your time.
//*** CLASS CODE ***
class BoxyRounded extends MovieClip {
var iN:String;
var d:Number;
var lst:Number;
var lsc:String;
var lsa:Number;
var x0:Number;
var y0:Number;
var fcc:String;
var fca:Number;
var w:Number;
var h:Number;
var cs:Number;
public function BoxyRounded(iN, d, lst, lsc, lsa, x0, y0, fcc, fca, w, h, cs)
{
_root.createEmptyMovieClip(iN, d);
with (iN) {
lineStyle(lst, lsc, lsa);
moveTo(x0+cs, y0);
beginFill(fcc, fca);
lineTo(x0+w-cs, y0);
curveTo(x0+w, y0, x0+w, y0+cs);
lineTo(x0+w, y0+h-cs);
curveTo(x0+w, y0+h, x0+w-cs, y0+h);
lineTo(x0+cs, y0+h);
curveTo(x0, y0+h, x0, y0+h-cs);
lineTo(x0, y0+cs);
curveTo(x0, y0, x0+cs, y0);
endFill();
}
}
}
//*** FIRST FRAME CODE ***
stop();
import BoxyRounded;
//function BoxyRounded(iN, d, lst, lsc, lsa, x0, y0, fcc, fca, w, h, cs)
var box3:BoxyRounded = new BoxyRounded("box3", _root.getNextHighestDepth()+1,
0, "0x00ff00", 0, 0, 0, "0x800000", 100, 50, 250, 100);