blob: 8a82f046b90b1091fe1ee748e6fad3bad56b3432 [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" creationComplete="application1_creationCompleteHandler(event)"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.collections.ArrayList;
import mx.controls.Alert;
import mx.events.FlexEvent;
import mx.core.EmbeddedFontRegistry; EmbeddedFontRegistry;
public var eventDispatcher:IEventDispatcher = null;
private var arr:Array =
[
{ label:'Newyork', data:10.00},
{ label:'Boston', data:15.00 },
{ label:'Chicago', data:3.50 },
{ label:'San Francisco', data:7.65},
{ label:'Las Vegas',data:12.35 },
{ label:'Orlando', data:00.00}
];
private var listArr :ArrayList = new ArrayList(arr);
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
sparkList.dataProvider = listArr;
mxList.dataProvider = listArr;
}
public function loadFonts():void
{
eventDispatcher = styleManager.loadStyleDeclarations("assets/fontsSheet.swf");
}
public function unloadFonts():void
{
styleManager.unloadStyleDeclarations("assets/fontsSheet.swf");
}
public function loadModule():void
{
mod_loader.url="assets/FontsModule.swf";
}
public function unloadModule():void
{
mod_loader.url="";
mod_loader.unloadModule();
}
]]>
</fx:Script>
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<s:Panel id="sparkPanel" title="Sparky Panel" >
<s:layout>
<s:VerticalLayout paddingLeft="5" paddingTop="5"/>
</s:layout>
<s:Button label="Spark Button" />
<s:RichText id="rt" text="Spark Rich TExt" />
<s:Label text="Spark Label" />
<s:List id="sparkList" />
</s:Panel>
<mx:Panel title="MX Panel" >
<mx:Button label="MX Button" />
<mx:Label text="Spark Label" />
<mx:List id="mxList" />
</mx:Panel>
<mx:ModuleLoader id="mod_loader" />
<s:VGroup>
<s:Button click="loadFonts()" label="load fonts using css"/>
<s:Button click="unloadFonts()" label="unload css fonts"/>
<s:Button click="loadModule()" label="load module"/>
<s:Button click="unloadModule()" label="unload module"/>
</s:VGroup>
</s:Application>