I have a file "simple.as" with the code:
lineStyle(1,0,100);
lineTo(100,100);
and I call it from my Flash Professional project using an action with the code on frame 1:
#include "simple.as"
and it works fine.
Now, I'm trying to make this same code run in a ActionScript 3 class, but with no success. My try was:
package
{
import flash.display.MovieClip;
public class SimpleClass extends MovieClip
{
public function SimpleClass()
{
lineStyle(1,0,100);
lineTo(100,100);
}
}
}
with the following code on frame 1 action:
addChild(new SimpleClass());
But nothing is drawn.
Any hint about how to make it work?