flex

[Flex] -Rotating image

Hi, To image rotate I used Matrix class. Rotating work very well, but if I try scroll - image hide. How to solve this problem ? How to rotate big Image ? Flex Code[Rotate]: var tmpMatrix:Matrix = wImage.transform.matrix; var oHeight:Number = wImage.height / 2; var oWidth:Number = wImage.width / 2;`` tmpMatrix.translate(-oWidth, -oHeigh...

Flex: Databinding on object

Lets say I have the following: public class MyObject { [Bindable] public var foo:int = 3; } ... [Bindable] var _obj:MyObject = null; What's the best way to bind foo so that this binding is updated when _obj is set to a new instance? I've tried: <mx:Label text="{_obj&amp;&amp;_obj.foo}"/> But it isn't pretty. Can I express th...

AVM2 and ABC (Adobe's ActionScript bytecode format) spec licensing.. can I use it?

Google is failing me on this one. Let's say I have some ECMA script that I've compiled to an ABC bytecode file using the compiler in the Open Source Flex SDK. Is it within the terms of use (That I can't seem to find) for me to use the AVM2 specification from adobe to create a new interpreter for this file? The best I can manage is a s...

Flex: Updating a Tree control

I've a tree control with checkboxes that uses the control from http://www.sephiroth.it/file_detail.php?id=151# Somehow I can't get the control to update when I change the dataProvider (i.e. by clicking a checkbox) the only way I can get it to update is to use the scrollbar. How do I force the update? I've tried all possible methods I ca...

Actionscript: how can I determine the type of some loaded content?

I have a situation where I'm loading some content using a URLLoader but the content could either be a video (flv or swf) an image(jpg or png or gif) or a swf. The trick is, I need to react in different ways based on the type of content that's loaded without necessarily knowing what type of content it is beforehand. I currently have con...

Load images in the background using Flex

Hey guys, In my Flex application I call a web service that returns a few dozen "items" where each item has an associated image url. I create a model based on this data and bind the image components source property to the url string. I'd like to have more control over the loading of these images, particularly the order in which they are...

Ghost/translucent caption inside text input ?

First, what does one call the ghost caption that appears in a text edit if that edit has no real text? Second, has anyone invented that particular wheel for Flex text components? Thanks ...

Fit Flex datagrid to data

I have rows of text data that can vary between 0 and 100, and all need to be visible on the screen at one time. The default behavior is fine for the grid until the rows * rowHeight > gridHeight. Basically I need a hook into the item height, or row height to calculate it based on the height of the grid. I've set paddingTop and paddingB...

How to get Flex to see a .NET Webservice session when I use the proxy auto-generation?

So I have a Stateful .NET webservice (C#) that I would like Flex to use. The only problem is that I don't see a cookie being passed, even though I have the WebMethods decorated with: WebMethod(EnableSession=true) I can't seem to figure out if it is an issue with Flex or .NET. Does Flex 3 (as3) pay attention to the session cookie aut...

How to fix closure problem in ActionScript 3 (AS3)

Hello, In the code below I'm trying to load some images and put them in the stage as soon as they get individually loaded. But it is bugged since only the last image is displayed. I suspect it's a closure problem. How can I fix it? Isn't the behaviour of closures in AS3 the same as in Java Script ? var imageList:Array = new Array(); im...

google maps flex API: handle both double and single clicks?

how do you tell a single mouse click from a double click? my single click listener seems to be trapping all the double clicks as well: tz locator it's a known issue for the flash/flex API but the js workaround doesn't seem to handle both either: code.google.com ...

Flex 3 - Must I add components before setting their attributes when using AS3?

Let us say that I have a Flex 3 mxml component, call it A. A has a get/set attribute called 'b'. Within A I have another internal component C, which is specified using mxml. When "instantiating" component A within mxml, I can specify the value of b at declaration, and everything works fine. However, when I initialize the component using ...

Using HTML formatting to output variables in Flex/MXML

Hi, I'm trying to output a sentence containing 4 variables, with their values emboldened using the following code: <mx:Text width="100%" y="307"> <mx:htmlText> <![CDATA[Showing data from <b>{labelStartTime.text} {labelStartDate.text}</b> to <b>{labelEndTime.text} {labelEndDate.text}</b>]]> </mx:htmlText> </mx:Text> Ho...

What is the best way to get the minimum or maximum value from an Array of numbers?

Let's say I have an Array of numbers: [2,3,3,4,2,2,5,6,7,2] What is the best way to find the minimum or maximum value in that Array? Right now, to get the maximum, I am looping through the Array, and resetting a variable to the value if it is greater than the existing value: var myArray:Array /* of Number */ = [2,3,3,4,2,2,5,6,7,2]; ...

GWT vs Flex vs ?

My company is trying to migrate away from a .NET application to something that is purely web-based, and very "ajaxy". The original .NET app is fairly interactive, roughly equivalent to Google Maps as far as user interaction is concerned (zoom, pan, annotate features on a vector map). Our .NET developer is really taken with Flex2. I'll...

Where is "int main()" in my Flex application?

Well, not literally, of course, but: I'm new to Flex and I'm trying to figure out where to put the code that I want to run when my app starts. In my example, I have a tree control defined in the markup, and I have AS code that can populate it from a local file or a webservice. How do I bind the one to the other such that when the contro...

When I extend an MX class in Flex, how do I reference it in the MXML?

Meaning, if I have: <mx:Tree> <!-- ... --> </mx:Tree> and I want to change some of the control's behaviour or add functionality, by doing (in AS): class ChristmasTree extends mx.controls.Tree { // ... } how do I change the MXML so that my class is used? In the manual it says how to extend components via MXML, but how do I ...

Making a horizontal list with clickable images as members

I want to make a horizontal list in my application, which will display images. While this is quite trivial, I want the image to open a flex alert box (the built in one) and display some text. For example, I will have an image of the .NET logo and I will enter some text somewhere (like in a collection), and this text will be displayed in ...

How to calculate the size of a sprite?

I have a sprite that I do some custom drawing in, but I would like the container to know where to position the sprite properly. To do this, the container needs to know how big the sprite is. UIComponents go through a measure stage, but sprites don't . How do I calculate the size that a sprite will be? Edit: I'm doing the drawing in Even...

How to create custom MouseEvent.CLICK event in AS3 (pass parameters to function)?

Hello, This question doesn't relate only to MouseEvent.CLICK event type but to all event types that already exist in AS3. I read a lot about custom events but until now I couldn't figure it out how to do what I want to do. I'm going to try to explain, I hope you understand: Here is a illustration of my situation: for(var i:Number; i <...