In fact I have just created a minimal test and it looks as though the
key element is that it fails to link IF AND ONLY IF the linkage id and
the AS2 class name ARE THE SAME. The minimal test case is available here:
http://www.5etdemi.com/uploads/mtasclinkageids.zip
In the IDE all three constructors are called while in FAME the class2
constructor in never called. The only difference between class1 and
class2 is that the linkageID for class1 is not the same as the class
name while it is for class2
JesterXL wrote:
Not sure if it's related, but I have to do:
import com.MyRootClass;
var depend:MyRootClass;
delete depend;
this.__proto__ = _global.com.MyRootClass.prototype;
_global.com.MyRootClass.apply(this, null);
if(this.calledOnLoad == false)
{
this.onLoad();
}
If I don't, MTASC see's no reason to import the class which I understand
because I'm never actually instantiating it. Granted, if I associate my
_root class with a MovieClip and do the linkage job, no problem so I have to
do the same thing on _root you're having to do inside of classes.
----- Original Message -----
From: "Patrick Mineault" <[EMAIL PROTECTED]>
To: "Open Source Flash Mailing List" <[email protected]>
Sent: Tuesday, July 05, 2005 8:24 PM
Subject: Re: [osflash] MTASC and AS2 linkage names
I also tried using -pack to compile the package and for the PseudoButton
class it looks like it helps. However my views still aren't registered
properly. The only apparent difference I can see between the two
situations is that for the views the linkage names match the full
package name, while it is not the case for the PseudoButton. Is this
expected behavior?
Patrick
Patrick Mineault wrote:
I'm using both MTASC and the Flash IDE on a large project and the
problem I'm running into is that we are using several components and
views that are linked to AS2 classes in the library. These
associations look like they disappear whenever I compile in MTASC.
I've run into this issue before and I've worked around it using a
static var linker = Object.registerClass call. Now the issue is that
in this project I have several movieclips (around 100 in fact) that
are linked to a single AS2 class (a class that creats button like
features but with EventDispatcher hooks and such), which means I would
need to add about 100 lines of static linker vars in the top of my
lib.CustomButton class.
Is there any kind of magic setting or something that I can include on
the main timeline to solve that issue. I'm not even sure the classes
are included in the final swf as it drops a full 8k when compiled in
MTASC compared to the IDE.
Patrick Mineault
www.5etdemi.com
www.5etdemi.com/blog
www.amfphp.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org