blob: 64d550c5f7c0474905b04e4269e7a23a69231b20 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="1024" minHeight="768">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.collections.ArrayList;
import mx.events.ModuleEvent;
import mx.events.StyleEvent;
import mx.controls.Alert;
protected function loadModuleBtn1_clickHandler(event:MouseEvent):void
{
mod_loader.url = "assets/SparkModule.swf";
}
protected function unloadModuleBtn1_clickHandler(event:MouseEvent):void
{
mod_loader.unloadModule();
mod_loader.url = "";
}
protected function loadModuleBtn2_clickHandler(event:MouseEvent):void
{
mod_loader2.url = "assets/StylesModule.swf";
}
protected function unloadModuleBtn2_clickHandler(event:MouseEvent):void
{
mod_loader2.unloadModule();
mod_loader2.url = "";
}
protected function loadSwfBtn1_clickHandler(event:MouseEvent):void
{
swf_loader.load("assets/SparkSubApp.swf");
}
protected function unloadSwfBtn1_clickHandler(event:MouseEvent):void
{
swf_loader.unloadAndStop();
}
protected function loadSwfBtn2_clickHandler(event:MouseEvent):void
{
swf_loader2.load("assets/StylesSubApp.swf");
}
protected function unloadSwfBtn2_clickHandler(event:MouseEvent):void
{
swf_loader2.unloadAndStop();
}
]]>
</fx:Script>
<s:layout>
<s:VerticalLayout />
</s:layout>
<s:Button label="Load Module 1" id="loadModuleBtn1" click="loadModuleBtn1_clickHandler(event)" />
<s:Button label="UnLoad Module 1" id="unloadModuleBtn1" click="unloadModuleBtn1_clickHandler(event)" />
<s:Button label="Load Swf 1" id="loadSwfBtn1" click="loadSwfBtn1_clickHandler(event)" />
<s:Button label="UnLoad Swf 1" id="unloadSwfBtn1" click="unloadSwfBtn1_clickHandler(event)" />
<s:Button label="Load Module 2" id="loadModuleBtn2" click="loadModuleBtn2_clickHandler(event)" />
<s:Button label="UnLoad Module 2" id="unloadModuleBtn2" click="unloadModuleBtn2_clickHandler(event)" />
<s:Button label="Load Swf 2" id="loadSwfBtn2" click="loadSwfBtn2_clickHandler(event)" />
<s:Button label="UnLoad Swf 2" id="unloadSwfBtn2" click="unloadSwfBtn2_clickHandler(event)" />
<s:VGroup id="groupId">
<mx:ModuleLoader id="mod_loader"/>
<mx:SWFLoader id="swf_loader"/>
<mx:ModuleLoader id="mod_loader2"/>
<mx:SWFLoader id="swf_loader2"/>
</s:VGroup>
</s:Application>