Copy link to clipboard
Copied
I have a FLA file that export to canvas, I add a linkage movieClip that call OpenScreen_mc.
i try to extend the OpenScreen_mc
i try this code:
(function (window) {
function OpenScreen() {
// this.Container_constructor();
}
var p = createjs.extend(OpenScreen, lib.OpenScreen_mc);
window.OpenScreen = createjs.promote(OpenScreen, "lib.OpenScreen_mc");
}(window));
and call to the "class" like this:
var openScreen_mc = new OpenScreen()
stage.addChild(openScreen_mc);
but i don't see the OpenScreen on the stage.
i try to call the this.Container_constructor(); but i get overFlow.
How can i extend it?
i don't know if this is what you want, but it works to do:
function OpenScreen() {
var mc = new lib.OpenScreen_mc();
mc.newProperty = whatever;
mc.newMethod = function(){
do whatever
}
return mc;
}
var os = new OpenScreen();
Copy link to clipboard
Copied
i don't know if this is what you want, but it works to do:
function OpenScreen() {
var mc = new lib.OpenScreen_mc();
mc.newProperty = whatever;
mc.newMethod = function(){
do whatever
}
return mc;
}
var os = new OpenScreen();