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
My understanding is that classes are only imported once and have a
single instance in the player - so if .swf A loads in .swf B, and both
use Class X, then if you change class X and re-publish only .swf A, you
will see the change in both .swf and .swf B. I could be wrong, but that
is my
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
Guessing that if you run your skin-swf, the classes won't work
properly in there until you re-compile. Because main.swf is loaded
first by the player, these classes will be declared in there and not
overwritten when loaded in (guess that's a security feature).
Glen
Andrew Sinning wrote:
If your source and linked file are importing the same AS2 class, the
first one imported gets put into the global class tables. Flash sees
that the class from the imported link is within the same namespace and
considers it already in existence. This is not so unexpected behaviour.
If you are
Jordan, Mark et all advised:
If you are going to have your class used throughout various linked
swfs, then keep it in your main movie and exclude the class from the
links swfs when compiling (using an exclude xml file).
Thanks! This is really helpful. It seems so stupid of me to program
the
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
__ Information from ESET NOD32 Antivirus, version of virus signature
database 4087 (20090519) __
The message was checked
Hi Andrew
You have one of two approaches you can take when working with exclude files.
If you want your skin swf to be the owner of the skin classes *and* provided
that you will be loading the skin.swf into your main movie *prior* to
attempting to access any of the skin classes, then you
Know the feeling! We have about 20 files using the same class files. It
makes more sense for us to keep them in a central core file and simply
compile one file.
The skin swf will reference the classes from your main file as if they
were compiled into the swf. The only noticeable change should
Currently I only have one skin, but we plan to build more skins, at
which time we'll probably start to over-ride some members of various
classes to suit individual skins. If I do this by extending a
base-class, will I be able to keep a base class in the main-swf, exclude
it from the skin-swf,
Yes.
That would be one of the use cases for the exclude feature.
Sincerely
Mark R. Jonkman
- Original Message -
From: Andrew Sinning and...@learningware.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, May 19, 2009 11:41:09 AM GMT -05:00 US/Canada
11 matches
Mail list logo