Hi Andrew 

If you reference a class in your main movie then that class will be 
automatically compiled into your main movie. A single reference to the class is 
enough to include it. There are ways to prevent that from occurring. In AS2 I 
believe you could create an exclude XML file that lists all the classes that 
you want to specifically exclude from compiling into your swf. If your list of 
classes is constantly changing and evolving (new classes added, old classes 
removed) then exclude XML files were a pain to maintain. If on the other hand 
all your doing is adding new methods to a class and your list of classes is 
fairly "static" then exclude XML files would work. There are specific rules, 
the name has to be the same name as your FLA file followed by something like 
_exclude.xml. The rules are listed somewhere in the help files or search on the 
web for it. The structure of the file is also fairly specific. 

Back in the day I resorted to writing a small app that would parse through a 
directory and write the appropriate exclude for all classes within a package or 
the like. Unfortunately haven't used AS2 in a couple of years now so I can't 
give you any more hints then that. 

Sincerely 
Mark R. Jonkman 


----- Original Message ----- 
From: "Andrew Sinning" <and...@learningware.com> 
To: "Flash Coders" <flashcoders@chattyfig.figleaf.com> 
Sent: Tuesday, May 19, 2009 9:27:31 AM GMT -05:00 US/Canada Eastern 
Subject: [Flashcoders] unexpected result with linked classes in embedded swfs 

I'm working in AS2. 

The skin-swf that I am embedding into my main movie contains symbols 
that are linked to classes. 

Objects in my main movie make calls to some of the classes that are 
defined in the skin. In order to get nice code-hinting in Flash Develop 
and compile-checking, I import these same classes into some of the 
objects in my main-movie. 

If I make change to the AS file for a symbol defined in the skin-swf, 
but ONLY recompile the main-movie and not the skin-swf, I wouldn't 
expect the changes made to take effect, but they do. Does this make 
sense to anyone? 

For example: if I add a new function to a class that is linked to a 
symbol in the skin-swf, and I call that function from the main-movie. I 
would expect to have to recompile both the skin-swf and the main-movie. 
However, what I've found is that I only have to recompile the main-movie. 

It seems that if the class is imported into the main-movie, then those 
instructions override the instructions compiled into the skin-swf. 
_______________________________________________ 
Flashcoders mailing list 
Flashcoders@chattyfig.figleaf.com 
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to