actionscript-3

AS3: How to convert a Vector to an Array

What's the nicest way to convert a Vector to an Array in Actionscript3? The normal casting syntax doesn't work: var myVector:Vector.<Foo> = new Vector(); var myArray:Array = Array(myVector); // calls the top-level function Array() due to the existance of the Array function. The above results in an array, but it's an array with a sin...

Why can't I call super method from an in-place event handling function?

I have a overriden function in my class, that adds an event handler like so: override public function hide():void { ... tween.addEventListener(TweenEvent.MOTION_FINISH, function(evt:Event):void { ... super.hide(); }, false, 0, true); } This does not work, Flash tells me: "1006: A super expression can be used only inside ...

AS3: TextField Focus

I'm trying to handle a focus event on a TextField so I can select all the text when focusing (tab or click). Seems like I'm doing something wrong here ? txtTextField.addEventListener(FocusEvent.FOCUS_IN, handleFocusIn); function handleFocusIn() { //select all text here } ...

What is the order of event dispatch in Flex 3?

I have a checkbox that is bound to a property: <mx:CheckBox label="Show All" selected="{showAll}"/> I want to trigger an event when the checkbox is toggled that will read the value of showAll after a change: <mx:CheckBox label="Show All" selected="{showAll}" click="_list.refresh()" /> Where, in this case, _list is an ArrayCollectio...

Custom Event for height change AS3

how can i add an event listener to detect when the height of a DisplayObject changes. i have a holding Sprite with a border that needs to resize when any object inside changes height or is added. thanks. Josh ...

Actionscript object referencing from a string AS 3.0

Hey, I've got a question about refrencing properties from an actionscript object. If i've got the following object named "groups"... group1 item1 = sampledata1 item2 = sampledata2 item3 = sampledata3 group2 item1 = sampledata4 item2 = sampledata5 item3 = sampledata6 I would access group1/item2 by typing "groups.gro...

Adding a footer to the column in actionscript(not in MXML) in AdvancedDataGrid

Hi , I was trying to create an advanced datagrid dynamically dataGrid.columns = gridReportColumnsArray; dataGrid.horizontalScrollPolicy ="auto"; dataGrid.dataProvider = gridReportDataArray; since i wanted to add a footer to one of the columns i can do it using MXML by having one more column with in the desired column l...

How do I make an Action Script 3 class, used in two SWF files, resolve to the same class when one SWF dynamically loads the other?

Background I am developing a highly modular application in pure Action Script 3 (we are using Flex 4 SDK to automate our builds, but all our code must be able to compile directly in Flash CS4 Professional). We have a "framework.swc" file which contains interface definitions which are shared between all our modules, we have a "mainmodul...

Use a wrapper class around an object in flex / actionscript.

Main Goal : Select a school listed in the first datagrid, and display all the student records /details of that school in the next datagrid. But, since datagrid is editable and requirement mentions : "Use a Wrapper class around the object to get the data, set the same and save. Ensure wrapper is bindable to take into consideration the upd...

Global variables in Objective-C

In Actionscript you can have global variables like this: var number : Number = 15; And then use it in a method/function. How do you do that in Objective-c, is it possible? ...

Objective-C equivalent of Actionscript code

Can anyone help convert this this actionscript to Objective-c? if(mcMain.y >= stage.stageHeight - mcMain.height) { mainJumping = false; mcMain.y = stage.stageHeight - mcMain.height; } Specifically the stage.stageHeight and mcMain.height? ...

MOUSE_OUT events not firing on child when parent is mouseEnabled=false, mouseChildren=false

I make a sprite, then add a child sprite. I add a listener to the child for MOUSE_OUT events. If my mouse is in the child sprite when I set the parent sprite mouseEnabled=false and mouseChildren=false, MOUSE_OUT is not fired on the child. But then, when I move the mouse, MOUSE_OUT is fired on the child. MOUSE_OUT is also fired if I c...

Flash ActionScript 3 capabilities lacking in ActionScript 2

Ever since Adobe introduced ActionScript 3 with Flash Player 9, many of us have been slow to switch over. In short I'd like to know what AS3 as a framework can do, that is simply impossible or significantly difficult in AS2. I'm not talking about readymade components, but built-in classes such as for web remoting, binary data manipulatio...

air application fullscreen trouble

Hi there, I am working on an adobe AIR application and having trouble with fullscreen. When I set the application in fullscreen (stage.displayState = StageDisplayState.FULL_SCREEN;) the display freezes and nothing is being rendered. When I set it back to normal (by pressing esc) the application works fine. thanks ...

Flash player notified on browser close or change page (as3)

I have to detect in my flash if the user closes his browser or goes to another page and the flash is not accessible anymore. How do i achieve that ? ...

Clear validation on textInput when validation is not enabled

Hi, I've created a custom textInput componenet that handles it's own validation using a private validator. The validation is enabled depending on the state of the component i.e. validation is enable when the components state is "edit". However, when the state changes from edit the internal validator is set to not enabled but the vali...

Actionscript 3 using keyboard to focus on HTML elements inside a TextArea

I am attempting to add section 508 (Accessibility) compliance to an application built on Actionscript 3. We have popups triggered by HTML links in text. One of the requirements of the section 508 standard is that the entire application be navigable with the keyboard, including any uses of the anchor tag in the text. How do I assign fo...

Flash: ComboBox and List filled with XML data, then create links

Hello World! I am looking to generate a ComboBox with a list from xml, and then create links from those items. Secondly, I would like to to the same, but with a list and a second xml property. ComboBox - with the list being the "name" property. http://hpn-marketing.com/drmc/content/index.php/specialty/flashxml/ List - with the ...

Q:Technical requirements for Flash AS3 image manipulation and saving application

I am building a Flash AS3 application that allows users to modify images, and then submit-save them to a server. The user will then have the ability to log in and access these saved images in a thumbnail gallery. They can either delete an image or click a thumbnail to view it at original size. I am comfortable with the front end having ...

Estimate quote for a Flash Application with server side interaction

I am building a Flash AS3 application that allows users to modify images, (drag and drop, select, scale, alter saturation, etc) and then submit-save them to a server. The user will then have the ability to log in and access these saved images via a separate admin tool in a thumbnail gallery. They can either delete an image or click a t...