flex

AIR + Issue related to List component

Issue related to List component:- When u are dragging an item in same list it does not work in Desktop Application but same work in Web Application If u select first item in list and try to drag in same list towards bottom of the list, item get automatically scrolled in web application but in AIR it is not. How to make it scroll in AI...

Attaching .swf assets to Flex3 by calling getDefinitionByName()

Hello! Does anybody please know, how could you attach symbols from an .swf file in the Actionscript part of your Flex3 file? I've prepared a simple test case demonstrating my problem. Everything works (there are icons at the 4 buttons, there is a red circle) - except the getDefinitionByName() part. My target is to attach a symbol fro...

getCharIndexAtPoint() equivalent in Spark RichEditableText

I want to find a way to get the character index in a Spark based RichEditableText based on mouse x, y position. The mx.controls.TextArea has a protected getCharIndexAtPoint() method but I can't find an equivalent of this in the Spark RichEditableText which is disappointing. Any ideas or recommendations? ...

How to prevent components from rendering in Flex

Is there a way to prevent a component from rendering in Flex (to save memory or processing power)? I tried doing something like: <components:AddNewItemGroup id="addItemGroup" visible="false" enabled="false" horizontalCenter="0" bottom="0" /> I noticed that the component gets rendered but it's just...

How can I get the size of a remote file before I start downloading it?

Hi guys,I need to figure out the size of a remote file before I download it.And I know that in local place this can be done as follows var _filePath:String = "X:/save/abc.exe"; var file:File = new File(_filePath); if (file.size > 1000) { trace("too large"); } But when I tried a remote file like var _filePath:String = "http://www...

actionscript/flex : fetching assets from a CDN

I have a peculiar problem. My main.swf loads symbols from other swfs at runtime. If I keep all the swfs(main and others) on my server, things work fine. But if I keep all of them on a CDN, one particular symbol won't display occassionally. With flash tracer plugin for firefox I am able to see that all the symbols have been loaded a...

Creating state children before switching to state

Hi All In my view I have a welcome screen: <component:WelcomeScreen includeIn="welcome" /> Which is a pretty small component and I have panelContainer: <component:PanelContainer id="panelView" includeIn="panels" > <manyChildren /> </component:PanelContainer> Whilst the user is reading the warm and fuzzy w...

Flex Canvas child Randomly resizes

Hi! I have an application with a viewstack that contains all the components that need to be displayed. The navigation is defined in the main application. All the components are based on canvas. The main application looks like that: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:components="components...

Conditional Drag and Drop Operations in Flex/AS3 Tree

Good day everyone. I am currently working with a hierarchical tree structure in AS3/Flex, and want to enable drag and drop capabilities under certain conditions: Only parent/top level nodes can be moved Parent/top level nodes must remain at this level; they can not be moved to child nodes of other parent nodes Using the dragEnter ev...

FLEX: swfloader component not firing complete event

enter code hereBeen really frustrating just trying to load a swf from a swfloader in Flex and then accessing it's content. I'm sure once I figure out how to do it once then it'll be fine, but I've gone thorugh a bunch of tutorials and somethings not right. Here's my flex code: and the as code: public function initHeaderSwf():void ...

Merging two XML files in Flex

Does anyone know how to merge two xml files in or two xmllist objects in Flex3 ActionScript? Thanks. ...

How to do something after effect animation ends in Flex?

I'm a beginner in Flex so there must be more elegant way of doing this. //move effect private var m:Move = new Move(); //this function creates labels with some text and starts move effect on them public function moveText(i:int):void { var myLabel:Label = new Label(); myLabel.text = "some text"; m.target = myLabel; ......

TextField instance inside a button created in a separate layer in Flash is null in Flex

I've created an button object in flash. The button contains 2 layers. One is the background image and on top of it is a textField. The textfield is dynamic. I use the button inside a movieclip and I export it in a SWC. The I'm trying to use it in flex. I'm trying to do this: var myComponent:MyComponent = new MyComponent(); myComponent....

Flex integration problem

have 3 swf files. 1. a preloader 2. a screen-wide menu 3. a photo gallery (coding in as3) Each of these files individually is not very large in size. But all this together might be. My Question: Can I import all 3 files in flex and this happen: user click on the preloader, leads to the screen-wide menu. and depending on the button cli...

Flex ByteArray data field

The data provider (ArrayCollection) for my data grid consists of objects with ByteArray (int) fields. How do I make the data field display as int without transforming my data provider? ...

Can I create LinkButtons that wrap like textfields?

I basically want to make things easier by just looping LinkButtons instead of making textfields because the linkbuttons have the rollovers already programmed. But I have a lot of text and it just keeps going. I want it to wrap like I can do with textfields. Thanks package { import mx.controls.LinkButton; import flash.text.TextLineMe...

Adobe Flex:change the text in <mx:text> with a click effect

I am new to flex, how do you change the text inside of a text control when a user has clicked a button. I could not find a way to do this. I used an event handler to input a .xml to a string and then to the text control. This doesn't seem to work. Any suggestions? ...

Flex - Is there a way to change the "Channel Disconnected" error message?

I have a Flash app with a PHP backend. Whenever there is a PHP error, I get the "Channel Disconnected before an acknowledgement was received" error message. I'm getting ready to push my project to beta and I would prefer if this message said something more like "There was a PHP error, please log a bug" or something instead of a message ...

Flex AdvancedDataGrid - ColumnOrder With Formatter and ItemRenderer Question For Experts

I have a advanceddatagrid that has around 15 columns. Some are string, some are numbers. I have shown 4 columns below. The number columns have formatting done for zero precision and 2 digits precision. The itemRenderer is just to show Blue Color if the number is +ve and Red Color if the number is -ve. It looks something like below <mx:...

How to determine code and assets size within a SWF?

Is there a way to take a compiled SWF file and figure out how much of it's size is used by code and how much is assets (images, etc)? I'd like to see if I can get my Flex SWF smaller but I'm unsure what's taking up the most space. ...