actionscript-3

How do I call C functions from Flash?

Currently I have a UNIX executable that I am compiling from xcode. It runs in terminal. (osx) I'm wondering if there is a way to call functions / interact with a flash or flex project. I found some information about a flex c++ bridge, but apparently it is only for windows. Can this be done with air? Any suggestion? ...

On Mouse Over change Sprite Graphics Color: AS3

Hi, I have created a sprite as below: var arrowHeadRight:Sprite = new Sprite(); with(arrowHeadRight.graphics){ beginFill(0xDDDDDD, 1); moveTo(50,0); lineTo(0,50); lineTo(50,100); lineTo(50,0); endFill(); } On Mouse Over, I wish to change the color of the fill on this shape? Can this be done or do I have to re-...

Dragging an object along a drawn path

Same as the question: I need to drag a component along a programmatically drawn path composed by different kinds of graphic, like lines, curves, etc. I've already googled it, but with no success. Any ideas? thanks! ...

How do I set a header on the request generated by FileReference?

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html How do I add my own request header to the POST requests generated by FileReference.upload()? ...

Export Grouped AdvancedDataGrid as CSV text

I'm trying to export an AdvancedDataGrid to CSV. This is easy enough for non-hierarchical data, but when using a HierarchicalCollectionView to show treed data it gets trickier. Any suggestions on how to access each of the cells just as they appear on screen when all of the nodes are expanded? ...

Google trends with adobe AIR

As the google trends api has still not yet been published I wanted to try and get the data using AIR. I am using the as3httpclient lib to login to my google account, here is how I'm doing so far: Credit for the approach to: this blog post //this first connection will get the authorization token by sending the user name and password fo...

how do i solve this bad error

as you see this is a class create 4 text Fields , what i woona do is in this line of code first1[i].text = k1[i]; in the for loop to write the randomize numbers in the TextFields that's my code import flash.display.Sprite; import flash.display.DisplayObjectContainer; import flash.di...

Passing a font from one class to another

I loaded a font.swf (in Flash CS5) and it works in the class I loaded the font into, but if I want to pass it to another class, how do I do that? I tried passing it as a TextFormat instance (with the format.font = my_loaded_font) but that doesn't appear to work... ...

selecting text issue on Flex text area component

I have this really strange issue, and I don't expect much of a response here, but thought I would give it a shot. I have a flex textarea component, controlled by a custom scrollbar. The textarea is loaded when a list of buttons is clicked on, different buttons bring in different text content depending on which button is clicked. Every...

Flex Spark ComboBox in an MX AdvancedDataGrid

I would like to use a combobox as the itemEditor for one of the columns of an AdvancedDataGrid. I looked around and decided to use Spark ComboBox components - they're slick and seem to natively support a lot of neat stuff including auto-completing strings when types in the textInput. After some tinkering I managed to add a spark ComboBox...

Find all instances in a currentFrame (AS 3.0)

I have a movie with several imported videos which are instances of FLVPlayback. I want to make some Pause and Play buttons. Thus I need to know which video should I refer the stop() method to when I'm in a certain Frame. I believe it is something related to finding all existing instances in this.currentFrame and stopping the found instan...

How to select other objects from a group? (Flex)

I have a group of multiple objects. If I select one object from the group, then i use the method: click="makeObj(event)" And then the function: protected function makeObj(event:MouseEvent):void { var targetObj:Object = event.currentTarget; } But how to use all the other objects in the group except clicked ...

AS3 Specify if there are unvisible displayObjects with active listeners

Is there any way to count (specify) the avarage amount of objects that are removed from stage and has active listeners? I have really big project(game), more than 100 classes.. Now i scan each classes, if there are active unnecessary listeners i remove them. Now, i wanna such a tool, which will tell me where is there any other unnecessa...

Removing Parent in AS3: Does this free the memory used by all the children?

I'm making a rather large flash project and so I'm concerned about memory usage. At the end of each section of the application I remove the overarching parent element that holds the content. Although this remove the parent, does this also free up the memory for each of the children contained within this, or should I run an iteration to r...

as3 & Safari: External Interface and Callback woes - window.opener == null

So i have a simple set up. index.php which embeds myswf.swf into the page using swfobject 2. myswf wants to open a new window to interface with an external website - in this instance paypal. (for what its worth, this problem exists even when using documents on my own server - so its not the whole paypal thing) When the process has fin...

what's the difference between classic text and TLF text

what's the difference between classic text and TLF text ...

ActionScript – Default Datatype for Untyped Variables?

if i don't specifically type a variable in my code will it compile as a default datatype? for example, the "for each ... in" function works best without typing the variable: for each (var element in myArray) { //process each element } does my element variable have a datatype? if it is typed as Object is it...

Class in loaded SWF cannot use base class in loading SWF

I have two SWF files which I shall call container and slave. The slave file contains a movieclip that extends from a class I shall call base. base extends MovieClip and is compiled into an SWC. slave includes this SWC as a runtime library, while container includes it as merged (and does reference it so it should be compiled into the cont...

how to add a MovieClip from the library by a class

how to add a MovieClip from the library by a class i've MovieClip and i want to add it to the stage by a class note i've already a class and linked to a MovieClip and what i woona do is to addChild another MovieClip in the stage ...

actionscript: connect to socket server

I am using actionscript to connect to my socket server, but I always got <policy-file-request/> sent from actionscript and after that the conneciton is closed. The code in actionscript is: protected function connect_to_server_btn_clickHandler(event:MouseEvent):void { Security.loadPolicyFile("http://192.16...