flex

File handling in Django when posting image from service call

Hi all, I am using PyAMF to transfer a dynamically generated large image from Flex to Django. On the Django side i receive the encodedb64 data as a parameter: My Item model as an imagefield. What i have trouble to do is saving the data as the File Django Field. def save_item(request, uname, data): """ Save a new item """ i...

Set the icon of a Flex button with a Sprite in runtime

I want to set the icon of a button in flex. The default syntax is as follows. myButton.setStyle("icon", iconClass); and iconClass is normally an embedded object. But what I want to do is, use a standard Sprite or a MovieClip (which I find during runtime) as the icon. Is this possible? Has anyone done this? Thanks! ...

Read variable from another function

How can I access an variable from another function? I have a function that sets and variable: private function create () { var str:String = "hello"; } private function take() { var message:String = str; } ...

I like to implement Flex to Server comet / long polling for games

I need to try and implement port 80 flex games to server method. I like to ask if someone already did it before or it is possible to manage flash/flex multi user games with long polling / comet server ? ...

AS3: setting registration point of a DisplayObject with actionscript?

How would you set the registration point on a Sprite or Shape via actionscript (I know this is trivial using Flash, but I need to do it purely in actionscript) ...

How to fix overlapping VBox children in a canvas?

I have multiple HBoxes inside a VBox inside a canvas like so: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*"> <mx:Canvas width="600" height="500"> <mx:VBox height="100%" left="10" right="10"> <mx:HBox width="100%" > <mx:VBox width="48%" h...

MVVM - what should contain what... what should create what

I'm having a right barney getting my head around how everything fits together using the MVVM pattern. It all seems quite simple in practice but trying to implement it I seem to be breaking various other rules that I try to code by. Just as a side note, I'm trying to implement the pattern using Flex, not Silverlight or WPF, so if anyone...

flex soap 1.2 webservice

Hello, I want to connect to a soap 1.2 web service. I know how to do it with a soap 1.1 connection. But it doesn't work for a soap 1.2. Can anyone tell me if there is a workaround for my problem? With kind regard, JSMB ...

Best method for Flex to PHP communication?

What is the best method for communication between Flex and PHP? In the past, we used AMFPHP with AS2, and it worked great for the most part (advantage of AMFPHP is that it also has a JSON mode that can let you seamlessly use the same remote PHP with either Javascript or Actionscript frontends). However, it seems like AMFPHP isn't real...

How to get the size of a Flex Accordion child?

I am calculating the maxHeight of an Image embedded in a Canvas-based component that is part of a Canvas-based component that is the child of an Accordion. I need to get the actual number of pixels available to the currently selected child Container. Oddly enough, measuredHeight and getExplicitOrMeasuredHeight() give the design-time siz...

Change webserver used by Flex in FlexBuilder to .NET Framework 3.5

I just had to reformat and reinstall Flex and reconstruct a project. The problem is i am using ASP.NET as my server side technology and using LINQ in my files. The version of WebDev.Webserver.exe that FlexBuilder starts up is the wrong version so I get this error : Compiler Error Message: CS0234: The type or namespace name 'Linq' ...

Refactor or Rewrite

Hmm I have a application in flex (codebase around 20K lines) ... its sort of a social network meets digg kind of thing, I need to add more features to it. This is my first ever flex project. Now im in a dilemma as to whether to refactor or rewrite the application. Im having a lot of trouble understanding the existing code (there is no do...

How to do padding inside <mx:List>?

I have list for which I require some space between the items and the list margin. The items inside the list are rendered from some other file. But when I add padding I cannot see any difference. Something like this: <mx:List id="List" selectionColor="red" itemRenderer="renderers.List" doubleClick="Handler()" width="500" corn...

Flex Deep Linking, and Named Anchor Links

OK deep-linking in flex uses the anchor(#) text in the URL. So a link to a named anchor on the same page would override the anchor text used by Flex and reset the application. Does anyone know of a way they can coincide? Thanks. ...

Creating Type Safe Collections in Flex

I'm trying to create a collection class in Flex that is limited to housing a specific type of data that i am using (an interface). I have chosen not to extend the ArrayCollection class as it's too generic and doesn't really give me the compile time safety that i'm after. In it's simplistic form my collection contains an array and i man...

Example of a Comet implementation in Flex

I'm looking for an example of how to do a long running HTTP call from Flex/Actionscript to a Java server that supports Comet. Also long running http calls are usually used for pushing data from the server to the client, I would like to used for "streaming" data to the client, for example data for a large table. The client should show alr...

Internationalization for flash applications

I'm working with a flash application (non-flex), and I'd like to support internationalization. In flex there's a nice abstraction ResourceManager in which you provide resource bundles for each locale. Is there any equivalent for actionscript? ...

Is there a better way to work with Flex Builder and the AMF Gateway?

I'm using Flex Builder 3 to connect to a bunch of back-end code via the AMF gateway. Another developer packaged up all the AMF Gateway code into a war file. Here's my development process: Deploy most recent AMF-gateway.war file into local jboss server War file gets unpacked into [jboss]/server/tmp/deploy/tmp23241AMF-gateway-exp.war/...

reverse engineering or documentation tools for flex/actionscript

I have inherited a flex project which is sadly not documented. Im looking for a documentation generation tool / class diagram generater or something like that which works with actionscript. There are around a 1000 class files and I don't have the time to step through all the code in debug. I have tried a few tools like Doxygen (set the ...

Adobe AIR - reading a file in the same folder outside AIR package

How may I know File.nativepath from the folder that my .app or .exe AIR app is running? When I try this I just get '/Users/MYNAME/Desktop/MYAPP/Contents/Resources/FILETHATINEED.xml' I need put this on any folder and read a xml file in the same folder. I don't need my xml file inside the package. I need this structure /folder...