2010-02-10 8 views
1

xml 파일을로드하고 무비 클립 등을 적절하게 표시하는 actionscript를 작성 중입니다. 그러나 나는 다른 xml 파일을로드하는 기능을 통해 디스플레이를 재설정하려는 문제가 조금 발생했습니다. 새 파일을로드했지만 디스플레이가 여전히 이전 xml을로드 한 것처럼 변경되지 않습니다.actionscript에서 xml 객체 재사용

다음은 첫 xml 객체를로드하고 스테이지에서 mcs를 변경하는 내 함수를 실행하는 첫 번째 비트 코드입니다.

function CallLineFunction1() { 
xmlFile1="test.xml" 
// set up XML object 
var my_xml1 = new XML(); 
my_xml1.ignoreWhite = true; 
my_xml1.onLoad = function(success){ 
generateRW(my_xml1); 
} 
// load xml into object 
my_xml1.load(xmlFile1); 
} 

이 작동합니다. 그러나 버튼을 클릭 할 때 새 xml 파일을로드하여 스테이지의 mcs를 다시 변경하려고합니다. 나는이 작업을 수행하려면이 코드를 사용하고 있습니다 :

내 두 번째 generateRW2 문이 실행될 때 테스트 한 동안
function CallLineFunction2() { 
xmlFile2="with_disruption_statuses.xml" 
// set up XML object 
var my_xml2 = new XML(); 
my_xml2.ignoreWhite = true; 
my_xml2.onLoad = function(success){ 
generateRW2(my_xml2); 
} 
// load xml into object 
my_xml.load(xmlFile2); 
} 

(이것은이다) 디스플레이가 이전 XML의 속성을 사용하여 동일하게 유지됩니다.

나는 삭제 명령하지만 소용,

를 사용 해봤 내가 제 2 프레임에 모든 것을 복사하고 여러 레이어와 수백이 있기 때문에 거기에서 그것을 실행할 필요가 없습니다 바라고 있어요 mcs는 xml 데이터에 따라 변경해야합니다.

도움을 주셨습니다.

+0

'generateRW'와'generateRW2'를 게시 할 수 있습니까? – Jacob

답변

0

generateRWgenerateRW2이 보이지 않으면 문제가 무엇인지 알기가 어렵습니다. 그러나 이전에로드 한 무비 클립이 스테이지에서 제거되는지 확인하고 제거하지 않으려면 클립에 대해 고유 ID를 사용하고 있는지 확인하십시오.

+0

'generateRW'와'generateRW2'가 매우 비슷하다면 둘 다'createEmptyMovieClip ("square_mc", this.getNextHighestDepth())'가 포함되어 있습니까? 스테이지에 "square_mc"라는 무비 클립이 이미 있으면 문제가 발생할 수 있습니다. 이름은 고유해야합니다. – Jacob

+0

감사합니다. Tim, 내 게시물에 오류가있었습니다. 영화를 다시로드하여 문제를 해결했습니다. 매우 간단합니다. 그러나 도움을 주셔서 감사합니다. 항상 다른 사람들의 제안을 듣는 것이 좋습니다. – RichW

0

괜찮 았지만 큰 차이가 있습니다. 이것은이 게시물에 오타, 또는 코드에서 만 generateRW (my_xml1), generateRW2 (my_xml2가) CallLineFunction2에서

function generateRW(my_xml1){ 
lines=my_xml1.firstChild.firstChild.firstChild.childNodes; 
stations=my_xml1.firstChild.firstChild.childNodes[1]; 
for(i=0;i<lines.length;i++){ 
     offsetNode=lines[i];    
     offsetDisruptions=offsetNode.childNodes[0].childNodes; 
     eval("line"+lines[i].attributes.id).infoText=""; 
     eval("line"+lines[i].attributes.id).infoCount=new Array; 
     if(offsetNode.attributes.id=="25DLR"){ 
      lineDLR="true"; 
     } 
     if(offsetNode.attributes.id=="90OVG"){ 
      lineOverground="true"; 
     } 
     if(offsetNode.attributes.status.toLowerCase()!="minor delays" && offsetNode.attributes.status.toLowerCase()!="good service"){ 
     for(k=0;k<offsetDisruptions.length;k++){ 
      if(offsetDisruptions[k].attributes.affectTimetable=="true"){ 
           if(offsetDisruptions[k].childNodes[0].childNodes.length==0){ 
            minorDelayCheck=offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue.substring(0,11); 
            minorDelayCheck=minorDelayCheck.toLowerCase(); 
            if(minorDelayCheck!="minor delay"){ 
             currentStatus++; 
             trace(' 4. Whole line down:'+lines[i].attributes.id); 
             segmentMC=eval("line"+lines[i].attributes.id); 
             infoTextFiltered=filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue); 
             if(segmentMC.infoText!=infoTextFiltered && segmentMC.infoTextOriginal!=infoTextFiltered){ 
              segmentMC.infoTextOriginal=offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue; 
              segmentMC.infoText+=filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue); 
              segmentMC.infoCount.splice(segmentMC.infoCount.length, 0, filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue).length); 
             } 
             segmentMC.wholeLineAffected=true; 
             segmentMC.lineID=lines[i].attributes.id; 
             segmentMC.onRollOver=function(){ 
              showText(this); 
             } 
             segmentMC.onRollOut=function(){ 
              hideText(); 
             } 
            } 
           } else {      
            segmentMCParent=eval("line"+lines[i].attributes.id); 
            if(segmentMCParent.infoTextOriginal!=offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue){ 
             segmentMCParent.infoText+=filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue); 
             segmentMCParent.infoCount.splice(segmentMCParent.infoCount.length, 0, filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue).length); 
            } 
            currentStatus++;      
              for(m=0;m<offsetDisruptions[k].childNodes[0].childNodes.length;m++){             
               trace(' 5. Station down: '+offsetDisruptions[k].childNodes[0].childNodes[m].attributes.name); 
                segmentMC=eval("line"+lines[i].attributes.id+".mc"+offsetDisruptions[k].childNodes[1].childNodes[m].attributes.id+"_"+offsetDisruptions[k].childNodes[0].childNodes[m+1].attributes.id);    
                if(segmentMC){ 
                 //trace(' segment found: '+eval(segmentMC)); 
                } else { 
                 for(n=0;n<offsetDisruptions[k].childNodes[0].childNodes.length;n++) { 
                  segmentMC=eval("line"+lines[i].attributes.id+".mc"+offsetDisruptions[k].childNodes[0].childNodes[m].attributes.id+"_"+offsetDisruptions[k].childNodes[0].childNodes[n].attributes.id); 

                  if(segmentMC){ 
                   break; 
                  } else { 
                  } 
                 } 


                } 
                if(filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue)!=segmentMC.infoText){ 
                 segmentMC.infoText+=filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue); 
                } 
                segmentMC.infoCount++; 
                segmentMC.lineID=lines[i].attributes.id; 
                segmentMC.onRollOver=function(){ 
                 showText(this); 
                } 
                segmentMC.onRollOut=function(){ 
                 hideText(); 
                }          
                segmentMC.disrupted=true; 
                eval("mc_interchanges.mc"+lines[i].attributes.id+".mc"+offsetDisruptions[k].childNodes[0].childNodes[m].attributes.id).disrupted=true; 
                eval("mc_stations.mc"+offsetDisruptions[k].childNodes[0].childNodes[m].attributes.id).disrupted=true; 
                eval("mc_stations.mc"+offsetDisruptions[k].childNodes[0].childNodes[m].attributes.id).infoText=filterMessage(offsetDisruptions[k].childNodes[1].childNodes[0].nodeValue); 

               } 

            } 


        } 
      } 
      offsetStationsNode=stations; 
      offsetStationDisruptions=offsetStationsNode.childNodes; 
      for(k=0;k<offsetStationDisruptions.length;k++){ 
        if(offsetStationDisruptions[k].attributes.closed.toLowerCase()=="true"){ 
          if(offsetStationDisruptions[k].attributes.id!=1000023 && offsetStationDisruptions[k].attributes.id!=1000250){ 
          if(eval("mc_stations.mc"+offsetStationDisruptions[k].attributes.id)){ 
          currentStatus++; 
          stationMC=eval("mc_stations.mc"+offsetStationDisruptions[k].attributes.id); 
          stationMC.disrupted=true; 
          stationMC.infoText=filterMessage(offsetStationDisruptions[k].firstChild.firstChild.nodeValue); 
          stationMC.stationID=offsetStationDisruptions[k].attributes.id; 
          stationMC.onRollOver=function(){ 
           showText(this); 
          } 
          stationMC.onRollOut=function(){ 
           hideText(); 
          } 
          myColor = new Color(stationMC); 
          myColor.setRGB(rgbRed); 
          stationMC.createEmptyMovieClip("square_mc", this.getNextHighestDepth()); 
          stationMC.square_mc.beginFill(0xFFFFFF); 
          stationMC.square_mc.moveTo(0, 0); 
          stationMC.square_mc.lineTo(stationMC._width+5, 0); 
          stationMC.square_mc.lineTo(stationMC._width, stationMC._height); 
          stationMC.square_mc.lineTo(0, stationMC._height); 
          stationMC.square_mc.endFill(); 
          stationMC.square_mc._alpha=0; 
          stationParentMC="mc"+offsetStationDisruptions[k].attributes.id; 
          for (var prop in mc_interchanges) { 
           if(eval(mc_interchanges[prop][stationParentMC])){ 
            eval(mc_interchanges[prop][stationParentMC]).disrupted=true; 
           } 
          } 

         } 
        } 

       } 
      } 
     } 
     lineParent=eval("line"+lines[i].attributes.id); 
     if(lineParent.wholeLineAffected==true){    
      interchangeParent=(eval("mc_interchanges.mc"+lines[i].attributes.id)); 
      for (var prop in interchangeParent) { 
       if (interchangeParent[prop] instanceof MovieClip) { 
        interchangeParent[prop].disrupted=true; 
        eval("mc_stations."+prop).disrupted=true; 

        if(eval("mc_stations."+prop).infoText==undefined){ 
         eval("mc_stations."+prop).infoText=eval('line'+lines[i].attributes.id).infoText; 

        } 
       } 
      } 

     } else {  
      if(lineParent==_level0.mc_container.mc_loader.line01CIR){ 
       if(_level0.mc_container.mc_loader.line01CIR.mc1000174_1000072.disrupted==true && _level0.mc_container.mc_loader.line01CIR.mc1000018_1000174.disrupted==true){   
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_south.disrupted=true; 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_north.disrupted=false; 
       } 
       if(_level0.mc_container.mc_loader.line01CIR.mc1000174_1000072.disrupted==true && _level0.mc_container.mc_loader.line01CIR.mc1000196_1000174.disrupted==true){ 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_south.disrupted=false; 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_north.disrupted=true; 
       }          
       if(_level0.mc_container.mc_loader.line01CIR.mc1000174_1000072.disrupted==true && _level0.mc_container.mc_loader.line01CIR.mc1000072_1000011.disrupted==true){ 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_south.disrupted=false; 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_north.disrupted=true; 
       } 
       if(_level0.mc_container.mc_loader.line01CIR.mc1000174_1000072.disrupted==true && _level0.mc_container.mc_loader.line01CIR.mc1000072_1000011.disrupted!=true && _level0.mc_container.mc_loader.line01CIR.mc1000196_1000174.disrupted!=true && _level0.mc_container.mc_loader.line01CIR.mc1000018_1000174.disrupted!=true){ 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_south.disrupted=true; 
        _level0.mc_container.mc_loader.line01CIR.mc1000174_1000072_north.disrupted=true; 
       }     


      } 
      if(lineParent==_level0.mc_container.mc_loader.line01CEN){ 
       // Roding Valley to Woodford -- shut down if both stations are disrupted 
       if(_level0.mc_container.mc_loader.mc_interchanges.mc01CEN.mc1000194.disrupted==true && _level0.mc_container.mc_loader.mc_interchanges.mc01CEN.mc1000274.disrupted==true){ 
        _level0.mc_container.mc_loader.line01CEN.mc1000274_1000194.disrupted=true; 
       }   
      }      
      for (var prop in lineParent) { 
        if (lineParent[prop] instanceof MovieClip) {       
        if(lineParent[prop].disrupted!=true){ 
         // set to grey 
         myColor = new Color(lineParent[prop]); 
         myColor.setRGB(rgbGrey); 
        } 
       } 
      }   
     } 
    } 
    for (var prop in mc_stations) { 
     if (mc_stations[prop] instanceof MovieClip) { 
      if (mc_stations[prop].disrupted!=true){ 
       myColor = new Color(mc_stations[prop]); 
       myColor.setRGB(rgbGrey); 
      } else {     
       if(mc_stations[prop].singleClosure==true){ 

        mc_stations[prop].onRollOver=function(){ 
         showText(this); 
        } 
        mc_stations[prop].onRollOut=function(){ 
         hideText(); 
        }        

       } 

      } 
     } 
    } 
     for (var prop in mc_interchanges) { 
      if (mc_interchanges[prop] instanceof MovieClip) { 
       for (var prop2 in mc_interchanges[prop]) { 
        if (mc_interchanges[prop][prop2] instanceof MovieClip) { 
          if(mc_interchanges[prop][prop2].disrupted!=true){   
           if(mc_interchanges[prop][prop2].mc_black){ 
            myColor = new Color(mc_interchanges[prop][prop2].mc_black); 
           } else { 
            myColor = new Color(mc_interchanges[prop][prop2]); 
           } 

           //set the colour 
           myColor.setRGB(rgbGrey); 
          } else { 

           if(mc_interchanges[prop][prop2].mc_black){ 

            stackX=parseInt(mc_interchanges[prop][prop2]._x); 
            stackY=parseInt(mc_interchanges[prop][prop2]._y); 
            stackID=prop2; 
             for (var stacked in mc_interchanges) { 
              for (var stacked2 in mc_interchanges[stacked]) { 
               if (stacked2 == prop2){ 
                if(mc_interchanges[stacked][stacked2].disrupted!=true){ 

                 testStackX=parseInt(mc_interchanges[stacked][stacked2]._x); 
                 testStackY=parseInt(mc_interchanges[stacked][stacked2]._y); 
                 resultX=stackX-testStackX; 
                 resultY=stackY-testStackY; 

                 if (resultX >= -2 && resultX <= 2){ 
                  if (resultY >= -2 && resultY <= 2){ 
                   trace('*** !!! stack detected: '+mc_interchanges[stacked][stacked2]); 
                   trace('***  resultX :'+resultX); 
                   trace('***  resultY :'+resultY); 
                   trace('***  stackX :'+stackX); 
                   trace('***  testStackX:'+testStackX); 
                   trace('***  stackY :'+stackY); 
                   trace('***  testStackY:'+testStackY); 
                   mc_interchanges[stacked][stacked2]._visible=false; 
                  }                
                 } 

                } 
               } 
              } 
             } 
           } 
          } 
         } 
       } 
      } 
     } 
trace('Current status: '+currentStatus); 
if(line90OVG.mc1000271_1001002.disrupted==true && line90OVG.mc1000271_1001348.disrupted!=true){ 
    depthTop=line90OVG.mc1000271_1001002.getDepth(); 
    depthBottom=line90OVG.mc1000271_1001348.getDepth(); 
    line90OVG.mc1000271_1001348.swapDepths(depthTop); 
    line90OVG.mc1000271_1001002.swapDepths(depthBottom);      
}  
if(line01MET.mc90000167_90001407.disrupted==true && line01MET.mc90019046_90001407.disrupted!=true){ 
    depthTop=line01MET.mc90000167_90001407.getDepth(); 
    depthBottom=line01MET.mc90019046_90001407.getDepth(); 
    line01MET.mc90019046_90001407.swapDepths(depthTop); 
    line01MET.mc90000167_90001407.swapDepths(depthBottom);     
} 
if(line01CEN.mc1000274_1000194.disrupted==true && line01CEN.mc1000274_90019033.disrupted!=true){ 
    depthTop=line01CEN.mc1000274_90019033.getDepth(); 
    depthBottom=line01CEN.mc1000274_1000194.getDepth(); 
    line01CEN.mc1000274_1000194.swapDepths(depthTop); 
    line01CEN.mc1000274_90019033.swapDepths(depthBottom); 
} 
if(line01CEN.mc1000258_1000157.disrupted==true && line01CEN.mc1000099_1000157.disrupted!=true){ 
    depthTop=line01CEN.mc1000099_1000157.getDepth(); 
    depthBottom=line01CEN.mc1000258_1000157.getDepth(); 
    line01CEN.mc1000258_1000157.swapDepths(depthTop); 
    line01CEN.mc1000099_1000157.swapDepths(depthBottom); 
} 
if(line01DIS.mc1000094_1000240.disrupted==true && line01DIS.mc1000048_1000240.disrupted!=true){ 
    depthTop=line01DIS.mc1000048_1000240.getDepth(); 
    depthBottom=line01DIS.mc1000094_1000240.getDepth(); 
    line01DIS.mc1000048_1000094.swapDepths(depthTop); 
    line01DIS.mc1000048_1000240.swapDepths(depthBottom);      
}  
if(line01CEN.mc1000137_1000207.disrupted==true && line01CEN.mc1000137_1000250.disrupted!=true){ 
    depthTop=line01CEN.mc1000137_1000250.getDepth(); 
    depthBottom=line01CEN.mc1000137_1000207.getDepth(); 
    line01CEN.mc1000137_1000207.swapDepths(depthTop); 
    line01CEN.mc1000137_1000250.swapDepths(depthBottom);      
} 
if(line01MET.mc1000264_1000102.disrupted==true && line01MET.mc1000161_1000102.disrupted!=true){ 
    depthTop=line01MET.mc1000264_1000102.getDepth(); 
    depthBottom=line01MET.mc1000161_1000102.getDepth(); 
    line01MET.mc1000161_1000102.swapDepths(depthTop); 
    line01MET.mc1000264_1000102.swapDepths(depthBottom);      
} 
if(line01MET.mc90005973_90004983.disrupted==true && line01MET.mc90019057_90004983.disrupted!=true){ 
    depthTop=line01MET.mc90005973_90004983.getDepth(); 
    depthBottom=line01MET.mc90019057_90004983.getDepth(); 
    line01MET.mc90019057_90004983.swapDepths(depthTop); 
    line01MET.mc90005973_90004983.swapDepths(depthBottom);     
} 
if(line01NTN.mc1000121_1000073.disrupted==true && line01NTN.mc1000121_1000254.disrupted!=true){ 
    depthTop=line01NTN.mc1000121_1000073.getDepth(); 
    depthBottom=line01NTN.mc1000121_1000254.getDepth(); 
    line01NTN.mc1000121_1000254.swapDepths(depthTop); 
    line01NTN.mc1000121_1000073.swapDepths(depthBottom);      
} 
if(line01NTN.mc1000147_1000081.disrupted==true && line01NTN.mc1000081_1000261.disrupted!=true){ 
    depthTop=line01NTN.mc1000147_1000081.getDepth(); 
    depthBottom=line01NTN.mc1000081_1000261.getDepth(); 
    line01NTN.mc1000081_1000261.swapDepths(depthTop); 
    line01NTN.mc1000147_1000081.swapDepths(depthBottom);      
} 
if(line01NTN.mc1000077_1000036.disrupted==true && line01NTN.mc1000152_1000036.disrupted!=true){ 
    depthTop=line01NTN.mc1000077_1000036.getDepth(); 
    depthBottom=line01NTN.mc1000152_1000036.getDepth(); 
    line01NTN.mc1000152_1000036.swapDepths(depthTop); 
    line01NTN.mc1000077_1000036.swapDepths(depthBottom);      
} 
if(mc_interchanges.mc01NTN.mc1000077.disrupted==true && mc_interchanges.mc01VIC.mc1000077.disrupted!=true){ 
    mc_interchanges.mc01VIC.mc1000077._visible=false; 
} 
if(mc_interchanges.mc01CIR.mc1000174.disrupted==true && mc_interchanges.mc01DIS.mc1000174.disrupted!=true){ 
    mc_interchanges.mc01DIS.mc1000174._visible=false; 
} 
if(mc_interchanges.mc01CIR.mc1000072.disrupted==true && mc_interchanges.mc01DIS.mc1000072.disrupted!=true){ 
    mc_interchanges.mc01DIS.mc1000072._visible=false; 
}  
if(mc_interchanges.mc01CIR.mc1000072.disrupted!=true && mc_interchanges.mc01HAM.mc1000072.disrupted==true){ 
    mc_interchanges.mc01CIR.mc1000072._visible=false; 
} 
if(mc_interchanges.mc01CIR.mc1000072.disrupted==true && mc_interchanges.mc01HAM.mc1000072.disrupted!=true){ 
    mc_interchanges.mc01HAM.mc1000072._visible=false; 
} 
if(mc_stations.mc1000096.disrupted==true && mc_stations.mc1000097.disrupted!=true){ 
    mc_stations.mc1000097._visible=false; 
} else if(mc_stations.mc1000097.disrupted==true && mc_stations.mc1000096.disrupted!=true){ 
    mc_stations.mc1000096._visible=false; 
} else { 
    mc_stations.mc1000097._visible=false; 
} 
if(mc_stations.mc1001348.disrupted==true && mc_stations.mc1000203.disrupted!=true){ 
    mc_stations.mc1000203._visible=false; 
} else if(mc_stations.mc1001348.disrupted!=true && mc_stations.mc1000203.disrupted==true){ 
    mc_stations.mc1001348._visible=false; 
} else { 
    mc_stations.mc1000203._visible=false; 
} 
mc_multilines.mc_multi_1002083_1002064._visible=false; 
mc_multilines.mc_multi_1002084_1002083._visible=false; 
mc_multilines.mc_multi_1002098_1000039._visible=false; 
mc_multilines.mc_multi_1002076_1000202._visible=false; //DLR Tower Hill > Shadwell 
mc_multilines.mc_multi_1000271_1001002._visible=false; //OVERGROUND Shepherds Bush > Willesden Junction 
if(mc_stations.mc1001348.disrupted==true && mc_stations.mc1000271.disrupted==true){ 
    mc_multilines.mc_multi_1000271_1001002._visible=false; 
} 
if(mc_stations.mc1002083.disrupted==true && mc_stations.mc1002064.disrupted==true && mc_stations.mc1002084.disrupted==true){ 
    mc_multilines.mc_multi_1002083_1002064._visible=true; 
    mc_multilines.mc_multi_1002084_1002083._visible=true; 
} 
if(line25DLR.mc1002084_1002064.disrupted==true && line25DLR.mc1002084_1002083.disrupted!=true){ 
    depthTop=line25DLR.mc1002084_1002083.getDepth(); 
    depthBottom=line25DLR.mc1002084_1002064.getDepth(); 
    line25DLR.mc1002084_1002064.swapDepths(depthTop); 
    line25DLR.mc1002084_1002083.swapDepths(depthBottom);    
} 
if(line25DLR.mc1002084_1002083.disrupted==true && line25DLR.mc1002064_1002083.disrupted!=true){ 
    depthTop=line25DLR.mc1002064_1002083.getDepth(); 
    depthBottom=line25DLR.mc1002084_1002083.getDepth(); 
    line25DLR.mc1002084_1002083.swapDepths(depthTop); 
    line25DLR.mc1002064_1002083.swapDepths(depthBottom);    
} 
if(line25DLR.mc1000202_1000013.disrupted==true && line25DLR.mc1000202_1002076.disrupted!=true){ 
    depthTop=line25DLR.mc1000202_1000013.getDepth(); 
    depthBottom=line25DLR.mc1000202_1002076.getDepth(); 
    line25DLR.mc1000202_1002076.swapDepths(depthTop); 
    line25DLR.mc1000202_1000013.swapDepths(depthBottom);    
} 
if(line25DLR.mc1002098_1000039.disrupted==true && line25DLR.mc1002071_1000039.disrupted==true){ 
    mc_multilines.mc_multi_1002098_1000039._visible=true; 
} 
if(line25DLR.mc1002098_1000039.disrupted==true && line25DLR.mc1002071_1000039.disrupted!=true){ 
    depthTop=line25DLR.mc1002071_1000039.getDepth(); 
    depthBottom=line25DLR.mc1002098_1000039.getDepth(); 
    line25DLR.mc1002098_1000039.swapDepths(depthTop); 
    line25DLR.mc1002071_1000039.swapDepths(depthBottom); 
} 
if(lineOverground!="true"){ 
    myColor = new Color(line90OVG); 
    myColor.setRGB(rgbGrey); 
    eval(line90OVG).disrupted="false"; 
} 
if(lineDLR!="true"){ 
    myColor = new Color(line25DLR); 
    myColor.setRGB(rgbGrey);  
    myColor = new Color(mc_multilines); 
    myColor.setRGB(rgbGrey);  
    eval(line25DLR).disrupted="false"; 
} 
mc_furniture._visible=false; 
myColor = new Color(mc_thames); 
myColor.setRGB(rgbGrey); 
myColor = new Color(mc_eastLondonLine); 
myColor.setRGB(rgbGrey);  
_root.mapLoadStatus=true; 
if(_root.xmlTimeStamp=="true"){ 
    trace(_root.xmlTimeStamp); 
    mc_timestamp._visible=true; 
} else { 
    mc_timestamp._visible=false; 
} 
if(offset!=undefined && offset!="normal"){ 
    if(currentStatus==0){ 
     _root.mc_good_service._visible=true; 
    } else { 
     mc_good_service._visible=false; 
    } 
} else {   
    mc_good_service._visible=false; 
} 
} 
+0

나중에 참조 할 수 있도록 답변으로 후속 작업을 게시하는 대신 추가 정보를 사용하여 원래 질문을 편집하십시오. – Jacob

0

과 매우 유사하다?

// load xml into object 
my_xml.load(xmlFile2); 

메서드의 인스턴스 이름이 "my_xml2"이기 때문에.

관련 문제