<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns="http://www.degrafa.com/2007"
    layout="absolute" viewSourceURL="srcview/index.html">
    
    <mx:Style
        source="/assets/css/loader.css"/>
        
    <mx:Script>
        <![CDATA[
            
            public function startLoader():void
            {
                loaderButton.enabled=false;
                stopButton.visible=true;
                loaderButton.label='Signing In...';
            }
            
            public function stopLoader():void
            {
                loaderButton.enabled=true;
                stopButton.visible=false;
                loaderButton.label='Sign In';
            }
            
        ]]>
    </mx:Script>
    
    <mx:Button
        id="loaderButton"
        verticalCenter="0"
        horizontalCenter="0"
        label="Sign In"
        height="50"
        width="230"
        buttonMode="true"
        click="startLoader()"/>
        
    <mx:LinkButton
        id="stopButton"
        horizontalCenter="0"
        top="20"
        label="Stop Loading"
        visible="false"
        includeInLayout="{ stopButton.visible }"
        click="stopLoader()"/>
        
    
    
</mx:Application>