I’m trying to write the addition of Flash Components from within a Class file. So that class can control the component from within the object that I’m creating.
Here is my code
import mx.controls.Button;
class example extends MovieClip{
/**
* This is here to allow for the use of the createClasObject within
* the class; otherwise the compiler errors stating that their is no
* such method.
*/
private var createClassObject:Function;
function example() {
createClassObject(Button, "clientID", incDepth(), {_x:20, _y:50, _width:80, _height:22.0, tabIndex:incTabNumber()});
}
Then I’m using this code to implement the object.
var chat:ChatModule = new ChatModule();
Yes I have already added the Component to the desktop and deleted it. The code is ported directly from an already working Flash MX 2004 application. So it worked there. What do I need to do to make it work with Flash 8.
Thanks,
Ryan :thumb2:
Happy New Year!!