Apache flex How can I unit test Flex applications from within the IDE or a build script?

I'm currently working on an application with a frontend written in Adobe Flex 3. I'm aware of FlexUnit but what I'd really like is a unit test runner for Ant/NAnt and a runner that integrates with the Flex Builder IDE (AKA Eclipse). Does one exist? Also, are there any other resources on how to do Flex development "the right way" besides the Cairngorm microarchitecture example?

Apache flex Is Flex development without FlexBuilder realistic?

Is it realistic to try and learn and code a Flex 3 application without purchasing FlexBuilder? Since the SDK and BlazeDS are open source, it seems technically possible to develop without Flex Builder, but how realistic is it. I would like to test out Flex but don't want to get into a situation where I am dependent on the purchase of FlexBuilder (at least not until I am confident and competent enough with the technology to recommend purchase to my employer). I am experimenting right now, so I'm

Apache flex Dynamically Positioned Flex Components

I have a requirement on my current project (a Flex app which will be run in Flash player) to display an arbitrary subset of the components on a form while hiding all the other components based on certain aspects of the application state. There are about a dozen different text boxes and drop downs, but some become irrelevant based on previously entered user data and we don't want to display those when we get to this particular form. Every time this form is displayed I could need to show any one

Apache flex Flex: Figure out when the running swf was compiled?

Is there anyway in a flex application to figure out (in runtime) when the running swf was compiled? I'd like to compare this with the latest file version of the swf on the server and detect if there's a newer version on the server and if so force the user to reload their browser to get the new version. I need this to also work with swfs from the cache.

Apache flex Forcing Flex to update the screen?

This may be a bit of a beginners question, but I can't for the life of me figure it out. I'm using flex to develop a GUI for a large project, specifically a status bar along the bottom. Within my StatusBar class is a ProgressBar, which other classes doing work can tell to update(change bar completion and label) as they progress. The problem I'm encountering is that flex won't update whats shown on the screen until it's too late, for example ProgressBar initialized, 0% done some class sets the

Apache flex Creating an Instance of MXML

Is it possible to create an instance of the main MXML and use it inside the ActionScript class. public var obj:classname= new classname(); When i try to call a components id through obj.textfieldID... it does not... though obj is an instance of the classname.mxml.

Apache flex Can i create multiple itemrenderer for a datagrid column in flex?

I actually wanted to create an itemrenderer which will contain below code : <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="0" height="0" > <mx:Label text="{data.xval}" /> <mx:Spacer width="100%" /> <mx:Image source="edit.gif" width="16" toolTip="Edit" /> </mx:HBox> Now when i click on the image datgrid column should be editable, for that i am using a textinput as an itemeditor. Now i also want to highlight all those cell for this datagrid colu

Apache flex Flex: Sort -- Writing a custom compareFunction?

OK, I am sorting an XMLListCollection in alphabetical order. I have one issue though. If the value is "ALL" I want it to be first in the list. In most cases this happens already but values that are numbers are being sorted before "ALL". I want "ALL" to always be the first selection in my dataProvider and then the rest alphabetical. So I am trying to write my own sort function. Is there a way I can check if one of the values is all, and if not tell it to do the regular compare on the values? He

Apache flex Flex Call ItemRenderer inside a new panel()

I have the below function creating new panels inside my ViewStack.. This works fine and they are great.. However i am trying to put some content into the panels but i am failing. private function viewstack_addChild(name:String):void { //if (accordion.numChildren < MAX_CHILDREN) { var p:Panel = new Panel(); p.id = name; p.name = name; p.title = name; p.percentWidth = 100; p.perce

Apache flex Using a For loop with an array and addEventListener

I have this map I'm creating in Flash. You click on a state, then you can click on an icon to view a tooltip/popup of some information. What I was trying to do was instead of creating new functions and event listeners for every different icon is to use a for loop...but it's not going so well. I haven't touched AS in a long time so bear with me :) var ToolTipMC = map.toolTip; ToolTipMC.alpha = 0; var places:Array = new Array(); places = [ "map.paulsens", "map.plutonic", "map.jundee", "map.wilun

Apache flex Flex scrollbar styling issue

I'm trying to style vscrollbar and hscrollbar inside a Vbox.But there's always a white square thing at the right bottom cornor which can not be styled. My CSS is: ScrollBar{ downArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_down.png"); downArrowOverSkin: Embed(source="assets/images/scrollbar/arrow_down.png"); downArrowDownSkin: Embed(source="assets/images/scrollbar/arrow_down.png"); upArrowUpSkin: Embed(source="assets/images/scrollbar/arrow_up.png"); upArrowOverSkin: Embed(sourc

Apache flex Cancel a net stream to fms server from flex

Is there a way to cancel a netstream publish from flex to a flash media server? The issue is I have code where I can Start/Stop a recording to my Flash media server. However in my front end I have a cancel button which allows the user to cancel the current recording and all this code essentially does it close the netstream. But the issue is it still creates the file on my flash media server even though the user has canceled the stream. Is there a function that I can call that will clear up

Apache flex Flex: List with VBOX-type (smooth) scrolling?

I have a list control that uses a custom itemRenderer and custom itemEditor. The itemRenderer/Editor are textarea controls with at least 3 lines of text each. The default scrolling nature of a list control is by Item, rather than by some number of pixels, the way a VBOX scrolls. I want my list control to have more of a word-processor look, where scrolling down will scroll one line of text at a time. Because each list item holds at least 3 lines of text, scrolling down skips all three and pos

Apache flex How can I programmatically enter the edit mode in a Tree Control inside a Flex Application

I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubleClickEnabled="true", doubleClick="startEditMode()", and editable="true". With these functions I can detect a double click and I can change the editable property to true based on a double click. The problem is that after I double clicked on a Item i have to click once more to really enter the edit mode. That doesn't seem to be intuitive at all... Does anybody know

Apache flex flashdevelop vs flex builder

I just started making games and I decided for my next project to use either flashdevelop or flex builder. Reason being is because you can embed just about everything and for licensing purposes and it recommended the the game is compiled into one file. flex sdk is good with that type of stuff. As of right now I decided to use flashdevelop. but recently it's been kicking my behind. First I wasnt able to use ui class (e.i. buttons, and textboxes) probably because of something stupid I did. Now fo

Apache flex Spring + Flex + BlazeDs configuration

How Flex knows to call the particular service in Spring framework. I give in Flex side: <mx:remoteObject id="myObj" destination="mySpringservice"/> And remote-config.xml file: <destination id="mySpringservice"> <properties> <factory>spring</factory> <source>mySpring</source> </properties> </destination> And how server knows to the particular flex remote object calls to particular spring service. any thing need

Apache flex Binding key/value pairs loaded from xml

I want to load key/values configuration pairs stored in XML file. To bind a collection of data i know i need to use the ArrayList class, but the problem is that i want to be able to bind the loaded values using their corresponding keys and not by their indexes in the ArrayList object. For example i want to be able to do this : <mx:Text id="errorText" text="{Config.params['someKey']}" /> instead of : <mx:Text id="errorText" text="{Config.params[0]}" /> where Config.params is A

Apache flex Does window.open not work inside an AIR html component?

I have a component in AIR like so: <mx:HTML id="html" width="100%" height="100%" location="https://example.com" locationChange="dispatchLocationChange(event)" /> The page it loads contains this: <a onclick="alert('onclick')">Alert</a> <a href="javascript:alert('js')">Alert</a> <a onclick="window.open('http://www.google.com','_blank')">new window</a> The 2 alerts both work. however nothing happens when

Apache flex How can one bake custom data into an Adobe AIR distribution?

I would like to have an AIR application available for web download, but have some data customized per-user-download. Think CD-key, or in this case an encryption key and user name, so that the downloaded version can connect to a website and know who it is that downloaded it. As a fail-back if this is not possible, I could require the user to log in once and set one up and then store it locally, though I'd like to make it one-click and seamless. However, if the latter is the only way to do so, wha

Apache flex Issue trying to get a example Parsley app working

I'm getting started on a new project at I'm trying to get an Parsley example to work. Here is the demo url: http://files.152.org/flex_examples/parsley/ View source is enabled I have parsley registered in the app and can get the albums in the left column loaded. The part I'm stuck at is trying to get a message to PictureTile.as so images will load in the TileList. Can anyone that has Parsley experience lend a hand?

Apache flex Trigger an itemEditEnd event within the itemEditor

This might be an easy one for you DataGrid experts out there. I following an example for adding rows to a DataGrid dynamically from within a row http://www.switchonthecode.com/tutorials/adding-dynamic-rows-to-flex-datagrid My tweak that I am trying to acoomlish, is to have a custom itemEditor that is a form with two TextInputs and an OK button. For the life of me I can't get that button to trigger the DataGrid's itemEditEnd event where I have some processing before I call destroyItemEditor. I

Apache flex Flex Itemrenderer issue with DropDown Control

I want to show rich text in dropdown control, for which I am using the following renderer. <?xml version="1.0" encoding="utf-8"?> <mx:HBox 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:Script> <![CDATA[ import spark.utils.TextFlowUtil; ]]> </fx:Script> <s:TextArea textFlow="{TextFlowUtil.importFromXML(new XML(data))}"/> </mx:HBox> The ren

Apache flex Interactive Map for Shopping Malls

I am trying to build a product that shows users interactive maps and helps them navigate through a shopping mall. For that I am thinking of building a content management system(in Flex 4) so that map creation and shops identification process can be streamlined and non-technical users can use it. Any ideas on where to start or which APIs to use? Regards, Raheel Imtiaz

Apache flex Flex (AIR) setup print time

How can i set print time for flex printjob. when the time is ripe my program will automatically print my job eg. i want to print my job at 11.00 AM i will set print time in my program to 11.00 AM when time is 11.00 AM flex will automatically print my job

Apache flex groovy build script to build a flex project

I am trying to build a flex (and java) project using a groovy build script. See documentation here - http://groovy.codehaus.org/Using+Ant+from+Groovy I have the build working for the java project, but for some reason it does not work for the flex project. It fails because it could not create mxmlc task. My flexTasks.jar is in the $CLASSPATH environment variable. What is wrong here? Has anyone ever done this kind of setup before?

Apache flex FLEX + AIR + REST - URLRequestMethod.PUT

Can someone show me an example in actionScript to do a POST request? In flashbuilder's dataservice it's not possible to make a PUT/DELETE :/ Someone got a workaround? Here's the jQuery Version var catalogObject = { 'token': 'current_token', 'catalog': 'KAT02',}; $.ajax({ type: "PUT", url: "/api/json/user/catalog/", data: $.toJSON(catalogObject), success: function(data, textStatus) { }, dataType: 'json' }); And here my try (generated from flash builder dataservice): operation = new mx

Apache flex Pre-loader Using Flex 4?

is it possible to create a pre-loader using plainly Flex 4? I've seen tutorials on how to make one but each of them requires that I have Flash Professional or Flash Catalyst. I have absolutely no experience when it comes to implementing pre-loaders as well as making one. So please try to elaborate a little more. Thanks!

Apache flex Flex - percentage height

How can I limit the size of a child container with percentage width/height of 100%? Example: <mx:HBox id="container" width="100%" height="100%"> <mx:HBox id="scrollContainer" width="100%" height="100%"> <!-- keep this content limited to the size of "container" --> <!-- I also want to use the scollers from "scrollContainer" --> </mx:HBox> </mx:HBox> Right now the content inside "scrollContainer" will overflow once its bigger than "co

Apache flex Change project from MXML to AS error

I am trying to change a Flex mobile application using MXML to describe views, to one which uses AS3 to create the views. I changed: BEFORE: Assessments.mxml <?xml version="1.0" encoding="utf-8"?> <s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstView="view.LoginView"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <

Apache flex Spark Datagrid memory usage with dynamic columns

I have a question about the Spark DataGrid and how it works in terms of garbage collection. What I'm finding is that if I dynamically add and remove columns from the DataGrid at runtime, the GridColumns and ItemRenderers never get freed from memory. For instance, if I have a list with 10 items and I create 10 columns, there will be 100 ItemRenderers and 10 GridColumns. If I remove all of the columns, they are still there. If I add 5 columns back, it does not appear to instantiate more GridColu

Apache flex Flex Mobile data security

I had a search around but I have not really found what I am looking for. I am developing a flex application for mobile devices. This application will sync customer data down from an api to the mobile device. but once on the device I plan to hold it in sqlLite DB. How can I secure this data? I know that I could hash it but I guess that that someone would be able to decompile the application and get the hash key. I am new to flex and mobile development so there may be a really obvious answer that

Apache flex How to stick an image to cursor by clicking on the image in flex 4

I'm having a panel which shows an image and control bar with buttons in the form of thumbnail image of right mark. When a user clicks on the thumbnail of right mark I want to stick the thumbnail image of that right mark to the mouse pointer and when he clicks on the image, the thumbnail related image should be paste on the image. Same concept of drag and drop with click event.

Apache flex What is source in ArrayCollection and XMLListCollection?

What is the role of source for an ArrayCollection or XMLListCollection? Is it used just once - when constructing a new ArrayCollection or XMLListCollection object and is it copied to some internal data structure of that object? Because nothing is updated when the source Array (or XMLList) is being modified and the documentation confirms it too: The underlying XMLList for this collection. The XMLListCollection object does not represent any changes that you make directly to the source XMLList o

Apache flex Why is AIR NativeProcess not supported?

I'm building a desktop app using Flash Builder and I need it to run a .exe program. I downloaded and installed the latest AIR SDK, put it in my Flash Builder sdks folder and had my project use it. Now i don't have any compiler errors, but: if(NativeProcess.isSupported) { var file:File = new File("C:\Torres.exe"); var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.execut

Apache flex How cairngorm framework works internally

I had gone through many documents, no where mentioned how cairngorm framework works internally, means, how cairngorm Event, frontController, BusinessDelegate,ServiceLocator,Commands works and why we are extending or implementing cairngorm class like ICommand, IResponder and cairngormEvent. Thanks, Ravi

Apache flex recommended way to return multiple variables from math-crunching AS3 function?

I'm new to Actionscript programming. I'm trying to figure out what is the best way to return multiple variables, each having a different data type, from a function. For example, if a function needs to return variable aa ( a string) and variable bb (a number). The function I'm using just crunches a lot of math, and doesn't relate to an object in a GUI. One method I got from a Google search used an Object, but as (I think) this requires me to create a class, I wondered if there was a simpler way

Apache flex Populating View from db

Community! I have selection Views, based on lists, that the user can select. Ultimately, they reach they're final selection which brings them to a View that is always the same, but populated with information from db (sqlite at the moment, but I'm willing to go xml). Problem: How can I reuse the same View and populate it with the db info based on user selection/input? I don't need code, just some architectural suggestions/guidance about how I can reuse a single view to handle whatever reques

Apache flex how to manage windows in external applications

I have 2 AIR applications (A and B) that are able to communicate via a LocalConnection object. I've verified that messages are definitely being sent/received appropriately. I want to be able to have A tell B to come to the front. Both applications are full screen: stage.fullScreenSourceRect = new Rectangle(0, 0, 1080, 1920); stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; I've tried several permutations, but as of yet nothing seems to work. private function initSlave(channel

Apache flex FlashBuilder loosly coupled and reusable component architecture

I want my mxml or actionscript components to be reusable and loosly coupled. I am wondering if it is good practice to use the FlexGlobals.topApplication to dispatch and listen for events. For instance I want my login component to dispatch events to the topApplication so when i reuse that component in a different project I won't have to change anything being all applications have a topApplication. My other option is to have a separate static class to handle event dispatching but then I am creat

Apache flex Flex: Reorient PopUp on browser window resize

My footer has a bunch of tabs, each of which open up a popup window. There is a glitch though, once a popup window is open, if I resize my browser then my popup window does not auto-resize itself to match the new window configurations. Essentially, the dimensions of the popup window are static instead of being dynamic. I want to remove this glitch, but I am not sure how I can go about achieving this. This is how I am configuring the dimensions of my popup window. var stagePt:Point = new Poin

Apache flex Error #1065: Variable mx.core::RSLData is not defined

I'm attempting to use loadStyleDeclarations on a remote SWF with the following code (using Flex 4.6): <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" initialize="GetFonts()"> <fx:Script> public function GetFonts():void { styleManager.loadStyleDeclarations("http://dev.mycompany.com/fonts/fonts.swf"); fontLabel.setStyle('fontFamily',

Apache flex AdvancedDataGrid and custom sort

I have a simple flex dataProvider like this : private var ac:ArrayCollection = new ArrayCollection([ {a:"a_1", b:"b_1", hour:"16:00:00"}, {a:"a_1", b:"b_2", hour:"16:30:00"}, {a:"a_2", b:"b_2", hour:"17:00:00"}, {a:"a_3", b:"b_3", hour:"15:00:00"}, {a:"a_3", b:"b_3", hour:"16:00:00"} ]); I want to use an AdvancedDataGrid component to group these data on a and b fields and sort on hour field. For example here I

Apache flex Flex 4: Window's minimum size is too big

I tell the window to create with a size of 32x32 <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" showStatusBar="false" width="32" height="32"> but it appears like this The yellow box is an image that's 32x32.

Apache flex Hillel Coren's AutoComplete in Flex 4 doesn't let enter text nor shows list

Did anybody succeed working with this component in Flex 4? Thanks. <hillelcoren:AutoComplete id="blackWhiteListsComplete" matchType="beginning" width="80%" backspaceAction="focus" labelField="name" allowMultipleSelection="true"/> I'm getting: Error: FTETextField does not support setting type to "input". at mx.core::FTETextField/set type()[E:\dev\4.y\frameworks\projects\spark\src\mx\core\FTETextField.as:1720] at mx.controls::TextInput/commitProperties()[E:\dev\4.y\frameworks\proj

  1    2   3   4   5   6  ... 下一页 最后一页 共 66 页