blob: ba4dfae98a1663b1fa3e362d3a7e37db0ce96d90 [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"
xmlns:comp="comps.*"
currentState="state1" creationComplete="initApp(event)">
<s:layout>
<s:VerticalLayout paddingLeft="20" paddingRight="20"
paddingTop="20" paddingBottom="20" />
</s:layout>
<fx:Style>
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace s "library://ns.adobe.com/flex/spark";
@font-face {
src:url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontFamily: VeraMoBdEmbedded;
embedAsCFF: true;
unicodeRange:
U+0041-005A, /* Upper-Case [A..Z] */
U+0061-007A, /* Lower-Case a-z */
U+0030-0039, /* Numbers [0..9] */
U+002E-002E; /* Period [.] */
}
@font-face{
src: url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
fontFamily: MeiryoEmbedded;
embedAsCFF: true;
}
@font-face{
src: url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
fontWeight: bold;
fontFamily: MeiryoEmbedded;
embedAsCFF: true;
}
s|RichEditableText{
fontAntiAliasType: "normal";
fontFamily: VeraMoBdEmbedded;
fontSize: 12;
fontLookup: "embeddedCFF";
}
</fx:Style>
<fx:Script>
<![CDATA[
import mx.core.mx_internal;
import mx.events.FlexEvent;
import mx.events.StateChangeEvent;
import spark.events.IndexChangeEvent;
import spark.utils.TextFlowUtil;
import flashx.textLayout.formats.TextLayoutFormat;
import mx.events.FlexEvent;
public function changeState(state:String):void
{
trace("change the state now from " + this.currentState + "to " + state);
this.currentState=state;
trace("new state is " + this.currentState + "you wanted " + state);
}
protected function initApp(event:FlexEvent):void
{
this.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE,stateChangeHandler);
customRETEditor.addEventListener(Event.SELECT_ALL, taHandler);
customRETEditor.addEventListener(FlexEvent.SELECTION_CHANGE,taHandler);
}
protected function taHandler(e:Event):void
{
trace("show event name: " + e.type);
}
protected function stateChangeHandler(sce:StateChangeEvent):void
{
trace("state changed from: " + sce.oldState + " to: " + sce.newState);
}
]]>
</fx:Script>
<s:states>
<s:State name="state1" />
<s:State name="state2" />
</s:states>
<comp:StatesRET id="customRETEditor"
width="100%"
color="#373737"
includeIn="state1"
/>
</s:Application>