actionscript-3

As3 Encryption library

Which encryption libraries are available for actionscript 3.0? my preference is on performance compared to price. ...

[Flash] Loading image in several passes

I know it is possible. I have seen it a couple of times, but it always struck me with: "how did they pull this off?". Those images that build up while loading, it's some kind of progressive image loading. It starts out with a low res version, and then a slightly higher res, and then slightly higher until full quality is loaded. Would any...

Creating a multi-language ActionScript 3.0 site

I am aware of the built-in 'Strings' panel within the Flash IDE, however is this the best way to go about creating a multi-lingual AS3 site/application nowadays? Are there any recommended 3rd party APIs/frameworks available? Ideally I'd like to be able to change language on the fly and support as many character sets as possible, I will ...

Adding LegendItems in Flex places horizontally not vertically (as it's supposed to)

I'm dynamically inserting LegendItems into a Legend using the following code: signalLegend.removeAllChildren(); signalLegend.direction = "vertical"; for (var i:int = 0; i < numItems - 1; i++) { signalLegend.addChild(new LegendItem()); legendItem = signalLegend.getChildAt(i) as LegendItem; legendItem.label = "Title here"; ...

Flex Bipmapdata and Scrolled Canvas

Hello, I have a canvas wich is a drawing area. This canvas can be scrolled horizontally and vertically. I am trying to make a screenshot of the whole canvas, this include visible and scrolled parts. var bmd:BitmapData = new BitmapData(board.width, board.height, false, 0xffffff); bmd.draw(board); This would only show me the visible ...

Flex Child Canvas insise a Canvas and resizing question

Hi, I have a Canvas A with scrollpolicy on, A has one unique Child canvas B which has no scrolling. A is the container of B which is a whiteboard like tool. If i dont set width and height of B, he will resize accordingly to A size, up to a certain point where A has scrollbars which is the good Behavior. However since B canvas seems t...

Flash AS3 - how to set Imported textfield movieclip as unselectable

Hey there, I created a graphic in Flash CS4 that contains text. I embedded the appropriate characters then saved it as a MovieClip into my library. I then exported it to an SWC file. In my AS3 code (using Flex SDK/notepad), I then import the movieclip and assign it some mouse events so I can use it as a button. Unfortunately, all the ...

Flex Type Coercion, it's gone mental I think...

I have a class essentially: public class WindowEvent extends Event { public static const WARNEVENT:String = "warnEvent"; public static const TASKREQEVENT:String = "taskRequestEvent"; public static const TASKANNOUNCE:String = "taskAnnounce"; public static const WINDOWCHANGE:String = "windowChange"; public static const...

Flash & Flex SDK/AS3 - How to keep keyboard focus?

I'm writing a flash application in Flex/AS3, and I can't seem to assign keyboard focus to it. I was mindful of this problem early on in development and added a splash screen with a "play now" button, to entice the user to click. However, the user must then click a second time on the application for the keyboard to work! To make matters ...

AS3 RegExp to match words with boundry type characters in them

I'm wanting to match a list of words which is easy enough when those words are truly words. For example /\b (pop|push) \b/gsx when ran against the string pop gave the door a push but it popped back will match the words pop and push but not popped. I need similar functionality for words that contain characters that would normally q...

How to Site-Lock a Flash Application?

I have a flash application that I am going to put up on my website shortly. I want to be able to "lock it" to the site to prevent: Hosting the .SWF on another site (after an illicit download), and Preventing the .SWF from opening if included in an iFrame on another site While allowing: A whitelist of sites to be passed through/enab...

How to make a Flash PreLoader in AS3 Only?

I want to incorporate a Flash Pre-loader in my application, but I am using only Flex SDK/AS3/Notepad to code this beast. I don't have access to the Flash IDE. There are many tutorials and helpfiles online for how to do it within CS4, but not in the code itself. Can anyone give me direction here? Most examples seem to pivot around placi...

How to stop Flash file (.swf) from loading (ActionScript 3)

Suppose I have a large .swf file. Say, it's 10MB. I don't want the browser to load the entire file until user clicks a button in frame 1. I don't want to use external files. I just want Flash Player to download first 10KB, display frame 1 and then stop until user click the button. Is it even possible? ...

Flex slow first Http request

Hi, When i use loader.load(request); for the first time, my flex freeze for 10 secondes before posting the data (i can see the web server result in real time). However if redo a similar POST with other data but same request.url, it's instantaneous. // Multi form encoded data variables = new URLVariables(); variables.user = "aaa"; variab...

Styling UITextField

I've been playing around with different methods of determining at runtime the width of a "label" so that I can resize the "label" because I don't want it to truncate. I've finally found an easy solution through UITextField which allows me to set the .autoSize which is great! However, now I'm trying to "style" (simply adjust font and fo...

ActionScript 3.0, dynamic scroll bars

I'm trying to create some dynamic scrollbars for a project I'm working on in Flash (ActionScript 3). I had written scrollbars a while ago in AS2, but I can't seem to sort out everything in my mind for AS3. Basically, I'm looking for a tutorial exactly like the one at http://tutorials.parseidon.com/code-script/actionscript/flash-scrollb...

Growl like notifications in Flex

Has anyone heard of a library to achieve such an effect in flex apps ? Otherwise it just be a simple panel with some skinning, fading effect and a timer. ...

Want to send parameters with custom dispatch event

I am creating a library. Here is an example [Event (name="eventAction", type="something")] public function create_new_customer(phone_number:String):void { -------------; ----; ------------; rpc.addEventListener(Event.COMPLETE, onCreate_returns); } private function onCreate...

AS3 - Output what object has keyboard focus?

I'm having a problem with AS3 and keyboard focus, and I'm wondering if there is a variable or a function I can use that will output to screen the name of the object that currently has keyboard focus? ...

Making loaded image draggable actionscript 3

Hi, i want to load an image to stage using Loader and then I want to make it draggable. Loading is done by selecting from tilelist as seen below, but I have no idea about drag and drop in AS3, can anybody help me? I want to make it as simple as possible. Here is my code to load image: var charge1:Loader = new Loader(); addChild(charge1...