     // 
     //--------------------------------------------------------------------------
     
+    /**
+     *  Serializes the navigation stack in an IDataOutput object so that it
+     *  can be written to a shared object.
+     *  
+     *  @param output The data output object used to write the data.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5 
+     */ 
     public function writeExternal(output:IDataOutput):void
     {
+        // The write order must always match the read order.  Make sure that
+        // writeExternal() and readExternal() process properties in the same order.
         output.writeObject(firstViewData);
         output.writeObject(label);
         output.writeObject(_source);
+        
+        // Can't store class names in a shared object, need to save the
+        // class name instead.
         output.writeObject(getQualifiedClassName(icon));
         output.writeObject(getQualifiedClassName(firstView));
     }
     
+    /**
+     *  Deserializes the navigation stack when being loaded from a shared
+     *  object.
+     *  
+     *  @param input The external object to read from.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5 
+     */ 
     public function readExternal(input:IDataInput):void 
     {
+        // The write order must always match the read order.  Make sure that
+        // writeExternal() and readExternal() process properties in the same order.
         firstViewData = input.readObject();
         label = input.readObject();
         _source = input.readObject() as Vector.<ViewHistoryData>;
         
+        // Need to get the class names from the saved strings.
         var className:String = input.readObject();
         icon = (className == "null") ? null : getDefinitionByName(className) as Class;
         

//
////////////////////////////////////////////////////////////////////////////////

package spark.components.supportClasses
{    
import flash.utils.IDataInput;

////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2010 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
