flex4

Creating state children before switching to state

Hi All In my view I have a welcome screen: <component:WelcomeScreen includeIn="welcome" /> Which is a pretty small component and I have panelContainer: <component:PanelContainer id="panelView" includeIn="panels" > <manyChildren /> </component:PanelContainer> Whilst the user is reading the warm and fuzzy w...

Flex 4: use google APIs in RIA without server side code?

Just to confirm what I think I understand from reading about use of google APIs in RIAs (FLEX 4 and ActionScript) there is no way to connect to blogger API for example, directly from RIA because of google's crossdomain.xml file, right? So if I want to use their APIs to get some data like content of my mailbox or list of posts on my blo...

Flex - combined bold and normal label in Button component

Hello :) It is possible to bold some part of label in standard Button? example: ICON - normal_normal_text BOLD_BOLD_text Thanks for help :) ...

TextFlow creates paragraph elements instead of line breaks

Is there some way to override Flex 4's textFlow keypress event which when editing content in a textFlow breaks the elements in to multiple paragraph elements instead of insterting a breakElement when you press the enter key? ...

FlexUnit nested async tests

I'm trying to test some async functionality in flex 4. My test has two stages : var loader:MySuperLoader = new MySuperLoader() loader.load('foo.swf'); loader.addEventListener(Event.COMPLETE, Async.asyncHandler(this, function(e:Event):void { loader.removeEventListener(Event.COMPLETE, arguments.callee); var foo:* = loader.content;...

Flex 3 Tree iconFunction not working properly

Hi all, I don't know the exact problem. I am using flex mx:tree component in flex 4 and I'm customizing the icons using iconFunction. here is my code private function iconFunctionHandler(item:Object):Class { var st:SWFLoader = GlobalVariable.getInstance().imageInstance; var iconClass:Class = Object(st.content).getInstance(item.@...

Spark DropDownList Custom ItemRenderer Issue

I have a Spark DropDownList that has a custom ItemRenderer. The ItemRenderer, upon creation, checks the label text and if it matches certain criteria, then the label text color changes. The label text color is changing, however it is for the wrong label. What appears to be happening is that the label color that is actually being changed ...

SparkDataContainer Scroller not scrolling to bottom of container

I am using a scroller component within a custom skin for a SkinnableDataContainer. I am running into an issue in that the thumbbar of the scroller stops at about the 50% point, however this is actually the end of the scrollable area. In actuality, the thumbbar should be at the bottom of the scroll track. Here's the code for the scroller:...

Drawing Shapes in Flex 4/AS3 addchild issues

Hi All, I am simply trying to draw a rectangle inside of a panel using flex4. I am using spark instead of mx. It complains about addchild being replaced by addelement; however, addelement expects type ivisualcomponent. I think sprite should be of that type; however, it reports an error when trying to use the below code... I have tried a...

Flex 4: Enumerating Spark List items

How to enumerate items of Spark List component after setting dataProvider property? I mean accessing them as DisplayObject instances. ...

Flex Chrome now showing up on AIR app when I compile with Flex 4 SDK

I have an AIR app initially written in Flex 3 that I had removed the Chrome from, but now it shows up when I compile using Flash Builder 4 with Flex 4 SDK. I have <systemChrome>none</systemChrome> <transparent>true</transparent> set in the *-app.xml file and showFlexChrome="false" showStatusBar="false" showTitleBar="false" set in t...

Trying to draw a Rectangle to a Custom Container in Flex4/AS3

So below is the code I have so far. For now I simply want to make it draw a square and have it show up. Right now when I click the area defined in MXML as <components:PaintArea width="100%" height="100%" id="paint-a"></PaintArea> it shows nothing; however, the actionlistener is getting triggered and an element is being added to the group...

Flex 4: Setting Spark List height to its content height

How to set a Spark List height to the height of its content? Tried this: var lastRow:IVisualElement = myList.dataGroup.getElementAt(myList.dataGroup.numElements - 1); myList.height = lastRow.y + lastRow.height; It works in case of a single item, but lastRow is null in case of more items. ...

Flash Builder Update Query Issue - Channel disconnected Channel disconnected before an acknowledgement was received

I am trying to build my first CRUD application and cant get the update query to work. Here is the MXML and AS. <?xml version="1.0" encoding="utf-8"?> <fx:Script> <![CDATA[ import mx.controls.Alert; import mx.events.DataGridEvent; import mx.events.FlexEvent; import mx.rpc.events.ResultEvent; ...

flex 4 - creationIndex for containers

In Flex 3, we can set the following properties in a container object for deferred instantiation: creationPolicy = "queued" creationIndex = "1" (or "2" or "3" etc.) In Flex 4, for I can find the creationPolicy property but there is no creationIndex - trying to set the creationIndex throws a "deprecated" warning but there is no hint o...

Flash Builder 4 debug issue

I am trying to debug an application in Flash Builder 4. The application I am working makes use of php session variables to ensure that the user is logged in. When not debugging, after logging in I can simply path to the container html file and everything works fine. However, when I am debugging a new IE window is launched but for som...

Flex 4 - What makes a GC root?

What are the rules for something to be a GC root in Flash? I'm using the Flash Builder 4 profiler, and I'm finding odd things are labeled as GC roots in the object reference details (e.g., an Image control that is no longer in the display list, nor static). ...

Possible to pass parameters to a skin?

I have 2 skins, almost identical, but differ in 1 small way that can be accounted for if I could pass a Boolean to the skin while assigning it to the host component (a button). <s:Button skinClass="MyBtnSkin" /> Is there a way while assigning the skin to the button, I could also pass a parameter to the skin somehow? ...

Flex 4 how to layout spark controls in an html table type way

I have a group of controls and I want to organize them in a table like fashion. I want 1 row and 6 columns. Col 1,3,4,5,6 should all auto size to the contents and col 2 should take up the remaining available space. When the size of the group changes, only col2 width should change. I also want to be able to set the alignment of each c...

Flex 4: Component move event

I have a CustomTextInput component based on TextInput (Spark) component. The instance of this class is placed on a popup window (TitleWindow). How can I capture the popup move (dragging the title) event inside CustomTextInput implementation? MoveEvent.MOVE event of the CustomTextInput itself doesn't work. Of course, I can't access the ...