flex

FileStream.truncate() doesn't work after calling FileStream.readUTFBytes() (Adobe AIR)

I'm trying to read an xml file into memory, add a node, then write over the original file. The following code works just fine (it clears the file, then writes the new bytes over the top): var stream:FileStream = new FileStream(); stream.open(file, FileMode.UPDATE); stream.position = 0; stream.truncate(); stream.writeUTFBytes("<?xml ver...

One file per function...really?

I am relatively new to Flex/ActionScript, but I have been using a pattern of creating one file per function in my util package - with the name of the file being the same as the name of the function. Like if the file was convertTime.as: package util{ public function convertTime(s:String):Date{ ... } } This way I can imp...

How to get different country time into single page using flex or flash (action script 3) because getTime() used for get current time only.

i am beginner dont know how do display all country time into a single page using action script 3 in flex . do u know any example time code refer me . i will try that code . ...

How to embed a excel sheet inside the property sheet of a flex component?

I am trying to create a custom component in flex using mxml. I have created the property sheet for the custom component but it needs a button which onclick has to point to a cell in excel sheet from which data can be retrieved. How to go about this? ...

Flex AS3 - Dispatching Event between classes

Hi I thought I had custom events nailed in Flex, but seemingly not. I am trying to loosely couple my application by dispatching events between classes instead of using horrid parent.parent.parent statements. I have a ComboBox inside a custom HBox class... for simplicity I am doing the following public function onComboBoxChange(event:M...

Flex AS3 - Dispatch Event to all instances of ItemRenderer

Hi I have a List that uses a custom ItemRenderer. Is there a way for the owner (List) to dispatch a custom event I have created, to all instances of it's ItemRenderer? For example, I want to dispatch an event that will add text to a textbox within the item renderer. One or more item renderers will be able to respond to this event depen...

Changing credentials on client-side for Basic Authentication on Flex

I want to let the user automatically re-login in my Flex app, which uses Basic Authentication By the way, I have noted this StackOverflow question, which is relevant, but does not address the question of logging out client-side. For example, after user A logs in, user B comes to the browser, goes to the login screen (perhaps in a new t...

Flex: indeterminate ProgressBar in modal pop up?

Whenever I set a indeterminate progress bar in a modal pop-up via PopUpManager, there is no progress displayed. If I add the same ProgressBar to the parent regularly or make the pop-up non-modal it works. Is there a reason why it doesn't work in modal pop-ups? and a way to make it work? Thanks. ...

Flex 3: How can I change the Mouse Cursor when mousing over a Text Input?

In Flex, by default, when you mouse over a Text Input the mouse cursor is changed to the standard I cross bar. How can I change this cursor so the regular mouse pointer cursor is shown rather than the I cross bar? update: Well, it seems this process is dirt simple in Flex 4 according to this blog post: http://blog.flexexamples.com/200...

AdvancedDataGrid SummryRow

One update: I tried using the SummaryRow on the datagrid for its basic functionalities and it is working. Now, I need to embed the text in the summary fields. E.g. If one of my summaryfields returns me the count then it should be able to display 'TOTAL (count)' Is it possible with the summaryrow? Also, I need to have the data to be fo...

How does one chunk files using actionscript (flex)?

I am doing file transfers, but the filereference API doesn't support file chunking. Has anyone done this before? For example, I would like to be able to upload a 1 gig file from an AIR client to a custom PHP/Java/etc. service. ...

Selenium Flex API issue

Hi i am using selenium flex API integrated selenium RC.After launching the Flex application selenium fails to identify the fields inside the module box on the login page. Eror trace: com.thoughtworks.selenium.SeleniumException: ERROR: Error: The element 'logonId' was not found in the application Can you please provide a solution on th...

Limite the size of the modal of a “PopUp” in Flex ?

private function tileList_itemClick2(evt:ListEvent):void { img = new Image(); img.maintainAspectRatio = true; img.addEventListener(Event.COMPLETE, image_complete); img.addEventListener(ResizeEvent.RESIZE, image_resize); img.addEventListener(Mo...

Problem sending post request from Flex app to Ruby on Rails back end

I am having trouble getting my flex app to send a POST request to my Rails app. It seems to always send GET. This is my service declaration: <mx:HTTPService id="add_email_service" showBusyCursor="true" result="parseJoinResult();" fault="onJoinFault(event)" useProxy="false" /> In my application init function, I set the method to PO...

Problem capturing Japanese character input with Javascript in IE

I am trying to pass keyboard input from Javascript into a Flex app being displayed with Internet Explorer with the input language set to Japanese (using Full Katakana) in the Windows XP language bar. After an initial keystroke, I am passing focus from Javascript to a text field in Flex. Once the focus is in Flex, the IME wakes up and i...

How should I track widget renders?

I created a widget that users of my site will embed on their web sites. I want to track the amount of times a widget renders as well as the referring URL. The widget was written in flex and my back end is Rails. One obvious way to do this would be to have my widget make a service call to the back end to register a hit. However, when ...

ADG SummaryRow Sorting Problem

This is my 2nd post on SummaryRows. I am done with building the summaryrow and its working fine. But, one problem I am encountering is having the row moving in between the AdvancedDataGrid when I sort by some columns. If it stays on the TOP or BOTTOM of the grid, it is understandable. But it sometimes goes in between the rows. I am findi...

Flex. Embeded images in htmlText

Images can be included in TextArea control using htmlText property: ta.htmlText = '<img src="http://..."/&gt;'; How can i reference embeded images? An example: <mx:TextArea xmlns:mx="http://www.adobe.com/2006/mxml"&gt; <mx:Script> <![CDATA[ [Embed(source='../assets/img.gif')] public var img:Class;...

Class mapping in ZendAMF - actually useless?

Some concerns about ZendAMF.... one question about ZendAMF and the integration of Flex (AS3) with PHP5. What is the sense of definining Value Objects in PHP and perform all the explicit class mapping with AS3 classes, when type checking is not enforced anyways? Example: I create a Contact object in PHP, add some non-member variables an...

Errors in Flex 3 XML implementation? Rewriting xml:lang

So I'm working on a quick utility to allow simple editing for TMX files. TMX is basically an XML-based standard for storing multilingual translations. Anyhoo, I'm importing TMX into an Adobe AIR app via a File reference, then grabbing the file stream, slapping the UTF-8 characters into a string, and then that string into an XML object. T...