Tuesday, June 5, 2012

[Action Script] _root and if/switch June,2012

Good day to all!

I have a code which is fairly simple, but I can't seem to crack it. The code goes like this...

trace(_root.tenantCode);
trace(_root.locationCode);

if(_root.locationCode == "GB3-L1") {
loadtenantlocation();
} else {
trace("No such Location");
}

the value for the "_root.locationCode" comes from an external text file then to an internal code then to the _root.locationCode.
The Problem is if I trace it (the _root.locationCode), it returns the value which I have assigned, but for some reasons, I couldn't utilize it for the if else statement. Likewise if I use switch statement, the same thing happens.
Any enlightenment on the subject please :-(

Thanks in advanced^^
_root and if/switch

Related Post



0 comments: