RE: [Flashcoders] Exclude classes

2008-06-18 Thread Sunil Jolly
Hi Steven,

I've joined this conversation half-way through so sorry if this has
already been said:

If you're wanted to exclude some classes because you want to load them
at runtime, then you can create an SWC with the classes in them and put
that in your classpath in the Flash IDE. Classes in the SWC will be used
for compile time checking but will not be included.

If you are compiling using the Flex Compiler then you can use the
external-library-path option to use SWCs in the same way.

Sunil

-Original Message-
From: Steven Sacks [mailto:[EMAIL PROTECTED] 
Sent: 17 June 2008 18:51
To: Flash Coders List
Subject: Re: [Flashcoders] Exclude classes

In AS3, there is no exclude.xml.  Whether this was an oversight or, for 
some reason, not possible, you cannot do this in AS3.  You can, however,

use the Bridge pattern.

http://www.stevensacks.net/2008/01/23/update-gaia-bridge-pattern-api/

In a nutshell, you:

1. Make an Interface for the class you want to share between swfs (the 
implementation), but only want to be compiled in one.

2. Make a class to Bridge the gap that contains a static getter that 
returns the Interface, but really returns the Implementation.  You could

also just make it a public static var if you really want.  I used an 
internal namespace because I don't want developers overwriting the 
implementation.

3. Set the Implementation in your primary swf to make it available to 
all the other swfs.

4. Import the Bridge class in your other swfs and now you can access the

implementation.

Here is a trivial example that would work.

package
{
import IClass;

public class Bridge
{
public static var api:IClass;
}
}

///
import Bridge;

Bridge.api.yourMethod();

///

AFAIK, this is easiest way to overcome the lack of exclude.xml in AS3.  
There are other ways, but they are complicated and difficult.

HTH,
Steven


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Exclude classes

2008-06-17 Thread Sidney de Koning

Is this what your after?

http://www.bit-101.com/blog/?p=941
http://www.martijndevisser.com/blog/2004/enable-disable-_excludexml-files/

Also try this: 
http://www.google.com/search?source=ighl=enrlz==q=excluding+classes+as3btnG=Google+Search

Sid

On Jun 17, 2008, at 1:01 PM, Viktor Hesselbom wrote:


Hi,

Does anyone know if there's a way to exclude certain built-in  
classes?


E.g. if I'm not going to be using the BlurFilter class is there  
anyway for it not to be compiled with the .swf-file?


I'm using Flash CS3+AS3 and the reason for this is that I want to  
keep the filesize as low as possible for a contest. Every byte is  
important.


Thanks,
/ Viktor H
___
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


Re: [Flashcoders] Exclude classes

2008-06-17 Thread Ian Thomas
If you aren't using a class, and don't reference it anywhere in your
code, it won't be compiled in.

Most 'built-in' classes (i.e. classes beginning with flash.*) are
actually implemented within the Flash Player itself, so won't be
compiled into your .swf anyway. I'd imagine that's true of BlurFilter.

See a previous thread today about how to see exactly what is being
compiled into your .swf file.

Ian

On Tue, Jun 17, 2008 at 12:01 PM, Viktor Hesselbom
[EMAIL PROTECTED] wrote:
 Hi,

 Does anyone know if there's a way to exclude certain built-in classes?

 E.g. if I'm not going to be using the BlurFilter class is there anyway for
 it not to be compiled with the .swf-file?

 I'm using Flash CS3+AS3 and the reason for this is that I want to keep the
 filesize as low as possible for a contest. Every byte is important.

 Thanks,
 / Viktor H
 ___
 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


Re: [Flashcoders] Exclude classes

2008-06-17 Thread allandt bik-elliott (thefieldcomic.com)
could you get rid of the main classpath and use a subset of the classes in a
separate classpath

would take time to sift through them all if it's possible



On Tue, Jun 17, 2008 at 12:01 PM, Viktor Hesselbom 
[EMAIL PROTECTED] wrote:

 Hi,

 Does anyone know if there's a way to exclude certain built-in classes?

 E.g. if I'm not going to be using the BlurFilter class is there anyway for
 it not to be compiled with the .swf-file?

 I'm using Flash CS3+AS3 and the reason for this is that I want to keep the
 filesize as low as possible for a contest. Every byte is important.

 Thanks,
 / Viktor H
 ___
 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


Re: [Flashcoders] Exclude classes

2008-06-17 Thread Steven Sacks
In AS3, there is no exclude.xml.  Whether this was an oversight or, for 
some reason, not possible, you cannot do this in AS3.  You can, however, 
use the Bridge pattern.


http://www.stevensacks.net/2008/01/23/update-gaia-bridge-pattern-api/

In a nutshell, you:

1. Make an Interface for the class you want to share between swfs (the 
implementation), but only want to be compiled in one.


2. Make a class to Bridge the gap that contains a static getter that 
returns the Interface, but really returns the Implementation.  You could 
also just make it a public static var if you really want.  I used an 
internal namespace because I don't want developers overwriting the 
implementation.


3. Set the Implementation in your primary swf to make it available to 
all the other swfs.


4. Import the Bridge class in your other swfs and now you can access the 
implementation.


Here is a trivial example that would work.

package
{
   import IClass;

   public class Bridge
   {
   public static var api:IClass;
   }
}

///
import Bridge;

Bridge.api.yourMethod();

///

AFAIK, this is easiest way to overcome the lack of exclude.xml in AS3.  
There are other ways, but they are complicated and difficult.


HTH,
Steven
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders