apache-flex

ItemClick Event in a flex Combobox

青春壹個敷衍的年華 提交于 2019-12-11 19:57:23
问题 Does anyone know, is there any way to catch ItemClick Event in a Flex ComboBox (or anything similar). Maybe there's any trick .. :) I do realize, that I can customize it, but this not suits my case. Thanks for your time :) 回答1: As you can see in mx:ComboBox sources, the function, creating the dropdown list, is private, the listener to ITEM_CLICK is private and the list itself is also private: private var _dropdown:ListBase; private function getDropdown():ListBase { // ... _dropdown =

How to capitalise the first letter of every word in a string

半城伤御伤魂 提交于 2019-12-11 19:52:28
问题 I am using the Flex SDK and able to capitalise the first letter of every word as follows: textInput.text.toLowerCase().replace(/\b./g,function(...m):String{return m[0].toUpperCase()}) This works fine, however letters after punctuation are also being capitalised, which works in some cases (e.g. O'Neil) but not others (e.g. Connah'S Quay). I want to have the code only look at letters at the start of a string and letters after a space. Can anyone provide the correct code to use in this instance

How to calculate the size of a sprite?

旧巷老猫 提交于 2019-12-11 19:45:48
问题 I have a sprite that I do some custom drawing in, but I would like the container to know where to position the sprite properly. To do this, the container needs to know how big the sprite is. UIComponents go through a measure stage, but sprites don't . How do I calculate the size that a sprite will be? Edit: I'm doing the drawing in Event.ENTER_FRAME, and it's animated, so I can't tell ahead of time how big it's going to be. The UIComponent has a measure function and I'd like to create

Start Flex Mobile Application on Android startup

≡放荡痞女 提交于 2019-12-11 19:44:03
问题 I am having an issue to start the application on android startup, the problem is how to put the listeners on the "android.permission.RECEIVE_BOOT_COMPLETED" from the manifest ( on the mobile application project from Flash builder) to the native extension ?? basically on the manifest I have something like this : <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <application> <receiver android:enabled="true" android:name="EXTENSION_PACKAGE.application.receivers

externalinterface - calling javascript from SWF

点点圈 提交于 2019-12-11 19:36:21
问题 HI, im trying to call a javascript function from my actionscript code but its not working; as3: if (ExternalInterface.available) { try { ExternalInterface.addCallback("changeDocumentTitle",null); } catch(error:Error) js (inside velocity file using swfobject) function changeDocumentTitle() { alert('call from SWF'); } anyone know what could be happenin? 回答1: If you are trying to invoke a JS function from within your Flex app, you want to use ExternalInterface.call(...) and not ExternalInterface

Flex force socket to flush

和自甴很熟 提交于 2019-12-11 19:32:08
问题 How can I force the socket to be flushed before next data to be send? Example code: public function socketSend(data:String):void { socket.writeUTFBytes(data); socket.flush(); } This works basically fine. But sometimes, it doesn't flush the socket, but combine current information with next information and send together. This is what I don't want because it breaks my application communication. For example, if I call socketSend('command1') and then call socketSend('command2') I am hoping it will

Dual Monitor Support in Flex Application [closed]

China☆狼群 提交于 2019-12-11 19:29:16
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I am building an application for windows using adobe flex and Air. It will support two displays, one will be used to select the video to play, and the other will be used to play the qued/selected videos. I read on the adobe website, that Air supports multiple displays however, it

Flex id contentGroup query

帅比萌擦擦* 提交于 2019-12-11 19:22:26
问题 iam learning Flex and practising skins. So, i just had one doubt: I have written one custom skin named : ApplicationContainerSkin.mxml <?xml version="1.0" encoding="utf-8"?> <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <s:states> <s:State name="normal" /> <s:State name="disabled" /> </s:states> <fx:Metadata> [HostComponent("spark.components.Application")] </fx:Metadata> <fx:Declarations> <!-- Place

Create actionscript Application file for Flex project

删除回忆录丶 提交于 2019-12-11 19:18:52
问题 I'm trying to create Flex project with an actionscript application file, not a mxml file. I simply use this code : package { import spark.components.Application; public class Test extends Application { public function Test(){ super(); } } } But I receive this error : TypeError: Error #1007: Instantiation attempted on a non-constructor. at mx.preloaders::Preloader/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\preloaders\Preloader.as:261] at mx.managers::SystemManager/http://www

Unable to retrieve property in main from child popup using event in FlashBuilder

梦想的初衷 提交于 2019-12-11 19:12:52
问题 I am using a component to display the popup and using an event listener to get popover properties and remove the popup in the Parent. The poup var, however, in the listeners popup var is nul so it throws an error. Any suggestions would be greatly appreciated. John Here is my EditStudentLogInForm.mxml component.. <?xml version="1.0"?> <!-- containers\layouts\myComponents\MyLoginForm.mxml --> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="handleCreationComplete();">