actionscript-3

DataGridColumn Sorting in ActionScript3

Hi , Can somebody let me know whther we can sort this type of data in FLEX DATA -- 1ST QUARTER 2007 2ND QUARTER 2006 2ND QUARTER 2007 2ND QUARTER 2006 When i sort i need something like this .. 1ST QUARTER 2006 2ND QUARTER 2006 1ST QUARTER 2007 2ND QUARTER 2007 This is part of DataGridColumn Sorting when i apply default sort i...

ActionScript drawRoundRect rendering blurry corners.

Hi all! I'm using the AS3 drawRoundRect function as in the following snippet: g.lineStyle(1, 0x808080, 1, true); g.drawRoundRect(0, 0, 100, 24, 12, 12); As you can see, pixel hinting is on. The problem I'm having is corners being anti-aliased way too much, they are way too blurry and not even symmetrical on the above snippet. Frankly...

Flash AS3 - Access external swf on the same domain

Hi, I ran into this problem and could not solve it, so I have a swf file that loads assets from another swf file, everything's fine, until I put them on the server, they are under the same domain, relative path doesnt work nor does absolute path. This is not even a cross domain problem, since both files are on the same server. Did an...

how to add text to a moving movieclip dynamic,when movieclip moving, text moving

i have a loaded swf fil, in this file, a movieclip named ball on it, this movieclip move when i press a button, at the moment, i want to add a text on this movieclip, as movieclip moving, text move with it as if they are the same object ...

AS3: streamlining a 'universal loader'

In Flash Actionscript 3, when you need to load text, you use a class called 'URLLoader', and when you need to load an image (or .swf) you use a class called 'Loader.' As far as I know, loading a .bmp with URLLoader is as useless as loading an .xml into a Loader - it doesn't compute. I'm making a class that handles a queue of external as...

How to completely remove a movieclip in AS3

I want the mc to be removed with All its timers, events,... Is there a simple way to do this? ...

AS3 Loader ignoring .png transparency

In Flash CS4, open a new document, change the background colour to something recognizeable (like magenta) and add the following code: var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event){addChild(e.target.content);}); loader.load(new URLRequest('newsnakelub8.png')); ... replacin...

AS3 Timers vs. ENTER_FRAME performance

I'm building a game that got some moving things all the time, so I'm using a lot of Timer instances to control repetition and trigger motion. Now the thing is that I started to notice some performance "lags". Is this due to the timers? and do you suggest using ENTER_FRAME event instead? Related: Do you suggest any other library/metho...

AS3: copyPixels - Maintaining Transparency On Multiple Copies

I need to copy multiple images with transparency to the same BitmapData without the overlapping images' transparencies overwriting the existing pixels. By default when you use the copyPixels method on a BitmapData with transparency to a BitmapData without transparency, the images layer like I want. The issue is I need to render to a Bit...

Flash Run-Time performance testing

Lee Brimelow got me thinking about my Flash Application CPU and Memory consumption in his blog. So I'm thinking if there is a good (non task manager) tool for performance testing? ...

DisplayObject snapshot in flex 3

i'm creating a visual editor in flex and need to let users export thier projects into Image format. But i have one problem: size of the canvas is fixed and when user add element which is out of these sizes some scroll bars added. And user continue working on the project. but when he want to take snapshot of the canvas he just get the vis...

Hidden Features of ActionScript3 / Flex

I found a lot of interesting info in the 'hidden features of...' series. I'm a AS3 developer so I want to add this question about AS3 as well for all the flash/flex developers out there. So, what are the lesser-known but useful features of AS3 and Flex framework that you know ? ...

OS function calls from ActionScript 3 ExternalInterface

Using ExternalInterface in AS3 is it possible to call OS (C#?) functions within XP? Example: Set the desktop background to a image supplied by a flash app? If it is possible would it be different calls when applied to different OS. And what about cross over the Mac? Any information would be great Thanks ...

How to add an image as pre-loader in a Flash CS4 file?

I have a flash file (.fla) which is created in Adobe Flash CS4. I want to add pre-loader which is basically a simple .gif image (my company logo). I want when someone run that flash (.swf) file, first for at least 3 seconds my company logo will be displayed and then the rest flash file will execute. I am new to Flash CS4, so can anyon...

Flash AS3 drop shadows don't show up when changing height & width

In as3 I'm creating a drop shadow, which works fine. But when I change the height or width of the object (mcWhiteBorder) the drop shadow does not appear at all. Any ideas? var mcWhiteBorder:whiteBorder = new whiteBorder(); var dropShadow:DropShadowFilter = new DropShadowFilter(); dropShadow.distance = 1; dropShadow.alpha = .2; dropShado...

Modal window in Flash

Short version: Is it easy/feasible/possible to program modal window in Flash (AS3)? Is there a built-in functionality for it? Long version: I’m working on a Flash widget (in AS3), and I would like to be able to show a movie clip in a modal fashion. Essentially, I need a simple modal window inside the wieget. So far I learned that that...

DataGrid Column Ordering in ActionScript

Hi , Iam getting an array from Backend and he is sending the array in the same order but when iam assigning it to the dataProvider of the datagrid iam not getting in the same order . Can somebosy suggest as to how to control the order of the columns in a datagrid . I dont know the number of columns that iam receiving from the backend ...

Is there an as3 video player that runs in flash player 9.0.16.0 ?

Hi, There is a known issue in Flash Player 9.0.16.0. It has to do with the FullscreenEvent. I guess because of that the FLVPlayback component doesn't work with this version of the player. I don't want to reinvent the wheel and build another FLV Player using the Video class. Does anyone know about a FLV Player that runs in Flash Player...

What data types does a SharedObject support?

I know it is a simple matter to store Strings and Numbers with a SharedObject, and I am also familiar with this sort of thing: var sharedObject:SharedObject = SharedObject.getLocal("userData"); var obj:Object = new Object(); obj.prop = "value"; sharedObject.data.userobj= obj; sharedObject.flush(); However, I am attempting to store an ...

repeat number of event listeners?

In as3, if I add identical event listeners to an object, for examle txtField.addEventlistener( Event.CHANGE, changeCb, false, 0, true ); txtField.addEventlistener( Event.CHANGE, changeCb, false, 0, true ); would I need to remove that listener twice? How can I get a list or the number of event listeners on an object? ...