RE: [Flashcoders] Detecting if authoring mode (Flash 8 AS2)

2009-04-02 Thread Paul Steven
Nice one Ian - that looks even better than the other suggestion by Glen:)

Cheers

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
Sent: 02 April 2009 08:40
To: Flash Coders List
Subject: Re: [Flashcoders] Detecting if authoring mode (Flash 8 AS2)

Hi Paul,

   Take a look at System.capabilities.playerType.


   System.capabilities.playerType=="External" means you're running in the
IDE.

   System.capabilities.playerType=="Plugin" means you're running in a
browser.


HTH,
Ian


On Thu, Apr 2, 2009 at 8:19 AM, Paul Steven 
wrote:
> Is there a property or function to detect if a Flash movie is being tested
> in authoring mode or live on the web?
>
> Basically I have added a random variable to my xml file when loading it to
> prevent caching.
>
> The following works in both authoring and when live
>
> myXML.load("xml/homeFlashContent.xml");
>
> Whereas the following including the cache busting code doesn't work when
> tested within Flash IDE.
>
> my_Date = new Date();
>
> myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> I would therefore like to have an if statement something like
>
> If (boolAuthoringMode == true) {
>
>        myXML.load("xml/homeFlashContent.xml");
>
> } else {
>
>        myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> }
>
>
> If there are any better solutions please let me know.
>
> Thanks
>
> Paul
>
> ___
> 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


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


RE: [Flashcoders] Detecting if authoring mode (Flash 8 AS2)

2009-04-02 Thread Paul Steven
Thanks Glen - that seems to be just what I was after.

Cheers

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: 02 April 2009 09:15
To: Flash Coders List
Subject: Re: [Flashcoders] Detecting if authoring mode (Flash 8 AS2)

Hi,

I have used the "_root.url" variable before to detect whether it is 
an "http" or a "file" based one and done caching based on that.

Glen

Paul Steven wrote:
> Is there a property or function to detect if a Flash movie is being tested
> in authoring mode or live on the web?
>
> Basically I have added a random variable to my xml file when loading it to
> prevent caching.
>
> The following works in both authoring and when live
>
> myXML.load("xml/homeFlashContent.xml");
>
> Whereas the following including the cache busting code doesn't work when
> tested within Flash IDE.
>
> my_Date = new Date();
>
> myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> I would therefore like to have an if statement something like
>
> If (boolAuthoringMode == true) {
>
>   myXML.load("xml/homeFlashContent.xml");
>
> } else {
>
>   myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> }
>
>
> If there are any better solutions please let me know.
>
> Thanks
>
> Paul
>
> ___
> 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

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


Re: [Flashcoders] Detecting if authoring mode (Flash 8 AS2)

2009-04-02 Thread Glen Pike

Hi,

   I have used the "_root.url" variable before to detect whether it is 
an "http" or a "file" based one and done caching based on that.


   Glen

Paul Steven wrote:

Is there a property or function to detect if a Flash movie is being tested
in authoring mode or live on the web?

Basically I have added a random variable to my xml file when loading it to
prevent caching.

The following works in both authoring and when live

myXML.load("xml/homeFlashContent.xml");

Whereas the following including the cache busting code doesn't work when
tested within Flash IDE.

my_Date = new Date();

myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());

I would therefore like to have an if statement something like

If (boolAuthoringMode == true) {

myXML.load("xml/homeFlashContent.xml");

} else {

myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());

}


If there are any better solutions please let me know.

Thanks

Paul

___
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] Detecting if authoring mode (Flash 8 AS2)

2009-04-02 Thread Ian Thomas
Hi Paul,

   Take a look at System.capabilities.playerType.


   System.capabilities.playerType=="External" means you're running in the IDE.

   System.capabilities.playerType=="Plugin" means you're running in a browser.


HTH,
Ian


On Thu, Apr 2, 2009 at 8:19 AM, Paul Steven  wrote:
> Is there a property or function to detect if a Flash movie is being tested
> in authoring mode or live on the web?
>
> Basically I have added a random variable to my xml file when loading it to
> prevent caching.
>
> The following works in both authoring and when live
>
> myXML.load("xml/homeFlashContent.xml");
>
> Whereas the following including the cache busting code doesn't work when
> tested within Flash IDE.
>
> my_Date = new Date();
>
> myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> I would therefore like to have an if statement something like
>
> If (boolAuthoringMode == true) {
>
>        myXML.load("xml/homeFlashContent.xml");
>
> } else {
>
>        myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> }
>
>
> If there are any better solutions please let me know.
>
> Thanks
>
> Paul
>
> ___
> 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] Detecting if authoring mode (Flash 8 AS2)

2009-04-02 Thread Karl DeSaulniers

Try
+my_Date.getUTCSeconds().toString()

Sent from losPhone

On Apr 2, 2009, at 2:19 AM, "Paul Steven"   
wrote:


Is there a property or function to detect if a Flash movie is being  
tested

in authoring mode or live on the web?

Basically I have added a random variable to my xml file when loading  
it to

prevent caching.

The following works in both authoring and when live

myXML.load("xml/homeFlashContent.xml");

Whereas the following including the cache busting code doesn't work  
when

tested within Flash IDE.

my_Date = new Date();

myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());

I would therefore like to have an if statement something like

If (boolAuthoringMode == true) {

   myXML.load("xml/homeFlashContent.xml");

} else {

   myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());

}


If there are any better solutions please let me know.

Thanks

Paul

___
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