actionscript 3 - Flex: does painless programmatic data binding exist?

I've only done a bit of Flex development thus far, but I've preferred the approach of creating controls programmatically over mxml files, because (and please, correct me if I'm wrong!) I've gathered that you can't have it both ways -- that is to say, have the class functionality in a separate ActionScript class file but have the contained elements declared in mxml.There doesn't seem to be much of a difference productivity-wise, but doing data binding programmatically seems somewhat less than trivial. I took a look at how the mxml compiler trans...Read more

actionscript 3 - how can I write a generic property modification function in Flex/Actionscript3?

I'm new to Flex, although not new to programming. I want to write a generic event handler that will be called by all my textinput boxes when they receive focus. When they have focus, I want to change the colour of the textinput box. When they lose focus, I want to restore the "inactive" color profile. I could write an ActionScript event handler for each textinput box, but we all know that's lame. :o) What I need, then, is a way to access the object which is calling the event handler.In Delphi, I'd have written a function which passes in the...Read more

flex - Can an Actionscript component listen to its own propertyChange events?

I have a CircleButton class in Actionscript.I want to know when someone externally has changed the 'on' property.I try listening to 'onChange' but it never hits that event handler.I know I can write the 'on' property as a get/setter but I like the simplicity of just using [Bindable]Can an object not listen to its own events?public class CircleButton extends UIComponent{ [Bindable] public var on:Boolean; public function CircleButton() { this.width = 20; this.height = 20; graphics.beginFill(0xff6600, 1); gr...Read more

viewbox - How do I make the path scale to the container in Flex (View Box)?

I have the following markup:<s:Group width="100%" height="100%"> <s:BorderContainer borderWeight="3" borderColor="black" cornerRadius="5" width="100%" height="100%"> <s:Path> <s:stroke> <s:SolidColorStroke color="black" /> </s:stroke> <s:data>M 14.153 14.788 C 13.856 15.25 13.161 15.628 12.612 15.628 L 0.766 15.628 C 0.216 15.628 -0.028 15.228 0.225 14.739 L 3.307 8.765 C 3.56 8.276 3.56 7.477 3.307 6.988 L 0.225 1.014 C -0.028 0.525 0.216 0.12...Read more

Flex Skinning and Adobe Illustrator

I'm developing a skin for Flex 3 using Adobe Illustrator and I've just ran into a problem. I've designed a larger scrollBar skin to be used in a touch screen application but Flex seems to apply the default sizes regardless of the size of the symbol in the generated .swf. I could achieve the correct effect with .png but I'd like to know if it's possible using the previous method....Read more

flex - Aligning Shapes on a plan, Algoryhtm

I am developing a simple diagram tool with shapes on a plan using flex.First i was using a simple 20*20 grid.But the real cool stuff out their is auto axe magnet effect, that's how i call it at least to see why i mean by that i made a small video of balsamiq.http://screenr.com/clBhttp://www.balsamiq.com/As you can see it aligns on the vertical horizontal border and center axes.Borders: gray axes Horizontal align (height/2) Center: blue axeNo Vertical align (width/2) axeSome intermediary padding space of 25px: green axesHow do you think such alg...Read more

actionscript 3 - Flex Child Canvas insise a Canvas and resizing question

I have a Canvas A with scrollpolicy on,A has one unique Child canvas B which has no scrolling.A is the container of B which is a whiteboard like tool.If i dont set width and height of B, he will resize accordingly to A size, up to a certain point where A has scrollbars which is the good Behavior.However since B canvas seems to be resized on the fly whenever I dynamically add or move an element it gets a little bit slower.I can solve it by setting a percent width and height of 100% to B, when i do a var bmd:BitmapData = new BitmapData( ...Read more

actionscript 3 - Flex resizing Canvas where to put such code ? (diagram inside)

I have two Canvas A and B, A is the child of B.A can be resized by some user actions like adding some UI components to its base.A is bounded by an other Parent canvas B which should show scolling handles if its child A gets too large.I would like A to have the same width and height of B (or really close) while the calculated width and height of A is smaller than those of B.If w or h of A get larger than those of B then A should grow and B will show scrolling.I hope it is kind of clear.My question is where and how could i do such logic ?canvas d...Read more

Problem consuming ActiveMQ messages from Flex client

I am unable to consume messages sent via ActiveMQ from my Flex client. Sending messages via the Producer seems to work, I can also see that the Flex client is connected and subscribed via the properties on the Consumer object, however the "message" event on the Consumer is never fired so it seems like the messages are not received.When I look in the ActiveMQ console, I can see the number of subscribers, the number of messages sent and the number of messages received. The strange thing is that the received messages counter seems to increment and...Read more

web services - How to handle SOAP response in FLEX 3

SOAP Request<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header/> <S:Body> <ns2:deleteDataView xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/"> <identifier>5</identifier> </ns2:deleteDataView>&lt;/S:Body&gt;</S:Envelope>SOAP Response<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:deleteDataViewRespo...Read more

flex - Flash Builder 4 - Flash Player failed to connect to debugger

I just finished my installation of Adobe Flash Builder 4. I've definitely installed the most recent flash player from Adobe's website onto my computer. Also, in the run configurations of flash builder 4, I changed the source path from the .html file to the .swf file that is generated. I don't need to test it in a web browser, I just want to run the swf in flash player.I only have 1 .as file in my actionscript project and there is no code written in it other than the package, class and main function statements. When I run the .html file, it runs...Read more

Setting background color for datagrid row in Adobe Flex

I need to programmatically change the background color for a single row in a datagrid in Flex. I've scoured the Net and found reference to "dg.setPropertiesAt," which is not a supported method (according to the compiler). Also, there are suggestions to extend the dg's "drawRowBackground" method but I need to set the background externally (not from logic inside the dg). Any and all suggestions welcome.TIA,Bob...Read more

actionscript 3 - Flex Tile that expands as items are added to it

<mx:Tile width="100%" height="20"> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/> <mx:Button label="btn"/></mx:Tile>The above Tile has a height of 20. When I add 50 new buttons to it, a vertical scrollbar is added. How can I make it not show the scrollbar but change it's height dynamically so that all the added items are always shown. Kinda like an "expanding" tile....Read more

flex - How to develop air application to support high DPI screens

I have an air application that I have developed that only I use at the moment. It works fine but I have recently got a 4K monitor and am annoyed at the applications that are not written to support the custom DPI settings in windows that you use to make sure that text is actually still readable on this high DPI screen....it turns out that my application is not written to support this...Can I get hold of the custom DPI value and use that somehow?I have used the applicationDPI setting when developing for mobile before but it does not seem to help ...Read more