actionscript

Split String into Array in Flex

I am getting the output as 0,1,2,3. I need this to be split into array ...

Can I dynamically generate a 300 dpi image from a flash file?

I'm using a compination of actionscript's getPixel and php's imagecreatetruecolor and imagesetpixel to generate a png image of an swf movie inside a browser. At the moment it will output a 72 dpi image at the same resolution as the swf movie, but I've been asked about the possibility of generating a 300 dpi image instead. Is this possi...

Vector.<> vs array

What are the pros and contras of using a Vector.<> instead of array? ...

How to load a preloader in Actionscript3?

I want to load a preloader (call it "target app") into my own Flash application (call it "hosting app") via Loader. The target app loads like a typical preloader several other SWF files via relative paths and starts the target app. If the hosting app and the target app are residing in the same directory everything works fine. If the opp...

clickTAG isn't working

I made a banner ad and the site gave me this code to work with: on (release) { if (clickTAG.substr(0,5) == "http:" ) { getURL(clickTAG, "_blank"); } } I made an invisible layer and put this code on it. The swf showed the hand, but when I clicked on the banner nothing happened, on my end or on the live site. Then I used this code: o...

Adobe Socket Policy File Server Problems

Has anyone been able to successfully implement a service to serve the required socket policy file to FlashPlayer? I am running the Python implementation of the service provided by Adobe at http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html and using the following policy file: <?xml version="1.0" encoding="UTF...

AS3: Extending The Dictionary Class - Accessing Stored Data

So I want to extend the dictionary class. Everything works so far except that in some of my methods that need to reference the dictionary's content I make a call like: this[ key ] It doesn't like that. It just tells me that there's no property 'key'. Is there a way to way to access the data within this class? Also, I'm using an inte...

Loading a Blogger page in an XML object in ActionScript results in missing tags

Whenever I load any blogger page through an XML object in actionscript 2 almost all of the contents of the page magically disappear. I would assume that since the pages are in xhtml that this should work. Here is what I get if I try to load Steve Yegge's blog: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/T...

Good way to rename fields in Actionscript array?

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

Hidden features/tricks of Flash development, Flash language (AS2/3), and Flash IDE

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

Finding the longest chain of same-type nodes

I have a tree structure of interconnected nodes of various types. Each node keeps track of which nodes it is connected to. In this structure I need to find the longest unconnected chain or path of same type nodes. I've read up on graphs and breadth/depth first searches but these don't quite yield the results I need. (they'll find a chai...

How to force a resize from a child to a parent

I have a page-like flex application. In my main application is a holder (a canvas) that displays all the pages. The problem is that the components that are loaded inside the holder are bigger than the holder is when the main application starts. The holder height is set to 100% but still he gets scrollbars when I load a bigger component i...

Flex/ActionScript: Support for localizing numbers and dates?

Does Flex/ActionScript offer support for localizing numbers and dates to a user's particular region? ...

ActionScript 3 code folding/regions

Is there any way to create foldable regions of code in ActionScript 3 (read this as Adobe Flash CS3 built-in editor). I'm looking for something like in MS Visual studio so that I can do: #region "Event handlers" ... big list with methods here #end region Any ideas? ...

Binding to an specific property of objects in an array

I am using Flex to create a small form. All I have at the moment is a List component, that I want to populate with a list of font names. I am getting the fonts using Font.enumerateFonts(true);. This returns an array of flash.text.Font objects. The Font objects have a fontName property that is a String of that fonts name. My problem is...

ActionScript: Package-level introspection? Or some other pluggable loading scheme?

I'm coding up some delicious business logic and I've come to a situation like this: There are a bunch of rules (ruleA, ruleB, etc...) which all follow a standard pattern. I've created a Rule interface, and implemented it in RuleA, RuleB, and so on. So now I just need a way to load them. Right now I'm using a map: var rules:Object = {...

How to get the MouseEvent.localX and localY of a target but not its child objects?

I'm creating a simple drawing application that adds new Shape objects to a MovieClip "canvas" every time the user clicks and drags. The problem is, I'm noticing that even though the MouseEvent listeners are set to the MovieClip, the child Shape objects are being returned as targets as well. This disrupts the localX and localY as well, ...

actionscript httpservice authentication popup

Hi, when using the Flex mx.rpc.http.HTTPService object to send a request that requires authentication I'm setting the headers to do authentication (which works fine..) but, in the case where the wrong authentication details are sent, an operating system level popup is being seen. Apparently on the URLRequest object there is a property...

Is Aviary a Flex application?

I wonder if www.aviary.com web applications are builded using flex framework. Does anyone know? ...

ActionScript 3.0 stageWidth in custom Class

How do I access Stage Class properties in Costum Class? Class: package { import Main; import flash.events.*; import flash.display.Sprite; import flash.display.Stage; public class Run extends Sprite { var obj:a1_spr; public function Run() { runAssets(); } private function runAssets():...