actionscript-3

Best approach to change variable values in a compiled SWF file

Is it possible to change the value of a variable in a compiled SWF (using as3) via a servlet (say on a per session basis) before return the modified SWF back to the client. I notice there are a few command line utils as Open Source, but these seem to focus on AS2. Is this possible with AS3 code? What libs are available do this from ja...

Add links to specific points of a flash video

I am attempting to insert links into a video as it is played back. So that a link and descriptive text appear either on or below a video as the narrator movies between subjects. I'm work with a flash video. I think I need to do this using ActionScript (I'm using CS3) but I've never worked with action script. Could someone provide a good...

Acquiring last rendered screen raster in Flash

Is there a way in AS3 to access the last render of the stage? Is that render result cached somewhere accessible? I specifically cannot re-render the stage myself to a Bitmap because that would be far too expensive, which is why I'm trying to use the last render. I need this because I'm trying to do some heat-distortion effects within ...

int(blah) giving different answer from (blah) as int.

Newbie ActionScript 3 question: why does (Math.sqrt((r * r - (r - i) * (r - i)) as Number) * 2) as int give me a different result from int(Math.sqrt((r * r - (r - i) * (r - i)) as Number) * 2) ...

file type was not found when using LineChart in Flex

Hello, I am using FlashDevelop to develop flex applications and wanted to paint a LineChart in a panel. I used an example of Adobe itself to be found here. When I compiled it FlashDevelop showed the following output file type was not found or was not a compile-time constant For Both LineChart and AreaChart. Can someone tell me wh...

Splines in Flex

Hi community, is there a class for connecting points by a spline in flex resp. actionscript? With kind regards Sebastian ...

Code completion for non .as documents in Flex Builder

Is there any way to get ActionScript code completion to work fpr files that don't have the .as filetype? We're using .es for server-side ActionScript and would want Flex to treat them like regular AS-documents. File types can be bound to editors, which brings code highlighting to our .es docs, but code completion still does not work. ...

Flash CS4 Reference for Video Components

I am trying to find a reference for the Video Components that come with flash. I have added them to a MovieClip and I want to control them, but I cannot find any documentation on these classes. PlayButton, PauseButton, SeekBar, VolumeBar, MuteButton, etc. These are components that I assume are part of fl.video, but there is no referen...

ActionScript 3: Set the text of an animated Dynamic text instance

I have a dynamic text field (textLabel) inside a Movie Clip (textMC). I am tring to set the text attribute like this: textMC.textLabel.text = "this is my text"; This works fine, until I add key frames to textLabel. I need to animate textLabel. But when it hits a keyframe, it changes back to the text I created on the stage. How can ...

X,Y coordinates seem to be generated from the middle of an object instead of the top left in flash

I am converting a room editor I had made in AJAX to Flash where users can move furniture around where they want, but I am running into some issues with the x,y coordinates. With the Javascript/AJAX setup, I recorded the X,Y coordinates of the furniture image, and it worked fine from the top left corner of the image. However, now trying...

Can AS3 vectors be declared with a type reference?

Instead of this: var v:Vector.<String> = new Vector.<String>(); is there any way to do something like this? var myType:Class = String; var v:Vector.<myType> = new Vector.<myType>(); Obviously that doesn't work as written, but hopefully you get the idea. ...

Getting total amount of memory, available in Adobe Flash from ActionScript

I have to load a lot of data from BlazeDS and/or Livecycle DS service to Adobe Flex and would like to find out what's available from memory stand point. This is similar to querying in java: long heapSize = Runtime.getRuntime().totalMemory() ...

How do I structure multiple Cairngorm MVC projects that share several components?

I recently completed a project for a custom report UI in Flex. Now, I've been tasked with creating a new application that is essentially a "lite" version of the original UI. It will include only a few of the options that are in the original application. Also, it needs to be a separate application. I do not want to duplicate my code, so ...

What is the best way to architect extended Cairngorm classes to be shared across applications?

I have created a few Event and Command classes for use in my Cairngorm projects. For example, I created an class that extends com.adobe.cairngorm.control.CairngormEvent that allows me to set callback functions upon completion or failure of the corresponding Command. To accomplish this, I also had to create a new Class that implements co...

Flash -> ByteArray -> AMFPHP -> Invalid Image !??

Hi, Im loading images into Flash and using JPGEncoder to encode the image to a ByteArray and send this to AMF PHP which writes out the bytearray to a file. This all appears to work correctly and I can download the resulting file in Photoshop CS4 absolutely fine. When i try to open it from the desktop or open it back in Flash it doesnt w...

Flash: incorrect behavior in everything except Internet Explorer

I'm a complete Flash n00b, but I'm having difficulty and I thought posting my question here was worth a shot, even if it's probably too complex to effectively convey here. My client wanted a Flash intro (yuck!) so I made it so that it results in a menu with links to other pages on the site. To minimize annoying visitors, I'm using a co...

From a Flex application, how to encrypt a string using SHA1 and convert it to base64 string?

I don't know much about actionscript, can anybody throw me an URL on how to do this? ...

Flex compiler warning - variable 'item' has no type declaration

I am tyring to learn flex programming myself. Below code gives me a warning variable 'item' has no type declaration. var xml:XML = xml as XML; for each (var item in xml.employee) { Alert.show(item.@name); } What is the type of variable item? I thought it was XMLNode, but it give me error. I want to remove the compil...

How to make Flex validation message to appear above the field?

Usually validation message appears right to input field: http://aralbalkan.com/wp-content/uploads/2008/01/better-flex-validation-errors.gif But if there is not enough space to right, the message appears above. How to make it always appear above? (regardless of free space etc.) UPDATE It would be great if I could leverage Flex built-i...

Custom Context Menu WITH selectable enabled in AS3

Hi All, I have a Label in AS3 that I want to be selectable (.selectable = true) AND I want the clipboardMenu to show up on right-click ALONG with custom menu items. If I do THIS: var label:Label = new Label(); label.text = "test"; label.selectable = false; var contextMenu = new ContextMenu(); contextMenu.clipboardMenu = true; context...