flex4

Adobe Flex: Event.COMPLETE for Image does not fire when image loaded from Bitmap

Hi there, I have a weird issue. I can get Event.COMPLETE to fire when I set image.source = byteArray; BUT When I manipulate the byteArray - convert it to Bitmap and use image.source or image.load to load it, the bitmap gets loaded properly into the Image component; BUT Event.COMPLETE never fires. What might be wrong here? I have ad...

MovieClip.onResize event? how?

I have a an swf, called 'controls' that I created with flash cs4. I upload the controls.swf to my web server. I create an application in flex and it loads the external swf controls into itself. So far I can manipulate the controls.swf via my flex app. I created a class in my external swf, but I need to add some onResize event/check to m...

Populate a datagrid from a Loop

I'm just starting to learn flex and AS3 I'm trying to get information into a datagrid that originates from a mathmatical formula. For example if I have 100 and I subtract 5 from it and continue to do so until it reaches 0 so my grid would be something like: 100 | -5 95 | -5 90 | -5 ... ... 5 | -5 0 I'm guessing that it needs to do so...

Generate a flex image from a hidden component

Hi all, I'm trying to put an image, generated from some text, in a RichEditableText. Since it's a styled text, I thought about putting it another RichEditableText, style it, then print it to a Bitmap to use as source for InlineGraphicsElement. I use the following code to do that var txt:RichEditableText = new RichEditableText(); txt.te...

Flex4, centering and resizing a image inside a group container

I'm looking for the best way to get a flex 4 image object to resize and horizontally center whenever its parent container (a custom component based on group) resizes. I cannot set horizontalCenter="0" to accomplish the image centering because I use a move transition to "slide" the image in and out of view. I'm externally setting the im...

flash builder(flex): VScrollbar for a DataGroup, how to scroll down by default?

i have an HGroup that contains a DataGroup with an ArrayCollection for a dataProvider. the DataGroup has a VScrollBar attached to it. how can i make sure that whenever new rows are added to the ArrayCollection, the dataGroup will scroll down ? this window is gonna be used for a chat application so whenever new rows are added i need to...

Find out if Flex component (tree) ist scrollable?

How can you find out if a Flex Component (in my case the tree) is scrollable? I tried it like this if (_listOwner.height < _listOwner.measuredHeight) { // so stuff } from within the tree's item renderer but didn't succeed. Access to the tree's scrollbar is private so that I can't get the info that way. ...

Best way to dynamically load an xml configuration file into a Flex4/Flash movie at runtime?

I've got a rather simple question about loading in an xml file at runtime in a SWF. I've found a couple different methods to load in the xml. myXml.load("file.xml"); HTTPService object URLStream object What is better way to load an xml file that always has the same name and is located in the same folder as the SWF on the web serve...

Flex - Show text at specific video points

I'm using the VideoPlayer component in flex 4 to display a clip. I have about 3 or 4 notes that I want to appear at specific points of the video, sort of like caption but not quite. I'm trying to figure out how to use VideoPlayer time to cause another element to appear (text area with the note in it), but can't seem to get it. I'm a bit ...

Flex 4 skins & binding

Hi All I love skins in Flex 4 - they offer a really nice separation between logic and styling. I was wondering how people use binding in skins. The easiest way is to just bind in the skin: label="{ hostComponent.model.buttonLabel }" you can also use 2 way bindings: selectedItem="@{ hostComponent.model.selectedItem }" but you cou...

red5: can i make shared objects read only on the client side?

Hiya. I'm using shared objects for a chat application, but i want my red5 to monitor every string that comes in. how can i make sure that the client side won't be able to modify the shared objects ? In my case the client side is written using adobe flash builder beta 2 (flex4) thanks! ...

Spark List reusing the wrong item renderers

I have a List component using multiple item renderers determined by the itemRendererFunction. When I set the data the first time, it works as expected. Then, when I set the data a second time with new data, it doesn't call the itemRendererFunction and tries to reuse the current renderers even though they don't match the data. Once I scro...

Dynamic resizing of absolutely drawn Flex 4 component (drawing code generated by Catalyst)

Hi, I have some code generated by Flash Catalyst, and I need it to be resizable & rotatable. At the moment, I have no idea how to get this to happen. The basic idea is: I have a windmill. windmill contains windmillBlades. windmillBlades rotate. windmill resizes. When the windmill resizes, the windmillBlades should scale dynamicall...

Flex 4 Layout Mechanism

Hi All i am new to flex4 i want to know about the s:layout tag which is written below the Application tag, is this layout applicable to the entire application or the elements below the layout tag. ...

Flex 4 dynamically resize parent container to contain children

Is there an easy way to make a parent container (eg Group) resize when it's children resize? Below is a little example app. When I put the 200x200 'food' in the 'stomach' the stomach & it's containing 100x100 'body' should resize to contain the food. Any ideas? (from this gist http://gist.github.com/301292) <?xml version="1.0" encodi...

Definition could not be found error compiling ClassReference in CSS file to Swf file

Hi All I am compiling my css files to swf files and loading them at run time. I have no problem compiling these and using ClassReference statements most of the time: .miniCashLadderGridStyle { color : #2a2a2a; backgroundAlpha : 0; borderSkin : ClassReference("mx.skins.ProgrammaticSkin"); headerSortSeparatorSkin : ClassR...

How is mx:DataService in LCDS different from Flash Builder 4 DCD data features?

LCDS Data Management via <mx:DataService> (only available with fds.swc from LCDS) can do pagination and data sync, but FlashBuilder 4 + Flex4 can do them as well! See the following Flex4 + FlashBuilder 4 tutorials: Manage the access of data through paging Using Data Management to Synchronize Data Updates How do these 2 data managem...

Flex4: How to add a child to spark Scroller in AS

I want to convert the following code to ActionScript (mxml works fine): <mx:Panel title="Some Title" width="400" height="300"> <s:Scroller width="100%" height="100%"/> <mx:ColumnChart id="myChart" attribute="..." /> This doesn't work straight forward: setupChart(); //setup myChart var scroll:Scroller = new Scroller(); scroll.p...

When using a container powered by itemrenderers, is there a way to make the rendering not stall?

I'm developing on Flex 4. I have a datagrid container and custom itemrenderer with a text field, a button and a few boxes. Every time some data is displayed, the app stalls for a second or two before rendering completely. Is there any way to make it render more fluidly or render one after another...? ...

How do I handle click event in Spark List control in Flex 4

I have a s:List component. I want to handle a click event to know what list item is selected. I don't see Click event in s:List. Any workarounds? Thanks. ...