Hi, ok I basically have some movieclips on stage which will later just have alpha tweens etc on them.
Now, what I THINK I need to do is create a class like “CanvasObject”. Here I want to set up an instance for each object on stage. Like…
var bucket:CanvasObject = new CanvasObject("bucket", 50);
var spade:CanvasObject = new CanvasObject("spade", 30);
var parasol:CanvasObject = new CanvasObject("parasol", 80);
The two parameters being the instance name of the movieclip on stage and the new alpha it should animate to.
Ok so after they’re set up, using something like this…
package {
public class CanvasObject {
public var alphaTo:Number;
public var itemInstanceName:String;
public function CanvasObject(target, newAlpha) {
itemInstanceName = target;
alphaTo = newAlpha;
}
}
}
I want to sort of be able to “add them to a list” so that another class “AnimationController” can pick random objects and then, using the itemInstanceName variables in them, animate that particular item to it’s new defined alpha. I think I’m basically just unclear about how to share the object data between classes…
It’s MASSIVELY possible I’m not even using the right thought pattern for this in which case I’d love some explanation as to how one would go about this. It’s a pretty basic operation and I’m sure I could get it working SOME way but not the BEST way and that’s what I’m hoping you guys could help me with so I could get a better discipline for future projects.
Thanks so much if you can help!