If it is a movie clip you want to instantiate then you have to use:
_root.attachMovie(libraryID, instanceName, depth);
The class associated with it will construct and the onLoad event will
trigger if it is being listened to.
Ciao,
Rob.
sebastian chedal wrote:
Hello Flashcoders,
Sorry to bother you with another simple AS2 questions, I'm making good
progress but I am stumped with one simple thing.
I have one class/object that I want to use to generate copies
[instances] of
another class.
The second class is an object in the library with an ID and an assosiated
*.as file [in the linkage panel].
The code is:
=========
//PostModel.as
import com.blabla.PostView;
class com.blabla.PostModel {
public function createPost (__id) {
var newPost = new PostView (__id);
}
}
=========
When I run this code, the class doesn't construct an instance...
What am I missing? If I need to call the Library Identifyer instead, how
would I do that?
I don't want to attach the PostView to the PostModel class, I just
want to
create instances of them and attach them to _root [or some other MC in
the
timeline].
Thanks!!
Seb.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com