sorry about my previous example ;)
can't your receive "1" and "0" instead of true/false ?
this works:
var my_boolean_string:String = "1";
var my_boolean:Boolean = Boolean(Number(my_boolean_string));
if(my_boolean == true) {
trace("cool");
} else {
trace("nope");
}
Cedric
Try:
just downcast your variable using 'Boolean()' to a new variable which
IS a boolean...
var my_boolean_string:String = "true";
var my_boolean:Boolean = Boolean(my_boolean_string);
if(my_boolean == true) {
trace("cool");
} else {
trace("nope");
}
hth,
Cedric
hi.
i'm receiving Fl
both methods work nicely.
thank you.
On 10/28/05, Ian Thomas <[EMAIL PROTECTED]> wrote:
> What's wrong with the following?
>
> var my_bool:Boolean=(flashvar_bool=="true");
>
> Ian
>
> On 10/28/05, Steve Mathews <[EMAIL PROTECTED]> wrote:
> >
> > Try:
> > var my_bool:Boolean = flashvar_bool=="fals
How about doing something like:
var myNewBool:Boolean = (yourFlashVar == "true");
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
Matt Ganz wrote:
hi.
i'm receiving FlashVars in my object and embed code and the values
What's wrong with the following?
var my_bool:Boolean=(flashvar_bool=="true");
Ian
On 10/28/05, Steve Mathews <[EMAIL PROTECTED]> wrote:
>
> Try:
> var my_bool:Boolean = flashvar_bool=="false"?false:true;
>
> The basic problem is creating a Boolean with any string makes it true.
> So creating it
Try:
var my_bool:Boolean = flashvar_bool=="false"?false:true;
The basic problem is creating a Boolean with any string makes it true.
So creating it with the string "false" still makes it true.
On 10/28/05, Matt Ganz <[EMAIL PROTECTED]> wrote:
> hi.
>
> i'm receiving FlashVars in my object and emb
6 matches
Mail list logo