lundi 25 mai 2015

Find XML model from code source

i have an action script code source using XML but i cant guess the XML model to inject into the functions, here the code:





      private function updateTournamentList(param1:ByteArray) : void
      {
         var _loc3_:XML = null;
         var _loc4_:XML = null;
         var _loc5_:XML = null;
         msg("update tournament list");
         var _loc2_:XML = new XML(this.ReadString(param1));
         msg("---------------------------------");
         msg(_loc2_);
         if(_loc2_.code == "queue_changed")
         {
            for each(_loc3_ in _loc2_..queue)
            {
               if(_loc3_.id == this.data.currentTournamentQueue.id)
               {
                  this.data.currentTournamentQueue.setChildren(_loc3_.children());
                  break;
               }
            }
            this.dispatchEvent(new Event("currentQueueChanged"));
         }
         else if(_loc2_.code == "tourney_queues")
         {
            for each(_loc4_ in _loc2_..queue)
            {
               for each(_loc5_ in this.data.tournamentQueues)
               {
                  if(_loc4_.id == _loc5_.id)
                  {
                     _loc5_.setChildren(_loc3_.children());
                  }
               }
            }
            this.dispatchEvent(new Event("tournamentQueuesChanged"));
         }
         else if(_loc2_.code == "tourney_info")
         {
            if(this.data.lastTourneyInfo == null)
            {
               this.data.lastTourneyInfo = _loc2_;
            }
            this.dispatchEvent(new APPXmlNotificationEvent("tournamentChanged",_loc2_));
         }
         else if(_loc2_.code == "tourney_countdown")
         {
            this.dispatchEvent(new APPXmlNotificationEvent("tournamentCountdown",_loc2_));
         }

      }

     private function listTournamentsHandler(param1:ByteArray) : void
          {
             msg("list tournaments heandler handler");
             var _loc2_:String = this.ReadString(param1);
             msg(_loc2_);
             var _loc3_:XML = new XML(_loc2_);
             this.data.tournaments = _loc3_.children();
             this.dispatchEvent(new Event("listTournaments"));
          }

     private function listTournamentQueuesHandler(param1:ByteArray) : void
          {
             msg("list tournament queues heandler handler");
             var _loc2_:String = this.ReadString(param1);
             msg(_loc2_);
             var _loc3_:XML = new XML(_loc2_);
             this.data.tournamentQueues = _loc3_.children();
             this.dispatchEvent(new Event("listTournamentQueues"));
          }


I tried this model :

<pre><code>
<code>queue_changed</code>
<code>tourney_queues</code>
<code>tourney_info</code>
<code>tourney_countdown</code>
<data>
    <currentTournamentQueue id=''>
        <queue></queue>
        <queue></queue>
    </currentTournamentQueue>
    <tournamentQueues id=''>
        <queue></queue>
    </tournamentQueues>
    <lastTourneyInfo id=''>
    </lastTourneyInfo>
    <tournaments>
    </tournaments>
</data>
</code></pre>

I have a bad level at actionscript, if i got the XML model that ll help a lot, so i tring many modeles but nothing happen can you please help me?

Regards

Aucun commentaire:

Enregistrer un commentaire