Copy link to clipboard
Copied
Hi
I have a movieclip in the library (NOT on the stage) which has linkage myBall. I am adding a balls to the time line like this:
var newBall = new lib.myBall();
newBall.x=30;
newBall.y=100;
ballField.addChild(newBall);
ballField is a mc on the timeline
This is all working fine.
I want to change the colour of the ball. I have tried several things: including this before the above code
lib.myBall.shape.graphics._fill.style = "#FF00FF";
which gives lib.myBall.shape is undefined
... and this before the addChild command
newBall.shape.graphics._fill.style = "#FF00FF";
which gives newBall.shape is undefined
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now