title: Inheritance with Flex mxml files - screenshot attached
body: <p>In a Flex mobile app I have 5 <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/View.html" rel="nofollow noreferrer">View</a>s, handling OAuth logins through 5 different social networks - including Google+ and Facebook. The <code>View</code>s are being selected through the menu shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/3ZQeo.png" alt="enter image description here"></p>
  
  <p>The filenames are FB.mxml, GG.mxml, MR.mxml, OK.mxml, VK.mxml and their source code looks <strong>very</strong> similar:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
          xmlns:s="library://ns.adobe.com/flex/spark" 
          viewActivate="loadInfo(event)"
          viewDeactivate="closeSWV(event)"
          title="Facebook.com"&gt;
  ....
              private function closeSWV(event:Event=null):void {
                  _busy.visible = _busy.includeInLayout = false;
                  _reload.visible = _reload.includeInLayout = true;
  
                  stage.removeEventListener(Event.RESIZE, resizeSWV);
                  if (! _swv)
                      return;
                  _swv.removeEventListener(Event.COMPLETE, extractAccessToken);
                  _swv.removeEventListener(LocationChangeEvent.LOCATION_CHANGE, extractAccessToken);
                  _swv.removeEventListener(IOErrorEvent.IO_ERROR, closeSWV);
                  _swv.removeEventListener(ErrorEvent.ERROR, closeSWV);
                  _swv.dispose();
                  _swv = null;
              }           
  
              private function resizeSWV(event:Event=null):void {
                  if (! _swv)
                      return;
                  // align to the right-bottom corner
                  _swv.viewPort = new Rectangle(stage.stageWidth - Preferans.SCALE * width, 
                      stage.stageHeight - Preferans.SCALE * height, 
                      Preferans.SCALE * width, 
                      Preferans.SCALE * height);
              }
  ....
          &lt;s:VGroup&gt;
              &lt;s:Label id="_first"  fontWeight="bold" text="Your name:" /&gt;
              &lt;s:Label id="_gender" fontWeight="bold" text="Gender:" /&gt;
              &lt;s:Label id="_city"   fontWeight="bold" text="City:" /&gt;
          &lt;/s:VGroup&gt;
  
      &lt;s:Button id="_play"
                label="Play" 
                click="startGame(event)"
                includeInLayout="false"
                visible="false" /&gt;
  &lt;/s:View&gt;
  </code></pre>
  
  <p><strong>My problem is:</strong> The 5 mxml files listed above have many similar methods and variables and UI elements and only few different methods and variables.</p>
  
  <p>I've tried to introduce a "base class" for them all several times already and have always given up, because it is not straightforward for mxml files (versus pure AS3 classes).</p>
  
  <p>Does anybody please have an idea, how to approach this?</p>