flex

displaying an image inline in TextArea.htmlText

I would like to display some smiley's inbetween text in my chatbox but when i add an image it gets displayed on a seperate line... Any ideas? <mx:TextArea id="myChat" width="271" height="238" backgroundColor="#ffffff" borderThickness="0" editable="false" enabled="true" horizontalScrollPolicy="off" wordWrap="true"> <mx:htmlText> ...

Create a weak reference to an object

Is it possible in Actionscript 3 to create a weak reference to an object, so that it can be garbage collected. I'm creating some classes to make debugging easier, so I don't want the objects to hang around in memory if they are only referenced here (and of course I don't want to fill the code with callbacks to remove the objects) ...

ActionScript/Flex: bitwise AND/OR over 32-bits

Question: Is there an easy way (library function) to perform a bitwise AND or OR on numbers larger than 32-bit in ActionScript? From the docs: "Bitwise operators internally manipulate floating-point numbers to change them into 32-bit integers. The exact operation performed depends on the operator, but all bitwise operations evaluate e...

How to put an image (say, PNG) on a graphics in Flex 3?

I'm new to Flex, and I'm trying to write a simple application. I have a file with an image and I want to display this image on a Graphics. How do I do this? I tried [Embed]-ding it and adding as a child to the component owning the Graphics', but I'm getting a "Type Coercion failed: cannot convert ... to mx.core.IUIComponent" error. ...

.net http handler redirect to rtmp and flex

I have an http handler (.ashx) that I use to display an image or swf or flv based on the id. So, for instance http://www.mysite.com/myHandler.ashx?id=1234 displays the image for id 1234. I am using this as a source for an image tag or swfloader or videodisplay in flex. In my handler if the item is a video I just redirect the request to t...

What needs to be in a .war file to deploy a Flex application?

I've been using Flex Builder 3 to create Flex applications that are part of larger Flex / Java project using LiveCycle Data Services. Flex Builder creates and deploys the .war file, which is convenient for the development cycle, but I don't understand what the .war file has to contain in order to deploy and run. I've found through tria...

What overhead is there of using an MXML file in Flex vs. a plain actionscript class?

I find it much easier to write MXML classes with embedded Script than trying to make an actionscript file. I was wondering however what kind of overhead there is of using an MXML file - in terms of file size. I'm not especially concerned about performance, but if that is relevant would be interested in any findings. Obviously I'm talki...

Flex - Is there a way to specify what direction a ComboBox will open?

Maybe I should further qualify this - Is there a way to specify which direction a ComboBox will open without copying and pasting the entire ComboBox class and ripping out the code where it determines which direction it will open in... I'm my specific case - I need it to open upwards - always. UPDATE: You can't fix this by subclassing ...

General tips and techniques for minimizing the size of Flex applications.

I really like the Flex framework, however I routinely deal with SWF files that are ~ 500KB. I don't know at what point a file considered to be "too big" to be served on the internet, but I would assume that a 500KB download just to use a web application would certainly annoy some users. Are there any tips or techniques on reducing the...

Browser history for Flash (or AJAX)

What is the best tool / practice to enable browser history for Flash (or AJAX) websites? I guess the established practice is to set and read a hash-addition to the URL like http://example.com/#id=1 I am aware of the Flex History Manager, but was wondering if there are any good alternatives to consider. Would also be interested in a ge...

What's the difference between String(value) and value as String?

Just to make this clear - what is the difference between: String(value) and value as String What are the cases where you would use one over the other? They seem interchangeable... ...

Access savedThis property in Function

When I'm in the flash debugger, and I have some callbacks saved, I can see that the functions have a property named savedThis that is very usefull to know where that callback came from. I'm trying to access that property from code, but for some reason I can't. callback.savedThis throws an Error because it can't find the property, proba...

Best place to put prototype code in Flex project

I'm making a Flex project, using the Cairngorm library, and trying to keep the code in a good MVC structure. I just added some code to add a prototype function to a built-in class (I added the method "contains" to Array), and I'm wondering what you would consider the best-practice for where to put this code in my project structure? ...

Sharepoint Lists - GroupBy?

Hello, I'm trying to get data from a Sharepoint list and put it into some Flex graphs. I can call the list data just fine using a CAML query, but I want to use a GroupBy to consolidate the rows by Teams. So, for example Team 1 may have 20 records, Team 2 may have 8 records, and Team 3 might have 25 records... Instead of showing 53 rec...

Flex custom item renderer for the displayed item in the combobox

I am using a custom item renderer in a combobox to display a custom drawing instead of the default text label. This works fine for the dropdown list but the displayed item ( when the list is closed) is still the textual representation of my object. Is there a way to have the displayed item rendered the same way as the one in the dropdo...

Flex - XML Serialization and De-Serialization of nested Object structures

Our Flex app would like to work with requests and responses as object graphs (nothing unusual there) e.g. response becomes the model of some view, and would be a structure with several layers of nesting. ** Now, ideally we would like to use the same client (and server) side objects for different message formats e.g. XML and AMF, and hav...

Any advice on 'breaking' an object out of its layout in Flex - for animation purposes?

If I have an object in a layout in Flex what is a good way to 'break it out' of that layout to be able to animate it. For instance I have an image and a caption arranged at an angle. I want to make the image 'zoom out' slightly when the mouse rolls over it. Since its in a layout container is active if I were to resize it then obviously ...

How do I bind a function to a component programatically in Actionscript?

I am trying to provide my own labelFunction for a CategoryAxis programatically but am completely stumped. The regular way is to do it in your MXML file, but I want to do it in my Actionscript file. The regular way of doing it is: <mx:Script> <![CDATA[ private function categoryAxis_labelFunc(item:Object, prev...

How can I make datagrid height is equal to data content in Adobe Flex

In adobe Flex datagrid height is equally to fix height . I want to make datagrid height is depend data . ...

Image loading icon for flash/flex ?

You often see those little 'petal' animations while an image or .swf file is loading in a Flash / Flex application. Do I have to steal this from someone or is there a standard one available from somewhere. i would think there is somethin standard because everyones looks the same! Ideally I want a flex Image control that displays such a...