|
-
Code:
function Clip(){
this.createEmptyMovieClip("ChildClip",3);
trace(this.ChildClip);
}
Clip.prototype = MovieClip.prototype;
myClip = new Clip();
Why doesn't this work?
Thanks in advance,
Somar!
-
It works if the movieclip is on the stage at design time, but I don't think Macromedia would make that mandatory... =/
-
I am not quitely sure about the reason.
I think, "Class" is an object, not movieClip, so we can not do "Object.createEmptyMovieClip()"; Unless we combine this class to a movieClip by #initClip and Object.registerClass.
To create a MovieClip dynamically, we have
1.createEmptyMovieClip
2.duplicateMovieClip
3.attachMovie
It seems that, we can not dynamically create a movieClip by "new" constructor.
-
Originally posted by ericlin
It seems that, we can not dynamically create a movieClip by "new" constructor.
myMovieClip = new MovieClip(); // I don't get what you're saying...
-
I mean, we can not create a new movieClip by "new":
myMovieClip = new MovieClip();
trace(myMovieClip._x);
trace(myMovieClip._name);
myMovieClip.attachMovie("someId","clip1",2);
myMovieClip.loadMovie("someSwf");
None of those codes that a movieClip can implement will work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|