| <?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:custom="Assets.*" |
| width="600" height="600" |
| > |
| |
| <fx:Script source="testingVirtualization.as" /> |
| |
| <fx:Script> |
| <![CDATA[ |
| import mx.collections.ArrayCollection; |
| import spark.components.DataGroup; |
| import spark.components.Group; |
| import spark.layouts.*; |
| import Assets.*; |
| |
| public var arrayOfIntegers:ArrayCollection = new ArrayCollection([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]); |
| public var arrayOfStrings:ArrayCollection = new ArrayCollection(("0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25").split(" ")); |
| |
| /** |
| * This will set a property for one item in a group. |
| * g: The Group to work with. |
| * prop: The property. |
| * val: The value. |
| * idx: The index of the item to change. |
| **/ |
| public function setPropOnOneGroupElement(g:Group, prop:String, val:*, idx:int):void{ |
| g.getElementAt(idx)[prop] = val; |
| } |
| |
| ]]> |
| </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"; |
| |
| @font-face { |
| src: url("../../../../../Assets/Fonts/Cousine/Cousine-Regular.ttf"); |
| fontFamily: SparkFont; |
| embedAsCFF: true; |
| } |
| |
| @font-face { |
| src: url("../../../../../Assets/Fonts/Cousine/Cousine-Regular.ttf"); |
| fontFamily: "HaloFont"; |
| embedAsCFF: false; |
| } |
| |
| s|Button{ |
| fontFamily: SparkFont; |
| fontLookup: embeddedCFF; |
| fontAntiAliasType: normal; |
| } |
| |
| s|Label{ |
| fontFamily: SparkFont; |
| fontLookup: embeddedCFF; |
| fontAntiAliasType: normal; |
| } |
| |
| global { |
| fontFamily: "HaloFont"; |
| fontAntiAliasType: "normal"; |
| kerning: "off"; |
| } |
| |
| </fx:Style> |
| |
| <fx:Declarations> |
| <mx:Zoom id="zoom1" zoomWidthTo="0.5" zoomWidthFrom="1" zoomHeightTo="0.5" zoomHeightFrom="1" duration="500" /> |
| <mx:Rotate id="rotate1" angleTo="45" angleFrom="0" originX="10" originY="10" duration="500" /> |
| </fx:Declarations> |
| |
| <s:Group id="containingGroup"> |
| <s:Rect id="bgRect" top="0" left="0" right="0" bottom="0"> |
| <s:fill> |
| <s:SolidColor color="0xe3e3e3" /> |
| </s:fill> |
| </s:Rect> |
| |
| <s:DataGroup id="group1" /> |
| |
| </s:Group> |
| |
| </s:Application> |