blob: fd7e92f80afa93f31df78ef1b7874ea21cec31c2 [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:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:comps="comps.*"
backgroundColor="0xffffff"
width="800" height="600" >
<fx:Script>
<![CDATA[
import Assets.*;
import mx.core.*; // Includes INavigatorContent, Container, FlexGlobals.
import mx.containers.*; // Includes Panel, Accordion, etc...
import mx.events.FlexEvent;
import spark.components.*; // Includes NavigatorContent.
/**
* Make sure we're at the given index.
* We might already be there, so blindly setting it
* and waiting for updateComplete won't always work.
**/
public function ensureSelectedIndex(idx:int):void{
acc1.addEventListener(mx.events.FlexEvent.UPDATE_COMPLETE, ensureSelectedIndexUpdateComplete);
if(acc1.selectedIndex == idx){
ensureSelectedIndexUpdateComplete();
}else{
acc1.selectedIndex = idx;
}
}
public function ensureSelectedIndexUpdateComplete(e:* = null):void{
acc1.removeEventListener(mx.events.FlexEvent.UPDATE_COMPLETE, ensureSelectedIndexUpdateComplete);
acc1.dispatchEvent(new Event("ensureSelectedIndexComplete"));
}
]]>
</fx:Script>
<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
/**********************
* Flex 4 embedding
**********************/
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: EmbeddedVeraCFF;
embedAsCFF: true;
}
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedVeraCFF;
embedAsCFF: true;
}
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedVeraCFF;
embedAsCFF: true;
}
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-BoldItalic.ttf");
fontWeight: bold;
fontStyle: italic;
fontFamily: EmbeddedVeraCFF;
embedAsCFF: true;
}
/**********************
* Pre-Flex 4 embedding
**********************/
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: EmbeddedVera;
embedAsCFF: false;
}
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedVera;
embedAsCFF: false;
}
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedVera;
embedAsCFF: false;
}
@font-face {
src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-BoldItalic.ttf");
fontWeight: bold;
fontStyle: italic;
fontFamily: EmbeddedVera;
embedAsCFF: false;
}
mx|Accordion{
fontFamily: EmbeddedVera;
fontAntiAliasType: normal;
}
</fx:Style>
<comps:CustomAcc1 id="acc1" />
</s:Application>