Hello :)

With VEGAS my openSource framework you can use my vegas.logging package :

Page project : http://vegas.riaforge.org/
Example : in the souces in the AS2/trunk/bin/test/vegas/logging package

1 - use a log library to create channels to debug you application with muli
external targets (trace, SOS console, Firebug, FlashInspector etc..)

You can enabled or disabled you logs when you want :)

My log model is based on the AS3 mx.logging framework in Flex2 SDK (
polymorphism but not the same implementation in the class, i use bubbling
events to propagate the logs)

2 - use the class asgard.system.Application to determinates if you are in a
web application, standalone or flash ide application etc...
http://svn.riaforge.org/vegas/AS2/trunk/src/asgard/system/Application.as

ASGard in an extension of VEGAS :)

example :

import asgard.system.Application ;


if ( Application.isFlashIDE() )
{
    // initialize log model
}
else
{
  // do nothing !
}

EKA+ :)

2007/1/26, John Mark Hawley <[EMAIL PROTECTED]>:

You can also set up your code along these lines:

var inTestMovie:Boolean = false;
trace( inTestMovie = true );

if (inTestMovie)
{
    // do wacky test movie stuff
}
else
{
    // do normal stuff
}

Then you can just turn off trace statements when you want to see the
'normal' behavior, and leave them on when you want your 'test movie'
behavior. You're probably turning off trace statements on your deliverables
anyway.

If you do a done of stuff like this, though, it might be best to use a
preprocessor on your source and have it dump out two different code branches
for you. (I don't have any recommendations on AS preprocessors; I had to
throw one together in Perl at work myself.)

-John Mark Hawley


>
> From: "Chuck Hoffman" <[EMAIL PROTECTED]>
> Date: 2007/01/26 Fri AM 08:59:59 CST
> To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
> Subject: RE: [Flashcoders] how to tell if you're running in the ide
>
> I've occasionally used the trick of checking whether this._url begins
> with "file:"  Doesn't exactly tell you if you're running in the IDE, but
> does tell you whether it's running locally on your machine or in a
> browser, from a web server.
>
>
>        CHUCK HOFFMAN
> PROGRAMMER
> T8DESIGN.COM | P 319.266.7574 - x150 | 877.T8IDEAS | F 888.290.4675
>
>
> This e-mail, including attachments, is covered by the Electronic
> Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential, and
> may be legally privileged. If you are not the intended recipient, you
> are hereby notified that any retention, dissemination, distribution, or
> copying of this communication is strictly prohibited. Please reply to
> the sender that you have received the message in error, and then please
> delete it. Thank you.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Josh
> Santangelo
> Sent: Thursday, January 25, 2007 8:41 PM
> To: Flashcoders mailing list
> Subject: [Flashcoders] how to tell if you're running in the ide
>
> Is there a way for a SWF to know if it's running in the "test movie"
> environment vs the browser or standalone players? I often have a need
> to compile in different settings in test-movie than I do for
> deployment, and have to manually remember to take them out before
> shipping a build. Or is there a more elegant way to handle that sort
> of thing?
>
> -josh
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to