apache-flex

AS3 Scale parent mc's center to child mc's center

倖福魔咒の 提交于 2019-12-14 02:50:23
问题 The following code centers the parent clip "mapcontainer.themap" on the state Georgia on load. However, when i try to scale mapcontainer.themap, it doesnt scale around Georgia's center. How do i keep Georgia in the center when scaling? //This sets the parent clip so it's centered on the child "georgia" clip on load var yValue:Number = mapcontainer.themap.georgia.y; var xValue:Number = mapcontainer.themap.georgia.x; var xDiff:Number = mapcontainer.themap.width/2; var yDiff:Number =

Flex 3: Key press combination to trigger an event/function

空扰寡人 提交于 2019-12-14 02:43:07
问题 Within a specific canvas, I would like a user to be able to press a combination of keys which will trigger an event.(a bit like a cheat in an old megadrive game). Not sure where to start though. Anyone know if it is possible and if so could you give me a clue with how to start? Thanks in advance! 回答1: You can add an eventListener to the top level application for the KeyboardEvent.KEY_DOWN event and check for key combinations there. From this article: <mx:Application xmlns:mx="http://www.adobe

Adobe Air: drag & drop grouped components

孤人 提交于 2019-12-14 02:28:37
问题 I am trying to create Adobe Air application in which I require the components below: Allow me to elaborate this mockup: There are 2 panels on each side, and the items inside these panels can be drag and drop on each other, just like moving items around in 2 folders. Several tutorials have shown that a list with dragEnabled = "true" dropEnabled = "true" dragMoveEnabled = "true" will do the job. However, here comes the crucial part. I want my item in the list to have such a structure that I

Loading Clob data as a String (eager) via Hibernate's org.hibernate.Query

自古美人都是妖i 提交于 2019-12-14 02:18:08
问题 I need to fetch a String from a clob Oracle column using Hibernate without lazy loading and without using a Criteria query. It currently returns a proxy class (ex. $Proxy30) but I need a String (or something I can convert to a String). The proxy is for oracle.sql.CLOB according to the debugger. When I use a Criteria query (with just the regular Column annotation mapping for this field), this works just fine. But we have one area where we "build" a custom SQL query which uses a simple org

Pasting a large amount of text in a TextArea leads to a script execution timeout

♀尐吖头ヾ 提交于 2019-12-14 01:24:28
问题 (Flex 3) I have a TextArea component which needs to hold the user's clipboard content. The TextArea does the job relatively well for most cases but when pasting a large amount of data, I can't seem to get the content in the component at all due to the script execution timeout. I've done a fair deal on investigation to try and hopefully find how I could make this work. I found that the TextArea is using a IUITextField (which is in my case an instance of TextField at runtime) do handle the job

flex tree gets chopped even after using scroll bar

最后都变了- 提交于 2019-12-14 00:40:27
问题 when i use the following tree renderer class the the informtions in the tree gets chopped. Is there any solution to fix this bug. please help me. The PLTree class is as follows: import flash.events.Event; import mx.events.ScrollEvent; import mx.controls.Tree; import mx.core.ScrollPolicy; import mx.core.mx_internal; import mx.events.TreeEvent; public class PLTree extends Tree { private var _lastWidth:Number = 0; private var _lastHeight:Number = 0; public function PLTree() { super();

Error when including OpenCv framework in a Native Extension for IOS

社会主义新天地 提交于 2019-12-14 00:08:55
问题 I'm creating an ANE for IOS that implements the OpenCV framework, but when I compile the app on Flash Builder I get this error: Error occurred while packaging the application: Undefined symbols for architecture armv7: "__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from: __ZNSt3__16vectorIN2cv3VecIiLi128EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o) __ZNSt3__16vectorIN2cv3VecIiLi64EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o) __ZNSt3_

flex4 - NetStream.soundtransform.volume doesn't change

烂漫一生 提交于 2019-12-13 22:25:44
问题 I have problem with receive netstream sound volume changing <![CDATA[ import mx.events.FlexEvent; import flash.events.Event; import flash.events.MouseEvent; import flash.events.NetStatusEvent; import flash.media.Camera; import flash.media.Microphone; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; import flash.media.SoundTransform; private const SERVER:String = 'rtmfp://p2p.rtmfp.net/'; private const DEVKEY:String = 'my dev key'; private const REG:String

BULK of Images Loading to form a Thumbnail Gallery

僤鯓⒐⒋嵵緔 提交于 2019-12-13 22:07:49
问题 I am trying to achieve a Photo gallery where images are showed in thumbnails whenever i select a certain folder of images. For example, if i were to click on the folder A, it will load all the images into a arraylist which will be set as the dataProvider for in my List to create the tilelayout. But i realized that, if i have 500 images, and whenever i scroll down on my scrollview, it kind of lags. Is there any way where it will load all my images first, before displaying? Or any way to make

Flex- Time Zone Conversion

点点圈 提交于 2019-12-13 21:58:17
问题 How to convert date and time to CDT time Zone in flex4 Regards, Sushma 回答1: The Date object in Flash is always set to the computer's time settings. If the computer is already in the CDT timezone, then just getting any property from the object will be good. However, if you want to do a timezone 'conversion' into a timezone that the computer is not set to, you can get the UTC time and offset it like this: var date:Date = new Date(); var timezone:int = -5; date.hours = date.hoursUTC + timezone;