flex4

flex4 mx|Tree - items order change when i fold and unfold an item

孤街醉人 提交于 2019-12-11 15:17:01
问题 Using Flex 4.1, i'm trying to create a Tree element with a custom ItemRenderer (MXTreeItemRenderer). my problem is that whenever I fold and unfold a root item, the order of the items change.. it's weird like maybe the XML is not formatted properly. any ideas? my Main.mxml file: <?xml version="1.0" encoding="utf-8"?> <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="955" minHeight="600"> <!--

flex 4 - wait for load complete without freezing

柔情痞子 提交于 2019-12-11 15:09:51
问题 I was wondering if it is possible to implement any logic to wiat for the image to complete load without freezing. For the sake of my app, I created a class which takes image url in constructor and loads the mx.controls.Image using the "load()" function. See the class below package com { import flash.display.Loader; import flash.display.Sprite; import flash.events.*; //import flash.net.URLRequest; import mx.controls.Alert; import mx.controls.Image; //import mx.utils.OnDemandEventDispatcher;

Example of using embedded fonts loaded at runtime Flex 4 runtime loaded modules

霸气de小男生 提交于 2019-12-11 14:22:37
问题 am having quite alot of problems trying to use embeded fonts in flex 4. Here is the situation. I have a main application that fist load the fonts via a URL. This is the font file code: package{ import flash.display.Sprite; import flash.text.Font; public class FontLib extends Sprite { [Embed(source="MyriadPro-Regular.otf", fontWeight= "normal", fontName="Myriad Pro", fontFamily="Myriad Pro",mimeType="application/x-font", embedAsCFF="true")] public const myriadFont:Class; public function

How do you declare component states in ActionScript?

喜欢而已 提交于 2019-12-11 13:54:57
问题 In mxml you declare states like this: <box:states> <s:State name="active"/> <s:State name="disabled"/> </box:states> How do you acheive the same in an ActionScript class? Apparently it's the same in Flex 3 and Flex 4, whatever it is. 回答1: If you can avoid it, do! That said, hold your breath! That said, take a look at the State Class. Create a new instance and define the overrides. I believe all the overrides are link in the "see also" link. Each component has a "states" array. So, just create

Is there a way to enable SVG support in Adobe AIR

ぃ、小莉子 提交于 2019-12-11 13:16:19
问题 I am using Adobe AIR to create a desktop application. The AIR app is very simple, it consists of a tabs that each contain a HTML component (AIR HTML Control). The HTML component is simply passed a URL (location) and renders it. My problem is that one of the locations is a page that contains SVG. An example location is here the AIR HTML component does not (appear to) render SVG :( Is there a way to enable SVG in AIR or a workaround for it ? Thanks in advance. Jon. 回答1: Seems you're out of luck

Animating child elements in Flex 4

怎甘沉沦 提交于 2019-12-11 12:50:00
问题 Anyone know how to animate the size/position of child elements of a layout in Flex 4 ? Example: I have a list component with a custom layout. I want when I change the positions of the child elements I want them to animate their move to the new positions. 回答1: There is currently no built in way, nor plans, to make animated layouts in Flex 4 :/. What I've done to make this happen is to animate the setting of "setLayoutBoundsPosition" and "setLayoutBoundsSize" in the layout. So instead of

Flex Spark form, horizontally aligning form items

谁都会走 提交于 2019-12-11 12:11:29
问题 This is the scenario: <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="955" minHeight="600"> <s:HGroup> <s:Form> <s:FormItem label="label1"> <s:TextInput/> </s:FormItem> <s:FormItem label="label2"> <s:TextInput/> </s:FormItem> <s:FormItem label="label3"> <s:TextInput/> </s:FormItem> </s:Form> <s:Form> <s:FormItem label="label1"> <s:Label text="soemthing"/> </s:FormItem> <s:FormItem label=

Possible to disable Windows Start Menu while AIR app is running?

浪尽此生 提交于 2019-12-11 11:36:10
问题 I think I know the answer to this ( no ) but I thought I would ask: Is it possible to disable the Windows Start Menu while an AIR app is running? The legacy app I am revising needs to run in a screen-sized "window" mode in order to have access to the native menu system. There are some buttons that are close to the bottom edge of the screen and it is very easy to trigger the Start Menu sliding on. I know I could, maybe should redo the menus to use Flex components and run fullscreen (where the

Upgrading to Flex 4.6 from Flex 4.5

三世轮回 提交于 2019-12-11 11:01:01
问题 The Background I'm in the process of updating an AIR app that was built with Flex 4.5 and AIR 2.6 to Flex 4.6 and AIR 3.3. I'm doing this to take advantage of the native JSON class and to get ready for AIR 3.4 and Actionscript Workers, both things I plan to make use of. I'm also using PureMVC 2.0.4. The actual updating process went fine. I downloaded the Flex 4.6 SDK and overlaid the AIR 3.3 SDK on top of it. So far so good. I was using the JSON class in as3corelib so I had to make some

How to get image if I drag and drop an Image from Google Chrome or Internet Explorer in AS3

一曲冷凌霜 提交于 2019-12-11 10:34:53
问题 I am trying to drag an Image from Google Chrome or Internet Explorer and Drop into my Flex Project but I am unable to get Image directly from temp folder like Mozilla Firefox, For Example I am using the following codes go get drag drop images from system temp folder in case of Mozilla Firefox: this.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onNativeDragDrop); private function onNativeDragDrop(vEvent:NativeDragEvent) { var dropFiles:Array = vEvent.clipboard.getData(ClipboardFormats