I have BigDecimal objects serialized with BlazeDS to Actionscript. Once they hit Actionscript as Number objects, they have values like:
140475.32 turns into 140475.31999999999998
How do I deal with this? The problem is that if I use a NumberFormatter with precision of 2, then the value is truncated to 140475.31. Any ideas?
...
Which bit rates would you assign as normal and high based on a HD-H.264 RTMP stream considering exclusively broadband connections (using a progressive stream fallback for slower connections) ?
EDIT :
Lacking of answers I realize my question is just far too vague. The "answer" was not meant to be a solution in itself - which is just not...
Given this MXML component:
<mx:TextBox id="test" text="{test2.text.length > 5}" />
How can I get an event dispatched whenever the value of test2.text.length > 5 changes? I've tried ChangeWatcher, BindUtils and PropertyChangeEvent, but no luck :(
Thanks;
[EDIT]
Copying my comments from further down:
Well... I'm actually using...
I've created a swc library. Opening this swc, I can extract the library.swf.
Placing library.swf on my server and using it as an RSL, everything works fine.
If I run optimizer against the library.swf, the resultant library-optimized.swf does not work as an RSL. I get
Flex Error #1001: Digest mismatch with RSL
...
Redeploy the match...
Some as3 functions handle overloading by allowing for an arbitrary number of parameters using the convention:
public function doSomething( ... rest ):void;
I am in a situation where I need to pass all the values of an array (of arbitrary length) into this type of function... I am not sure how to do this. Suggestions?
Here is a hack...
I am processing a FileReferenceList.fileList[] of multiple files a user selects in the following code..
for (i=0;i < event.currentTarget.fileList.length; i ++){
fileByteData = new ByteArray();
fileByteData = (event.currentTarget.fileList[i].data as ByteArray);
loader = new Loader();
loader.contentLoaderInfo.addEventList...
What is the fastest way to delete one specific entry from the middle of Array()
Array is large one having Strings.
I dont want just to set Array[5] = null, but instead array size should be reduced by one and array[5] should have content of array[6] etc.
...
I have a variable, and a function for brevity lets consider it looks like this:
private function applyDiscount (value:Number):Number
{
return value*_discount; //_discount defined somewhere else
}
OK thats all fine and dandy but say I want to be able to call that function and be able to pass my own discount, but still use the _discount...
Is there a way to get a list of all classes contained within then currently running SWF? You could use describeType on the root and then traverse down the list to find all Classes of instances referenced within your app, but this method does not work for classes that have been included, but not referenced (local references, for example)....
I'm experimenting with Adobe AIR and Google Maps API in Flex Builder. The question is, i'm making a NativeMenu, and was wondering, how can I change the label of the "Fullscreen" item to "Exit fullscreen" when the stage is in fullscreen?
If you see any thing in the code that could/should be written better, please let me know ;)
Here is ...
I'm playing with a Physics Engine for AS3 and the code below is basically the hello world example. However, I made a slight change by declaring the property "ball" as a WheelParticle at the beginning of the class definition. (forgive my terminology if it's wrong). Before, it was declared inside the constructor as
var ball:WheelParticle...
Is there any way to do it?
...
When loading images using Loader, what's the preferred way to add the image to the display list? Grabbing the data in an Event.COMPLETE handler like new Bitmap( Bitmap(LoaderInfo(e.target).content).bitmapData ) , or adding the Loader instance itself?
...
I'm extending Loader(), is it possible to draw a border around the content without resorting to some hacks? I understand Loader can't have any additional children, otherwise I would just create a shape to the contents size and add it. But is there a way to coerce or cast the content object in order to use the drawing API on it?
...
In a Flex DataGrid's first row, the itemRenderer will initialize twice. Tracing the results reveals that the flex framework is possibly creating two instances of the first row's itemRenderer. In a more complex application, where the itemRenderer contains a data-bound ColorPicker, we're seeing an infinite loop occur because of this prob...
Is it possible with AS3 to prompt a file select screen to the user, get the selected file data and use it directly in the movie without the need to upload this file to the server first and then get it back? I want something like FileReference to enable the user to selected many image files then I want to display/manipulate these images d...
Hello, everyone.
We have that Flex app talking to the server. We need some kind of *FlexEvent.ON_BROWSER_WINDOW_CLOSE* event but, unfortunately Flex does not provide such.
So I've got the advice to catch a javascript "onbeforeunload" event and call the flash client thru the ExternalInterface-registred method.
Is there any way to subsc...
I want to set the icon of a button in flex.
The default syntax is as follows.
myButton.setStyle("icon", iconClass);
and iconClass is normally an embedded object.
But what I want to do is, use a standard Sprite or a MovieClip (which I find during runtime) as the icon.
Is this possible? Has anyone done this?
Thanks!
...
How can I access an variable from another function?
I have a function that sets and variable:
private function create () {
var str:String = "hello";
}
private function take() {
var message:String = str;
}
...
Following a Video tutorial on Flex, but I am inside the FlashDevelop IDE as opposed to Flex Builder.
Now, in the video they create a custom MXML Component which is simply a derived Horizontal Box.
The markup of the video tutorial to mine is the same and I have the MXML file in the same folder as the Main.MXML. I get the following ...