topical media & game development

talk show tell print

lib-flex-ximpel-editor-net-ximpel-classes-ExtendedOverlay.ax

lib-flex-ximpel-editor-net-ximpel-classes-ExtendedOverlay.ax (swf ) [ flash ] flex


  /*
      This program is free software: you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation, either version 3 of the License.
  
      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.
  
      You should have received a copy of the GNU General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
          Javier Quevedo Fernández 05-2009.
  
  */
  package net.ximpel.classes
  {
          import mx.collections.ArrayCollection;
          
          public class @ax-lib-flex-ximpel-editor-net-ximpel-classes-ExtendedOverlay 
          {
                  public var startTime:int;
                  public var endTime:int;
                  public var overlayCels:Array;
  
                  public function @ax-lib-flex-ximpel-editor-net-ximpel-classes-ExtendedOverlay()
                  
                  {
                          startTime = 0;
                          endTime = 0;
                          overlayCels = new Array(); 
                          
  
                          //addOverlayCell();
                  }
                  
                  public function addOverlayCell():void{
                          var overlayCel : OverlayCel = new OverlayCel();
                          overlayCels.push(overlayCel);
                  } 
                  
                  public function removeOverlayCell(overlayCell : OverlayCel):void{
                          overlayCels.splice(overlayCels.indexOf(overlayCell),1);
                  }
                  
                  public function toXML():XML
                  {
                          var extendedOverlay:XML = 
                          <overlay starttime={startTime} endtime={endTime}>
                          </overlay>;
                          
                          for (var i:int = 0; i < overlayCels.length; i++) {
                                  if(overlayCels[i] is OverlayCel){
                                          extendedOverlay.appendChild(overlayCels[i].toXML());
                                  }
                          }
                          
                          return extendedOverlay;
                  }
          }
  }


(C) Æliens 19/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.