actionscript

Resize window with actionscript 3.0

Is there any way to resize an entire Flash project using Actionscript or some other method? I have created a 1024x768 Flash CS3 application, but upon closer inspection of the specifications, I now realise it has to be 800x600. Instead of manually making everything smaller, I'd like to resize the window as if someone were dragging the o...

3D flex, rotate around a random point for a container (with partial solution!)

I'm trying to find the best way to rotate a container (or anything for that matter) using the matrix3D features in flash 10 for flex. I have managed to get a container to rotate around a point that is not its registration point but I’ve only managed this by turning off the clipping on a container then placing the contents somewhere othe...

Flash 8 FileReference and file integrity check

Flash 8 FileReference API gives you the possibility to check periodically for the number of bytes being transmitted: listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void { trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal); } (more infos here and here) In ...

How to prevent a GWT Flash/ActionScript component from reloading when visibility is toggled?

I have a Google Web Toolkit (GWT) application that utilizes a Flash/PaperVision3D component that I have created. The GWT app places instances of the Flash component on different tabs in a tab panel. During execution of the app, everything works great until the user starts clicking in between tabs. At the GWT level, the JavaScript is chan...

How to deal with Number precision in Actionscript?

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? ...

Detecting flash test player

I've noticed that there are certain AIR options that don't work in the flash test player (the one that previews movies when you Ctrl + enter). One example is NativeApplication.startAtLogin. If it is called from the standalone player (double clicking on the swf file, for example) it works, but if i test it on the flash ide it will throw...

Generating ActionScript value objects from an xsd schema

Are there any tools available for transforming types defined in an xsd schema (may or may not include other xsd files) into ActionScript value objects? I've been googling this for a while but can't seem to find any tools and I'm pondering wether writing such a tool would save us more time right now than to simply code our value objects b...

Flex: Databinding watch

Given this MXML component: <mx:TextBox id="test" text="{test2.text.length &gt; 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...

filling in (...rest) parameters with an array?

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...

Get image original width & height in actionscript

I use AS3 in Flex 3 to create new image and seem unable to get the exact size of the original image. percentHeight & percentWidth to 100 can do the job, but limitation in ObjectHandlers require me to set the image scale in pixel. Any solution? ...

How to subscribe for an javascript event form Flex 3 action script code?

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...

Actionscript Virtual Machine 1 - Inspecting Memory

How do I go about determining what is currently in the Mozilla Flash Plugin memory for AVM1? I am trying to debug a large application we have built and need to see what is getting garbage collected and when. I think we have a number of references causing major content nodes not to unload during the user session. Right now it is all gu...

Actionscript show button after amount of time

Hi i'm loading a FLV into a blank video holder and would like to display a button when the video reaches a certain point. Is this at all possible? ...

killing old objects in flash?

Hi there first timer here. I'm building a flash animation using the tweenlite library. It's extremely simple which is why this is so aggravating. It's basically a slideshow with 5 frames that crossfade. When a button that calls up the next frame fades out, I'd like to disable any actions it has on it. Currently it fades out, but when yo...

reverse engineering or documentation tools for flex/actionscript

I have inherited a flex project which is sadly not documented. Im looking for a documentation generation tool / class diagram generater or something like that which works with actionscript. There are around a 1000 class files and I don't have the time to step through all the code in debug. I have tried a few tools like Doxygen (set the ...

Change the height of a list item when it's in edit mode

I have custom list item renderers and editors for a List control. I need for the editor to have a greater height then the renderer, i.e., the row should expand(in height) when it goes into edit mode. However, even when the list's variableRowHeight is set to true, it doesn't do what I want: the height seems to be based on the height of th...

Can someone explain this bit manipulation code?

I have a tree control with checkboxes next to each node that allows for checked, unchecked and middle checked states on the nodes. When clicking a node, the parent and children are updated. The code I found that does the trick uses bit shifting and I'm trying to understand what exactly is happening. Can someone explain the following cod...

Set text outlining / border in Actionscript 3.0

How can I set the properties for the text outline / border for each character in a line of text in AS3 ? ...

Is it possible to remain in fullscreen mode with another window having focus?

I have a flash panorama that has hotspot links to pop-up windows that contain more information about the object. Right now if you are in fullscreen mode and click a hotspot you are automatically kicked out of fullscreen mode and the pop-up then opens. Is it possible to have the pop-up open and have focus while in the background the pan...

Flex vs. JavaScript

RIA are more richer when it is developed using Flex. Will this be an obstacle for developers using Javascript for front-end? Will javascript be replaced with Flex? ...