flex4

Connecting any database directly from flex

こ雲淡風輕ζ 提交于 2019-12-06 09:52:54
Is it possible to connect any database from flex directly? Not unless you use Adobe AIR for desktop at which time you'd be using the SQLLite api's to create/connect to a sqlite database file. http://livedocs.adobe.com/flex/3/html/help.html?content=SQL_01.html Anything else is going to require a back end service to handle such transactions. You can use asSQL as mentioned by michael, or use the Adobe Air runtime. However, this must be said about using this library: It is EXTREMELY insecure to have a straight database connection from the client unless it's from Adobe Air since the db is local.

How to ensure that the popUp always displays above the PopUpButton? With test case and screenshot

好久不见. 提交于 2019-12-06 07:40:01
Few users of my Flex 4.6 web application are complaining, that the mx.controls.PopUpButton at the right bottom corner of it sometimes opens a List underneath it and is thus unusable (I can't reproduce that myself - probably an unlucky combination of their Flash player and/or font size setting?) How could I ensure, that the popUp component (in my case it is a spark.components.List) always opens above the PopUpButton? I suspect, that I should create a skin based on mx.skins.halo.PopUpButtonSkin and assign it to my PopUpButton? And I probably should use the PopUpPosition.ABOVE constant together

Difference between validateProperties() and invalidateProperties()

会有一股神秘感。 提交于 2019-12-06 07:23:42
Can any one tell me about what is the Difference between validateProperties() and invalidateProperties() ? invalidateProperties : Marks a component so that its commitProperties() method gets called during a later screen update. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the text color and size, it would be wasteful to update the color immediately after you change it and then update the size when it gets set. It is more efficient to change both properties and

What's the difference between the mx/fx/s object types in Flex 4?

岁酱吖の 提交于 2019-12-06 03:44:13
Flex4 provides the following namespaces: xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" What's the difference? Which namespace provide which function? Where can I find info about that? Namespaces allow you to specify to the compiler where to look for the files/classes that you reference in your mxml. There are two different types of namespaces that get used in Flex 4. A language namespace and a component namespace. the http: //ns.adobe.com/mxml/2009 namespace specifies what version of the mxml language gets used.

HTTPService/ResultEvent with Flex 3.2 versus Flex >= 3.5

北城以北 提交于 2019-12-06 03:43:43
through a design decission or what-so-ever Adobe changed the content of the ResultEvent fired by a HTTPService Object. Take a look at following example: var httpService:HTTPService = myHTTPServices.getResults(); httpService.addEventListener(ResultEvent.RESULT,resultHandler); httpService.send(); /** * Handels the login process */ function resultHandler(event:ResultEvent):void { // get http service var httpService = (event.target as HTTPService); // do something } It works like a charm with Flex 3.2. But when I try to compile it with Flex 3.5 or Flex 4.0 event.target as HTTPService is null. I

As3 Copy object

混江龙づ霸主 提交于 2019-12-05 20:03:51
sometimes we need clone a object.but if a displayObject has some children and use the function like this: function clone(source:*):* { var b:ByteArray = new ByteArray(); b.writeObject(source); b.position = 0; return(b.readObject()); } but the result has no children.. .. . so what should I do ? I didn't have to program a clone-method myself yet, but i found a way that might do the trick. By iterating through all your variables (in an xml-representation), you can copy them in a new instance of your class. you can find the method i am talking about on this link: http://www.learnosity.com/techblog

Flex builder3 is not generating html wrapper when targeting flex 4 sdk

时间秒杀一切 提交于 2019-12-05 19:32:41
In Flex builder 3 when I create a new flex application targeting the flex 4 sdk, it wont generate a html wrapper file. I have hunted around the web for answers, but no success. I have made sure the box is checked in the project properties to generate html wrapper. The only workaround is to target an older version of the sdk (i.e. 3.2), which will cause the wrapper to be generated. Then I can revert the project to sdk 4. This then means I can never do a clean of my project because this will result in the wrapper being deleted. Has anyone else come across this? Is this just a bug with

How would I include an MXML file inline another MXML file?

一曲冷凌霜 提交于 2019-12-05 10:38:22
I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time placing it in the same scope. For example, Application.mxml: <Application> <source="external.mxml"/> </Application> External.mxml: <Styles/> <Declarations> <Object id="test"/> </Declarations> I need to keep this code/mxml/xml in the external file in scope with the original. Do not ask me why I want to do this. Another example. Here is my current code

how to show a tooltip on a disabled control?

跟風遠走 提交于 2019-12-05 03:51:22
I'm displaying a list of buttons, some of which might be disabled. I need to show a tooltip on the disabled buttons with an explanation of why it's disabled, but it seems I can't disable the button without disabling the tooltip. Is there a simple way around this? Wrap the Button in a Group, and apply the toolTip to the group instead. <s:Group toolTip="My toolTip"> <s:Button enabled="false"/> </s:Group> It's a bit ugly, but it works. One way to do this is to override the enabled getter and setter to do what you want. So in my case, I still wanted most mouse events to fire, just not the click