MC Subclasses
- Started
- Last post
- 3 Responses
- Fariska
I did some search and didn't find any possibilities to create an AS file that extends the MC class and use it on the timeline using a constructor, something like
var mything = new Thing()
Am i wrong or have i to give up and manage with attachMovie (with the class specified)?
- UndoUndo0
you can extend the movieclip class check the help file under 'extend' - im pretty sure there is a good example there
- Fariska0
Extending is ok... i would like to use a standard constructor for the extended class..
I'm going to check that helpfile, thanks :-)
- parseInteger0
of course you can extend the Movie Clip Class contruct your class like this (this is a 2.0 version)
dynamic class myClass extends MovieClip {
//Class
//constructor
function myClass() {
}
}then anywhere in the player you can call an instance of the class as you mentioned.
myThing = new myClass();
I use this contruction to for custom tweening, color, fading functions ect....hope that helps if i'm understanding you correctly.