actionscript-3

Adobe Flex3: Keyboard shortcuts when a view is visible?

I have a quite large Flex application with a large set of views and I ceratain views I'd like to add shortcuts. And i'm looking for something like: <mx:Vbox> <foo:Shortcut keys="ctrl+s" action="{bar();}"/> .... </mx:VBox> Is there any framwork or component already done that does something like this? I guess it should be too diffi...

Documenting private members with ASDoc

Can ASDoc be set to document private members ala JavaDoc? ...

How to use Socket in AC3 or other solution for using embedded flash without cross domain policy?

How to use Socket in AC3 or other solution for using embedded flash without cross domain policy? I would like to create a project that uses HTTP to post to some website's form by using embedded flash in a webpage. When I finished the project, I tried to embed on the local computer and that work fine but when I uploaded to a web serv...

Flex Combobox: how to get the value of the selected item?

I am using a combobox for the us states, link. The label is set to the full name of the state, while the value attribute holds the abbreviation. What I want to do is to get the selected item's value. So I tried combo.selectedItem.value and combo.selectedItem.@value, but neither of them worked. Can someone shed a light on this please? ...

Creating loop for sending variable to other components in Flex

Hi! I have some simple function in Flex in which I would like to send one of my variables to all the components used in my app... The problem is that there is lots of components in my app, and I'm not sure how to reference to my component's id... Basically, is there an easier way to do this; private function preloadStuff():void{ //...

mapping planes onto primitives

I've looped through the vertices and mapped a plane to each one. I'm having problems orientating the planes correctly. I can get it working with a sphere but when i make any alterations to the the primitive - positions are correct but they don't face/tilt the right way. EDIT: Note - the alternation to the sphere was done before the sphe...

IE not letting flash stream audio

This problem is happening is both IE8 and IE7. I have a small swf compiled with flex. It's basically just a wrapper around audio streaming functionality. All the controls and such are in html with javascript. I load the swf using swfobject's "static" method. This works great in Firefox and Chrome. In IE, the swf loads correctly, but as ...

AS3: Checking if a variable is of the Object type

I want to do something like this in Actionscript 3: if(variable is Object) ...; else ...; Where variable could be a String(), Number(), Array(), Object()... Currently the above check returns true for all of these types, which makes sense. I only want it to return true for objects made with new Object(), however. Any help would be mu...

Destroy a movie Clip and everything in it

I am making a game with flash as3. I create a movieclip that contains all of the games content within it. I pretty much encapsulated the game within this one movie clip. after the game is over I remove the movieclip off the screen. but yet, all the other movieclips within the main movieclip still keep playing. I could create a deconstr...

AS3 Class inheritance problem

Please help Stackoverflow! I have a MapInterface class in AS3 that inherits from Interface class. public class Interface extends Sprite { public function Interface(){ // do stuff } } and then import com.georgecrabtree.Interface; public class MapInterface extends Interface { public function MapInterface(){ ...

AS3: Call function on exit from Full Screen

Using SlideShowPro. Want to call a function when user exits from Slide Show Pro's Full Screen mode. How can I do this? ...

AS3 - It's possible to have package variables (or constants)

Despite if it is good practice or not, I read here that you can have package variables (or constants), so I tried this: // globals.as package global { public const someConst:String = 'theValueOfTheConst'; public var someVar:String = 'theValueOfTheVar'; } // SomeClass.as package pack.to.the.class { // ... import global.*...

how do I use the "in" operator? Flex/AS3

So the documentation has this nifty "in" operator which I like the idea of more that using a multiple step or statement (||). The documentation gives me this example. trace("PI" in Math); // true trace("myProperty" in Math); // false and public var myArray:Array = ["zero", "one", "two"]; trace(0 in myArray); // true trace(1 i...

Flashdevelop haxe (flash) debugger

Is there any debugger for Flashdevelop haxe as3? ...

Where can I find help with flash based augmented reality detecting hand position / gestures?

Hi, I'm researching a potential project involving flash based augmented reality, and I've already looked at FlarToolkit and FlarManager which seem pretty straight forward to execute marker detection. What I cannot find are any sites or assistance with how to detect hand position, etc. To allow the subject to 'press' buttons. An example ...

How can I include JavaScript dynamically from Flash using ActionScript?

I have a flash movie that requires some JavaScript from an include file but I'd like to be able to embed it anywhere without requiring a script tag. Is there a way to include an external JavaScript file using the ExternalInterface library so I can call the methods in the JavaScript include file later? Thanks! ...

Flex/AS3 DataGrid Columns have wrong values

This is driving me nuts. This script is adding datagrids to various containers in an accordion. In my first level for-each loop the item that fills my "if(component.@component_componentID == "999999999")" is the last item looped through everything works fine except the datagrid I am building there has the wrong columns. For some reason "...

Flash AS3 tweening at an angle

Hi I have a as3 file (listed below) that simply moves a box along the X axis when a mouse is over it (using Tweenlight) . What I want to do though is put the box on a 30 degree angle and have the box move along this angle. Can anybody tell me what I am doing wrong please ? import com.greensock.*; import com.greensock.easing.* ; cont...

Easiest way to tell if an object has been modified since save?

Hello, I'm creating an air application that allows the user to create, edit and save Objects in files. I'm trying to implement a "Save on Close" prompt if the user hasn't saved her changes to the object before closing. Let's say I have a Class called MyClass marked as Bindable that is composed of fields, each exposing a getter and sett...

Avoid image to get streteched when used as background image, in flex

Hi I am developing a website in flex. And in that, i am trying to set the background image of my application. like this: parentApplication.setStyle("backgroundImage", data.image_src); From a different location. My issue is that, the images that i have are small and hence they are being stretched when used as background images. I ...