visibility false, XML, as3
- by pixelGreaser
Hey,
I'm using external XML to set flash vars. Alpha works, but not Visibility.
How do I get my swf to respond to visibility? Thanks.
XML
<?xml version="1.0" encoding="utf-8"?>
<SESSION>
<BGv TITLE="visible true">false</BGv>
<BGa TITLE="alpha 50 percent">.5</BGa>
</SESSION>
SWF
//LISTEN AND LOAD XML
var myXML:*;
var myLoad:URLLoader = new URLLoader();
myLoad.load(new URLRequest("visible.xml"));
myLoad.addEventListener(Event.COMPLETE, parseXML);
//PARSE XML
function parseXML(e:Event):void {
myXML = new XML(e.target.data);
//MY TEST
var bgA:*;
var bgV:*;
trace(myXML.BGa.text());
trace(myXML.BGv.text());
bgA =(myXML.BGa.text());
bgV =(myXML.BGv.text());
//MY OBJECT
bg.alpha = bgA;//This works great
bg.visible = bgV;//This has no effect
}
OUTPUT
.5
false