actionscript-3

communication between two flex apps

I have 2 flex apps on the same page. I want them to be able to call each other's public functions. I am thinking of using either externalInterface calls or FaBridge to do so. Is there a better way to do it? ...

Loading Multiple XML in AS3

I have problem with load XML file in AS3, please see my XML file: Title 01 songs/production/album/title-01.xml Title 02 songs/production/album/title-02.xml I can load it at first time, but I don't how to load XML file in node {file_url}. Thanks Flash XML Loader ...

Actionscript 3 import package.* vs import package.Class

In Actionscript 3, is there any reel overhead between importing a full package versus importing independant classes? E.g.: import flash.display.* vs. import flash.display.Sprite I know it's a good practice to import only the needed classes from a package to avoid conflicts, but I've often been told it also has a cost in term of the com...

Any reverse engineers have experience with secureSWF?

I'm writing a flash application and am afraid that it will be decompiled. In order to minimize this chance, I want to obfuscate the file. I have heard of secureSWF (http://www.kindisoft.com/), and they do list some "user comments". These are however so optimistic that they are hard to trust. There's not a single pessimistic comment (not...

Transitioning Away from Flash

I create fullscreen interactive demos in Flash and have recently been looking to migrate to a new language. My Flash demos are basically software prototypes and operate in a projector EXE, outside of the browser. I want to leave Flash for a variety of reasons, including: Poor quality control in the Flash player Hardware acceleration is...

How can I call a varargs function with an array in ActionScript?

I need to call a varargs function: function doSomething(... args): Object { // do something with each arg } However, I'm building the arguments for this dynamically: var someArgs: Array = ['a', 'b', 'c']; doSomething(someArgs); The problem is, when I call the function in this way args ends up being a 1-element array with someAr...

Howto allow any data type to be returned by a function in actionscript 3?

I have a static Settings class where my application can retrieve settings from. The problem is that some of these settings are strings, while others are ints or numbers. Example: package { public final class Settings { public static function retrieve(msg:String) { switch (msg) { case "register_link":...

Read binary C float in Actionscript 3?

I have binary C/C++ data types (e.g. in memory version of a C float) which I need to read into Actionscript 3 and would prefer not to code this from scratch. Anyone know of any libraries, sample code, pseudo code to help with this? For example: C/C++ app: float f = 1.1; SaveFloatToFile(f, 'myfile.bin'); Actionscript 3 app: var ba:...

How can I determine the position of an XML instance in an XMLList in ActionScript3?

What it says on the tin: I have an XMLList, and I want to find where in it a particular XML item falls. First index is good enough for my purposes. Note that I have no problem writing a function to do this by hand... but I was hoping that the API has something buried somewhere that'll do it for me. I didn't see it, though. ...

Stop all timers running

I have a flex app that has several timers running for various amounts of time and for various reasons. I'd like to be able to stop all timers running if the user goes over a specified amount of time, but don't want to individually stop the timers using timer.stop(); Is there a way to stop all timers globally or find and iterate over all...

Run-time loading of external assets and re-using preloaded assets in actionscript 3?

I'm creating a 2d flash game (coded in flex/actionscript 3) where assets are downloaded when they are needed. Currently I have it setup like this: AssetLoader.as package { import flash.display.Loader; import flash.net.URLRequest; public class AssetLoader extends Loader { //set vars private var url:String = "h...

Move multiple rows from a tree component to a dataGrid.

I'm working on drag-and-drop capabilities between a tree and a datagrid. The dataProvider of the tree is XML and the dataProvider of the dataGrid is an arrayCollection. I have it fully working when moving a single item from one to the other, but allowing multiple selections is failing. When the elements moved are leaf nodes, the follo...

ActionScript 3.0 Function Completion Event Listener

How can I listen for function completion? let's say I have this processFile function, which is triggered in Class Constructor with another event listener. private function processFile(e:event):void { //do whatever is this function suppose to do } now I want to listnen for it's completion When I use processFile.addEventListener(...

Java Implementation of Flash API

Just curious to see people's opinions: Has anyone thought about implementing the Flash player API in Java? Controlling sprites, graphics, media, etc is so easy to do in Flash, it seems like it would only make sense to have a similar API in Java. ...

Is it necessary to know flash designing for flex3 ?

I am from a programming background ,and newbie to flex3 . i would like to learn flex3 and develop some application using rails and flex3 . Is it necessary to know flash in order to learn flex3 or just learning Action script 3 would do ? .Can anybody tell what are the prerequisites to learn flex3 . Thanks in Advance. ...

access a TextField inside a symbol, using ActionScript

I've created an animated scene in Flash, with a bar chart. The bar is a MovieClip symbol containing a large rectangle and a TextField. I'd like to access the TextField using actionscript, but I can't seem to reference it. Each bar in the scene has its own instance name, so that's easy to find. But how do I modify the text in the textfi...

AS3 Assign Class to XML Loaded element

I need to load a set of images with from XML and assign Interactivity to them first I load the XML import flash.display.Loader; import flash.net.URLRequest; var loader:Loader = new URLLoader(); var request:URLRequest = new URLRequest("myXML.xml"); loader.load(request); loader.addEventListener(Event.Complete, proessFi...

Flex: Processing xml, before using it in datagrid

Hi! I have following problem: My webservice application returns xml data in following order: <my_claims> <claim> <opponent>Oleg</opponent> <rank>2000</rank> </claim> </my_claims> Where number of claim nodes, can be 0,1, and so on. How I correctly handle, the data received from the service. Currently, when I am trying to...

Flex3 Linechart points are too close to the edge

I have a Flex3 LineChart component using an CircleItemRenderer and the datapoints are being cut off because they are too close to the edge. Here's what it looks like: http://img29.imageshack.us/img29/3850/chartx.png As you can see, the circles on the left and right sides are being cut off. How can I make the LineSeries area, plus...

Is it Possible to load all files from a folder without using XML in AS3?

A client wants to be able to just put mp3 files into a folder and have a flash object load all mp3 files from that folder, and does not want to deal with XML. Is this possible? I know I could easily do this with an XML file, but I'm not sure how to do it without one. ...