In as3, is there a utility or function to convert an RGB color (e.g. 0xFF0000) and an alpha value (e.g. .5) into a A 32-bit ARGB value?
And from ARGB to RGB + alpha?
Some explanation: a bitmapdata can take an ARGB value in its constructor, but filling shapes in sprites usually takes RGB values. I would like the aforementioned utilitie...
I have a layout question for Tab Navigators in Adobe Flex 3.
Is it possible to insert a button that invades the grid space of the tabs?
I have a tab navigator component and I am dynamically adding sub components to tab navigator and I want squeeze a button inside the tab space. I don't want the button to be another tab. And I don't w...
In java, you can get a unique string for an object.
How can you do this in as3?
...
Let's say the sound input is either an embedded mp3 file or the microphone.
Is there an example of how to make it sound demonic and creepy, or like a radio transmission from the battlefield in actionscript-3 dynamically on runtime.
Reference:
http://www.youtube.com/watch?v=JAY88WH0FcU
...
I'm creating a space game in actionscript/flex 3 (flash). The world is infinitely big, because there are no maps. For this to work I need to dynamically (programatically) render the background, which has to look like open space.
To make the world feel real and to make certain places look different than others, I must be able to add filt...
I have a legacy file format that contains sounds embedded in it (in various encodings). I would like to be able to play these sounds in Flash (Air?) by reading the sound bytes out of the file and instantiating a Sound object with them.
If the sound is unencoded (e.g., raw pcm), I've found that I can use the new flex 4 SampleDataEvent.S...
I have XML that looks like this:
<question>
<type_elt>
<opt_out_flag />
</type_elt>
</question>
type_elt is not an element name; it might be <single>, <multiple> or something else, determined at runtime. How, given this, can I detect the presence of the opt_out_flag element?
I tried this (where xml refers to the ques...
I need to remove the value associated with a property in a Flex 3 associative array; is this possible?
For example, suppose I created this array like so:
var myArray:Object = new Object();
myArray[someXML.@attribute] = "foo";
Later, I need to do something like this:
delete myArray[someXML.@attribute];
However, I get this error mes...
In a Flex/AIR application, I need to create snapshots (like big thumbnails) of local PDF files (one per page, if indicated).
Ideally, I would like to do it all on the client side (PDF is a public specification, albeit a REALLY COMPLICATED one).
I have read about an "Adobe plug-in" but I cannot find a specific piece of software that mak...
I'm developing a game with AS3 and AIR. I will have a large-ish quantity of images that I need to load for display elements. It would be nice not to embed all of the images that the game needs, thereby avoiding having them all in memory at once. That's okay in smaller projects, but doesn't make sense here.
I'm curious about strategies f...
Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up. Please help.
...
I've created a small component in Flash CS4, and I have associated my MyComp symbol with it's respective MyComp class. The code in MyComp.as looks as follows:
package {
import flash.display.MovieClip;
public class MyComp extends MovieClip
{
public function MyComp()
{
trace(this.test);
}
private va...
Should be easy but google couldn't give me a straight answer. I have an array. The fields in the array have underscores that I would like to remove e.g. "Column_1" to "Column 1". Does anyone know a good way to do this without looping through the whole array and rebuilding it anew? I didn't see any methods in the reference that would ...
Guys, I am thoroughly surprised that there is no Flash Hidden Features post yet in the Hidden Features series that I've been tracking for a while now.
There is a recent AS3/Flex one but it's not very active and I don't exactly mean just AS3 when I say Flash here.
The Hidden Features series is great for people who are new to a certain l...
I want to extend the RadioButton component in Flex 3, adding a text input line to it in place of the label. Is it possible to do this?
Alternately, is it possible to have a container -- such as an HBox -- delegate all properties to an internal component -- such as a RadioButton -- so that I could create a composite component that 'acts...
I have a text that I want to linkify. The text could be multiline, and could contain multiple urls like the example below.
example :
My current actionscript code looks like this
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private functi...
Every class I create from an asset in ActionScript 3 has a width and height which are both 0. If I set a value and then immediately trace it, the output is zero. The class is valid and the code runs, it just doesn't display anything. (Unless I use graphics methods.) Additionally, it remains locked at frame 0.
// in the main SWF class
...
In ActionScript all constructors must be public. Sometimes however, it is not feasible to allow a user to create a new instance of a class (since the class might be tied to physical system resources,network sockets, etc).
Does anyony know if there is a way to make a class non-creatable in ActionScript? In essence, what I'm aiming for is...
Hi,
I've got a configuration xml file that I need to parse for values before a flex application laods.
I've created a static class that allows for the values in the xml config file to be retrieved.
I'm initialising this class when the application first loads but as the xml file is loaded with a Loader class that loads a synchronously ...
Let's say I have a slider that can go between 0 and 1. The SoundTransform.volume also ranges between 0 (silent) and 1 (full volume), but if I use a linear function, let's say SoundTransform.volume = slider.volume, the result is rather not pleasing.
I really haven't studied the human ear, but I overheard once that human perception is log...