I have tried this a dozen times a dozen ways and I never get the correct result. Hoping someone can tell me what I am missing. All i need to do is draw some squares and rectangles then fill them. I am using Flash MX. Please and Thank You. SOrry to be so long.
Here is a link to what I am getting.
and this is jpg of what I want.
and here is my code and sample of my xml doc:myXml = new XML();
myXml.onLoad = flplan;
myXml.load("plots4.xml"
;
myXml.ignoreWhite = true;
function flplan(success) {
if (success){
// trace("Good Load"
;
for( var i=0; i<this.childNodes.length; i++){
bth1 = myXml.childNodes.attributes.boothno
fil1 = myXml.childNodes.attributes.fill
x1 = myXml.childNodes.attributes.X
y1 = myXml.childNodes.attributes.Y
wid1 = myXml.childNodes.attributes.WIDTH
hgt1 = myXml.childNodes.attributes.HEIGHT
_root.createEmptyMovieClip(bth1, bth1);
linecolor = (255 << 16);
_root.lineStyle(1, linecolor, 100);
_root.moveTo(-x1, -y1);//320,95
_root.lineTo(-wid1, hgt1);//100,-100
_root.lineTo(-wid1, -hgt1);//100,100
_root.lineTo(wid1, -hgt1);//-100,100
_root.lineTo(wid1, hgt1);//-100,-100
// _root.endFill(-12, -12);
}
}
else{
trace(myXml.status) ;
}
}
stop();
************************************
XML DOC "plots4.xml"
<row width="20" height="20" x="320" y="95" fill="WHITE" boothno="243"/>
<row width="20" height="20" x="340" y="95" fill="RED" boothno="242"/>
<row width="20" height="20" x="360" y="95" fill="RED" boothno="241"/>
<row width="40" height="20" x="380" y="95" fill="WHITE" boothno="240"/>
<row width="20" height="20" x="420" y="95" fill="BLUE" boothno="239"/>
<row width="20" height="20" x="440" y="95" fill="WHITE" boothno="238"/>
<row width="20" height="20" x="500" y="95" fill="WHITE" boothno="237"/>
<row width="20" height="20" x="520" y="95" fill="WHITE" boothno="236"/>
<row width="20" height="20" x="540" y="95" fill="BLUE" boothno="235"/>
<row width="20" height="20" x="560" y="95" fill="WHITE" boothno="234"/>
<row width="40" height="60" x="600" y="115" fill="WHITE" boothno="233"/>
<row width="40" height="60" x="660" y="115" fill="WHITE" boothno="232"/>
<row width="40" height="40" x="280" y="135" fill="WHITE" boothno="231"/>
<row width="60" height="40" x="340" y="135" fill="WHITE" boothno="230"/>
<row width="20" height="20" x="420" y="135" fill="WHITE" boothno="229"/>
Here is a link to what I am getting.
and this is jpg of what I want.
and here is my code and sample of my xml doc:myXml = new XML();
myXml.onLoad = flplan;
myXml.load("plots4.xml"
myXml.ignoreWhite = true;
function flplan(success) {
if (success){
// trace("Good Load"
for( var i=0; i<this.childNodes.length; i++){
bth1 = myXml.childNodes.attributes.boothno
fil1 = myXml.childNodes.attributes.fill
x1 = myXml.childNodes.attributes.X
y1 = myXml.childNodes.attributes.Y
wid1 = myXml.childNodes.attributes.WIDTH
hgt1 = myXml.childNodes.attributes.HEIGHT
_root.createEmptyMovieClip(bth1, bth1);
linecolor = (255 << 16);
_root.lineStyle(1, linecolor, 100);
_root.moveTo(-x1, -y1);//320,95
_root.lineTo(-wid1, hgt1);//100,-100
_root.lineTo(-wid1, -hgt1);//100,100
_root.lineTo(wid1, -hgt1);//-100,100
_root.lineTo(wid1, hgt1);//-100,-100
// _root.endFill(-12, -12);
}
}
else{
trace(myXml.status) ;
}
}
stop();
************************************
XML DOC "plots4.xml"
<row width="20" height="20" x="320" y="95" fill="WHITE" boothno="243"/>
<row width="20" height="20" x="340" y="95" fill="RED" boothno="242"/>
<row width="20" height="20" x="360" y="95" fill="RED" boothno="241"/>
<row width="40" height="20" x="380" y="95" fill="WHITE" boothno="240"/>
<row width="20" height="20" x="420" y="95" fill="BLUE" boothno="239"/>
<row width="20" height="20" x="440" y="95" fill="WHITE" boothno="238"/>
<row width="20" height="20" x="500" y="95" fill="WHITE" boothno="237"/>
<row width="20" height="20" x="520" y="95" fill="WHITE" boothno="236"/>
<row width="20" height="20" x="540" y="95" fill="BLUE" boothno="235"/>
<row width="20" height="20" x="560" y="95" fill="WHITE" boothno="234"/>
<row width="40" height="60" x="600" y="115" fill="WHITE" boothno="233"/>
<row width="40" height="60" x="660" y="115" fill="WHITE" boothno="232"/>
<row width="40" height="40" x="280" y="135" fill="WHITE" boothno="231"/>
<row width="60" height="40" x="340" y="135" fill="WHITE" boothno="230"/>
<row width="20" height="20" x="420" y="135" fill="WHITE" boothno="229"/>