flex4

importing data in .xml form using Flex

I am working with Adobe Flex 4.0 and I am trying to import data from an Excel spreadsheet. I can import the data in an .csv file but I really need it to be in a .xml format. I tried to save the spreadsheet as .xml data but Excel threw me an error and said my data was not mapped for that form I could however save it as .xml spreadsheet, ...

call a custom event from an item renderer in flex 4

I have a Renderer: <?xml version="1.0" encoding="utf-8"?> <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Metadata> [Event(name="addToCart",type="event.ProductEvent")] </fx:Metadata> <fx:Scrip...

Flex4 Application state in a custom component

Hi, I'm porting my Flex3 app to Flex4 (FlashBuilder4). I get the whole new state concept, except one thing. In a custom component (separate mxml file) I'm using the main level Application's state. In Flex3 it was: <mx:State name="only_view_mode"> <mx:RemoveChild target="{myComponent.button1}" /> </mx:State> In Flex4 it should be s...

Flex 4 block drop

Hello, Is there any way to block the drop when Im doing drag and drop in a spark list and this list is drop enabled. I want to block it after a certain item that has a different kind of itemrenderer. Thank you in advance ...

Flex 4 Dates, Bug or what? im so confused

Hi I'm not sure whether it's a bug or what. But it's making my life worse. I'm doing a Flex 4 application that has a calendar component in an invisible 'state' when I pass comp2.selectedDate(2006,2); and debug at line 3, date has only 2006 year and 0 month. Why so? Why isn't it getting month = 2 as well? Thanks in advance public fu...

controlling X and Y of spark.components.Window

I am building an air app in Flex 4. I am creating windows as I need them in a chromeless application. Here is what I have in my main app creation complete protected function creationCompleteHandler(event:FlexEvent):void { facade.sendNotification(AppFacade.APP_INIT, this); var buttons:Navigat...

SpriteVisualElement centering issue within Group

Why is the red sprite not centered on the stage like the Spark Button? Is there some layout going on within the button that is not happening within the SpriteVisualElement? package { import flash.display.Sprite; import spark.components.Button; import spark.components.Group; import spark.core.SpriteVisualElement; public ...

BorderContainer Skin File is somehow empty

Hi When i generate skin files lets suppose for s:Button, they contain all the design related code such as graphic, label etc, but when i create a skin file of BorderContainer, it gets created without any design code and event the contentGroup part is commented and i dont know how to use it. Could you please guide me how to custimize it...

Compiling with Flex4 SDK

I'm trying to compile an existing Flex3 project with the Flex4 SDK. I'm getting this error: Warning: This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to tru...

Flex 4: idleCounter seems to have changed - most online examples now broken!

Guys- I have what I THINK is a simple problem here. I'm calling a basic timer on login success, followed by setting up a couple handlers to refresh some data on a schedule. (I haven't pasted the timer handlers cause i don't think it matters what they do) Anyway, I'm trying to shut OFF those timed refreshes when the app is IDLE, but th...

Flash Builder 4 and Debugging

Hi guys, I just wanted to ask a simple question. I am trying to work out the pros and cons of setting up Flash Builder 4, for Flex development, as an ant-build vs compiling via the IDE. I particularly want to ensure i can do the following: - Debug and Trace via IDE - Unit Testing via IDE Is this possible through command-line buildi...

Hiding a specifc button from ButtonBar

Hi I have a and a spark buttonbar which draws button from viewstack childrens <s:ButtonBar id="buttonsBar" dataProvider="{myVS}"/> How can i hide a specific buttonsBar' button ? Thanks ...

How to set TextArea height to its content height

I have an mx:TextArea and I want its height to be the same as its content height. There is nothing fancy - just a text area and text that is not editable. I need a simple and reliable way to make the control fit and show all the text without vertical scroll - something like auto resizing. Also my control's text will be set only once and ...

How can I change the state of the itemRenderer of one member of a flex 4 spark data group?

I have a "step indicator" made out of a DataGroup: <s:DataGroup id="stepNumbers" itemRenderer="stepNumberRenderer" horizontalCenter="0"> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> </s:DataGroup> where the dataprovider is 1,2,3,4,5. The item renderer has 2 states, "normal" and "active". Within Actionscript, I...

[Flex 4] How to bottom-align cells in a DataGroup using TileLayout?

I'd like to bottom-align cells in a tiled DataGroup, so that rows grow bottom-top instead of top-bottom. I guess what i'm looking for is something like RowAlign.BOTTOM, but that doesn't seem to exist. Rows should have fixed heights and gap, so RowAlign.JUSTIFY_USING_GAP and RowAlign.JUSTIFY_USING_HEIGHT won't work for me. Any hints? ...

Video and Images with Flex 4 on CD-ROM

I am working on a project where we have created an interface using Flex (started with 3, moved to 4 to get access to the included video player component) that has a video and photo gallery. Everything has been going great except I am running into issues when running on Mac. For some reason the videos play but the images do not show. T...

what is a good book to start learning Flex 4 and Actionscript 3

I am new to Flex programming. I am an experienced J2EE developer and have done a fair bit of RIA programming using non-Adobe technologies.. Can you please suggest one or two good books which cover Flex 4 and AS3 programming in depth. PS: I am not looking for beginner level books, I need an intermediate to advanced Flex programming bibl...

save screenshot image to file in Flex 4

I need the user of my Flex application to be able to save a snapshot of part of the UI to a local jpg file. I got the screenshot part down - can generate an image out of any given control. However, the only way I see to let the user save the image locally is to send to my server which would return it with the appropriate Content-Disposit...

Adding a spesific data item to a Data Grid --- Flex 4

Hi, I better explan what i mean: I have a Data Grid with automacticly genorated columns, i now need to add data items into a spesific row / column of this grid e.g. col 2 row 3. It dosnt have a data provider at the moment as i wish to be very selective about which data goes where. Which is the best way to do this? Thanks Jon ...

error: Attempt to access a dead clipboard

Hello, Can anybody tell me what can be the cause of this error or where can I find out more about this error? event.preventDefault(); try{ var itemsVector:Vector.<Object> = event.dragSource.dataForFormat('itemsByIndex') as Vector.<Object>; } catch(errObject:Error) { trace(errObject.message); } I...