apache-flex

Itemrenderer Dispatch Custom Event

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 02:57:09
问题 I'm trying to dispatch a custom event from a custom ItemRenderer This is my custom event package events { import customClass.Product; import flash.events.Event; public class CopyProductEvent extends Event { public static const COPY_PRODUCT:String = "COPY_PRODUCT"; public var picked:Prodotti; public function CopyProductEvent(type:String, picked:Product) { super(type); this.picked = picked; } } } In the itemRenderer I have a function that does that: private function sendEvent(o:Product):void {

How do I get a strongly typed collection from BlazeDS?

隐身守侯 提交于 2019-12-21 02:43:07
问题 I've exposed a Spring bean to my Flex app via BlazeDS. In my Java code I return strongly typed lists. e.g. public List<Folder> getFolders(String path) { return dao.getFolders(path); } The Flex app receives the data as an ArrayCollection of AS3 Object instances - i.e. not as a ArrayCollection of Folders which is what I want. I've annotated my Flex class as follows: package myproject.vo { import com.adobe.cairngorm.vo.IValueObject; import mx.collections.ArrayCollection; [Bindable] [RemoteClass

Is it possible to define a generic type Vector in Actionsctipt 3?

喜欢而已 提交于 2019-12-20 20:15:11
问题 Hi i need to make a VectorIterator, so i need to accept a Vector with any type. I am currently trying to define the type as * like so: var collection:Vector.<*> = new Vector<*>() But the compiler is complaining that the type "is not a compile time constant". i know a bug exists with the Vector class where the error reporting, reports the wrong type as missing, for example: var collection:Vector.<Sprite> = new Vector.<Sprite>() if Sprite was not imported, the compiler would complain that it

BlazeDS and ArrayList of custom objects

倾然丶 夕夏残阳落幕 提交于 2019-12-20 17:15:10
问题 I'm using BlazeDS to connect Flex with Java. I'm having trouble passing ArrayLists of custom objects from Flex to java. I have two objects, one is called Category, the other Section. A Category has an ArrayList of Section objects. I can send an ArrayList of Category objects back and forth between Flex and Java, the problem is when I try to access the sections ArrayList of a Category object that has been returned to Java from Flex, I get the following error: flex.messaging.MessageException:

Play video from local file using Adobe AIR

别说谁变了你拦得住时间么 提交于 2019-12-20 11:33:11
问题 I'd like to play videos, as well as display images and possibly other flash content using adobe air, and reading from the local file system. I've been searching APIs and I have not yet been able to connect the dots. I know of flash.filesystem.File and flash.filesystem.FileStream and have experimented with loading and reading files. I believe I can load images this way but haven't tried. As for video: mx.controls.VideoDisplay - seems to accept a file:// URI for source, but I can't get it to

How can I check Spring Security for user authentication and get roles from Flex?

心不动则不痛 提交于 2019-12-20 10:14:32
问题 I'm using Spring, Spring Security, BlazeDS, Flex and spring-flex. I know that I can call channelSet.login() and channelSet.logout() to hook into Spring Security for authentication. channelSet.authenticated apparently only knows about the current Flex session, as it always starts off as false , until you call channelSet.login() . What I want to do: Check from Flex to know if a user is already in a session. If so, I want their username and roles. UPDATE I just thought I'd add details of the

How can I check Spring Security for user authentication and get roles from Flex?

偶尔善良 提交于 2019-12-20 10:13:25
问题 I'm using Spring, Spring Security, BlazeDS, Flex and spring-flex. I know that I can call channelSet.login() and channelSet.logout() to hook into Spring Security for authentication. channelSet.authenticated apparently only knows about the current Flex session, as it always starts off as false , until you call channelSet.login() . What I want to do: Check from Flex to know if a user is already in a session. If so, I want their username and roles. UPDATE I just thought I'd add details of the

Flex performance considerations

╄→尐↘猪︶ㄣ 提交于 2019-12-20 09:38:16
问题 What are the main key-points a Flex developer should remember in order to improve performance of Flex applications? The ones which come to my mind are: extending ItemRenderers from more lightweight base classes: i.e. UIComponent using suspendBackgroundProcessing set to true for animations using ArrayLists instead of ArrayCollections where appropriate. useVirtualLayout in Spark DataGroups (unfortunately this step requires Scrollers to make this advice effective) SQLight performance

How would I start learning how to program in Flex? [closed]

牧云@^-^@ 提交于 2019-12-20 08:04:02
问题 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 5 years ago . Can anyone give me pointers to good books or web sites that teach how to do Flex programming? 回答1: Check out Ten Great Ways to Learn Flex, but I think number one should be to use the Quickstarts on the Adobe Site. 回答2: Flex in a Week Video Training on Adobe's site. "Learn Flex in

How to monkey patch or override a swc class in Flex?

烈酒焚心 提交于 2019-12-20 07:06:10
问题 I'm using a swc from the Axiis project to display visualizations in a project I'm working on. I've run into a bug where re-compiling the library swc would be an easy solution, but I can only use the buggy version of the swc. I have the Axiis source and compiled a version with the bug fixed, though I'm not allowed to use it because of client version restrictions. Does anyone know how I can use the updated Actionscript class/file in my code so it overrides the swc class? 回答1: I'm not sure if