views:

134

answers:

2

I am debugging AS3 in Flash CS4, a variable becomes NULL but I don't know who changes it at when. Is it possible to watch this variable and when the value changes to null, it stops?

Thanks. Bin

A: 

This is a wild guess, because I've never thrown an error (on purpose) in AS3. Can you change the property to as setter and then insert:

public var function set myVar(v:*):void{
    if(v == null){
        throw new Error("Its null!")
    }
    _myVar = myVar;
}
mwilcox
A: 

Hi,

from top menu: window > debug panels > variables. That should make a huge list of variables visible.

arkoak