flex

JSON Parse Error using FLEX and PHP

I am using JSON to parse data and connect to a PHP file. I am not sure what the problem is because I am a newbie to flex. This is the error I am receiving: JSONParseError: Unexpected < encountered at com.adobe.serialization.json::JSONTokenizer/parseError() at com.adobe.serialization.json::JSONTokenizer/getNextToken() at com...

FLEX: Make LineChart DATATIP constrain to vertical axis.

When making a line chart, Lets say its for business sales for different depts and horizontally is days and vertically is dollars. When you hover over a line it tells a dataTip tells you the sales for that dept. on that day. I want it to show all the depts at the same time, so say you hover over day 3, I want the dataTips for all depts on...

How to add children to a LegendItem?

I'm trying to add a Label to the LegendItem objects in my chart's legend, without much success. I extended the LegendItem class, and the constructor of the class I made is below. The problem is that the Label you see me trying to add doesn't appear in the legend item. It's there (I can find it with getChildByName), but it's invisible, fo...

How to discover a LocalConnection connection name?

I'm developing a Adobe Air application that should make use of a SWF file using LocalConnection. I've never used LocalConnection before, but from what I understood from the online reference, I need to specify the same connection name on both the sender and the receiver. Since I don't have access to this component source code, how can I...

Drawing a rectangle on a flex canvas is there a better way than ...

Hello, To draw a "selection rectangle" from the mouse down , mouse move then remove it on mouse up i currently do the following: My board is a canvas, On mouse down i create a new UIcontainer i set his borders. I update his width and height related the the mouse move position, on mouse up i remove this child UIcontainer. Do i have to ...

Is it possible to define a generic type Vector in Actionsctipt 3?

Hi i need to make a VectorIterator, so i need to accept a Vector with any type. I am currently trying to define the type as * like so: var collection:Vector.<*> = new Vector<*>() But the compiler is complaining that the type "is not a compile time constant". i know a bug exists with the Vector class where the error reporting, reports ...

How to Set a Break in HTTP in Flex 3

I don't think my HTTP is being called properly and I am trying to set a break in the HTTP. What is the correct way to do this? ...

Do you use an architectural framework for Flex/AIR development?

Given that Flex is still a relatively young technology, there are already a bunch of architectural frameworks available for Flex/AIR (and Flash) development, the main ones being Cairngorm and PureMVC. The amount of architectural frameworks is remarkable compared to other technologies. I was wondering how many of you use an architectural...

Reposition Air NativeWindow when Maximized?

Hi - How can I set the native window position when maximized? I've tried repositioning it upon the DISPLAY_STATE_CHANGE event which sort of works - but the window flashes at maximized size before repositioning, and more importantly the 'maximize' button of the window is still active. What I'm trying to achieve is simply a fixed width w...

Load and play embedded SWF file in Flex / Actionscript

Hello friends! I'm trying to create / use a pre-loader in my flex application. The preloader is a SWF file which has 100 frames (1 for every percent of the loader progress). Basically I am trying to Embed this SWF file in my application, display it on screen and change the frame number being displayed as the progress completes. The c...

How do I save a file in Flex with Flash 9

I am using Flex 3 under Flash Player 9. I have a datagrid that I want to export to Excel. I construct the Excel object (ByteArray) in Actionscript, and now I want to save it using FileReference. However, under FlashPlayer 9, FileReference only has a download method. Can I somehow point this download method to the Excel object? ...

Parse Error When Trying to Set a Break in Flex 3

I have been trying unsuccessfully to set a HTTP break in my Flex 3 project. Obviously, I am totally clueless about programming and I don't have many references. When I try to export the project I receive parse errors for the result handler and var fault string. I am attaching a code snippet of where I have been placing the break. <mx...

Sample Flex with Pojo on Server

I just started a new project and my boss wants us to change IDE from NetBeans to Eclipse, RichFaces to Flex. I have never worked with Eclipse and Flex before. Today I tried to make hello word with it on Eclipse but had no luck. Can some one post or give me link to Flex->BlazeDS->Pojo on Eclipse for Beginner (Dummy) :D Thanks Update: For...

Why is object returned from getDefinitionByName()?

In Actionscript 3, why does getDefinitionByName() return an Object when the docs say: Returns a reference to the class object of the class specified by the name parameter. Based on that, I would conclude that the returned object should be Class instead of Object. Can someone enlighten me why that is not the case? ...

Flex: Passing MXML file as XML Parameter

Hi, Is it Possible to pass MXML it self as parameter(XML param) from external application and load in Flash Player dynamically to create page. For e.g passing xml = <mx:canvas><mx:label text="hello" /></mx:canvas> to Flex and flex should create canvas with label control in it. Is there any example related to it. Thanx ...

LoaderContext and ApplicationDomain changes with Adobe AIR ?

Hello, I'm currently experimenting with loading external SWF files from both an standard AS3 application, and an AIR application. It seems that the AIR application doesn't act the same way a standard SWF run by the Flash Player does. According to the documentation, the applicationDomain property of LoaderContext is usable in an AIR app...

Generating and Displaying PDF file in Flex/Java

We have Flex on the front end and Java on the back end. When a user will request for a PDF file, request will go to the Java backend, where a PDF file will be generated using Jasper Reports. What we dont know is how to display this PDF file in browser; since we dont want to use JSP/Servlets etc - It has to be flex only. Any suggestions? ...

Why is there no assertError() function in FlexUnit?

It seems that most XUnit testing frameworks provide assertions for the times when you want to assert that a given operation will thrown an exception (or an Error in AS3 parlance.) Is there some "standard" way of doing this that I am overlooking, which would explain the absence of an assertError() assertion included with FlexUnit? I kno...

How can I reference the TextInput of an editable ComboBox?

I have an editable ComboBox component and I want to reference the TextInput that is shown, in order to programmatically select the Text in it. This is very straightforward on a TextInput: private function selectNameText():void { nameTextInput.selectionBeginIndex = 0; nameTextInput.selectionEndIndex = nameTextInput.text.length; ...

Printing a Flex DataGrid of variable height.

I have a report I need to print from a Flex Project I have written. The report needs to look like this: Header ----------- text, more text .----------------------------. |Data Grid of Variable Height| |============================| | | | | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ...