Custom class extending MovieClip - constructor/assignment problem
Hello,
I've got a simple class:
package somepackage
{
import flash.display.MovieClip;
public class NewMc extends MovieClip
{
public var myVar:String = "something";
}
}
And there is a question now: how can I assign a "real" MovieClip object to my created-class object?
I mean:
var realMc:MovieClip = new MovieClip();
var myMc:NewMc = realMc;
I think it should be possible, as the custom class extends the original class.
I tried myMc = realMc as MovieClip, but such conversion isn't allowed.
And one thing! I don't want to add the realMc object as the myMc child! This solution is obvious, but It's not what I want. My aim is to have a "first-level" MovieClip object just having additional parameters.
Any ideas will be appreciated ![]()