actionscript-3

FLASH save frame, to image (tiff, bmp, jpg, gif, png)

The title sort of explains itself. I am making some 'genrative' artwork in flash. Now I want to save the frame without making a screenshot so-on and sofort. And perhaps one day i would like to save a batch of frames. Is there an AS3 class/library out there that could help me out ? ...

What might cause connection errors when using bidirectional localConnection in Flash?

I'm trying to setup a bidirectional localConnection (LC) between two flash objects on the same web page. One object is AS2 and the other AS3. I'm using one LC object to send and receive data on each swf. (This shouldn't matter, right? I tried using two objects, one for sending and one for receiving, but got the same problem). They .c...

Why does Flash CS3 require you to specify the base class when exporting for actionscript (as3)?

In the library, right-click on a movieclip that you have written an ActionScript class for and select "Linkage...". Notice that the "Base class" field is not empty (it can't be). It's likely to be flash.display.MovieClip, but it could be something else, depending on what your class inherits from. This base class field is only required wh...

Browser links in Flash projector open but stay behind flash app

I have a flash projector file that is going on a CD-ROM. One section is just a simple list of links to useful websites. These links were created by adding URLs in the properties box to static text. The projector is running in full screen mode and was made using Flash CS3. This is the behaviour when running the flash projector app in Win...

Flex - URLLoader and HTTPService...

I use URLLoader to load data into my Flex app (mostly XML) and my buddy who is doing the same thing mostly uses HTTPService. Is there a specific or valid reason to use on over the other? ...

drag-and-drop problem in a Tilelist using an ItemRenderer

Hello, in my flex application, I created a Tilelist. In this Tilelist, I am using an ItemRenderer to create a box consisting of an image and an VSlider in each tile. The tile need to be dragable when you click on the image, but not dragable when you slide the slider. How can I achieve this ? I have been scratching my head searching on...

Convert encoding in flash actionscript 3

Is there any function like php's mb_convert_encoding which can convert an encoding to another? I want to convert the utf-8 text, passed in a input field inside the flash, to iso-8859-7 encoding. ...

Tutorials to start learning Actionscript 3.0?

Hey guys, I already know Java, Objective C, C#, and some Python. I want to be able to integrate with XML or a MySQL database for dynamic content. What are some tutorials or online references that would get me up and running with Actionscript 3.0? ...

How do I find the length of an associative array in ActionScript 3.0?

Is there a simple way to retrieve the length of an associative array (implemented as an Object) in ActionScript 3.0? I understand that there are two primary ways of creating associative arrays in AS3: Use a Dictionary object; especially handy when the key does not need to be a string Use an Object, and simply create properties for eac...

Trying to send an HTTP request over sockets.

I'm having trouble sending out a simple HTTP request using Actionscript 3's Socket() object. My onConnect listener is below: function sConnect(e:Event):void { trace('connected'); s.writeUTFBytes('GET /outernet/client/rss/reddit-feeds HTTP/1.1\r\n'); s.writeUTFBytes('Host: 208.43.71.50:8080\r\n'); s.writeUTFBytes('Connect...

Passing around XML Object vs. Populating a struct

Actionscript 3.0 has decent native XML support so I'm not surprised to see a lot of people loading an external XML and then passing the object around to various modules/sections of code. However my instinct is to create a class (i.e. with statically named/typed fields), populate it from the XML and pass THAT around instead. The advantag...

Decoding chunked HTTP with Actionscript

I have successfully connected to an HTTP server with ActionScript 3 over sockets. The only problem is, the server is sending chunked HTTP. Is there a generic function in any other language I can look at that clearly shows how to decode the chunking? I'm pretty sure there are no ActionScript libraries around for this. ...

Specifying multiple parameters of the same name using HTTPService

Ruby on Rails controllers will automatically convert parameters to an array if they have a specific format, like so: http://foo.com?x[]=1&x[]=5&x[]=bar This would get converted into the following array: ['1','5','bar'] Is there any way I can do this with an ActionScript 3 HTTPService object, by using the request parameter? ...

How do you hook up a Module thats loaded dynamically in the PureMVC framework for ActionScript 3

I'm using the PureMVC framework on a FlexBuilder 3 project. I have already hooked up the ApplicationFacade and have executed simple commands successfully. I have a ModuleLoader in my entry point Application.mxml and I set the url of the ModuleLoader when the user logs in from the ApplicationMdiator. Where do I register my module media...

Sandy 3D: Creating a Room with Physics

Hello, I was wondering if anyone can help me get started with creating a room in Sandy 3D. I know I can generate the planes, but I am unsure as to how to implement simple physics (i.e. the player cannot walk through a wall). Is there a simple way to do this, or should I look into something like WOW (3D physics engine for Flash)? Thanks...

Why does Flex let me treat a class as an object

This code is blunderous, as it adds a class to an array and later tries to pull it and manipulate it as if it were an object. private function fail(event:Event):void { var myObj:MyClass; var a:ArrayCollection = new ArrayCollection(); var x:MyClass; var y:MyClass; myObj = new MyClass; a.addItem(myObj); a.addItem(MyClass); // !!B...

How to use "native" custom mouse cursors from within Flash apps?

The most common way of changing a cursor in Flash apps seems to be based on simply hiding the native OS cursor and displaying a graphic (drawn by the Flash Player) inside the Flash rectangle where the (hidden) cursor would be. This is what mx.managers.CursorManager does, for example. The reason why I find this approach unacceptable is th...

What restrictions does public/private have in actionscript functions?

I'm currently maintaining some flex code and noticed very many functions which are declared like: private function exampleFunc():void { .... } These functions are in the global scope, and aren't part of any specific class, so it's a bit unclear to me what effect declaring them as private would have. What restrictions does the "pr...

Unhandled Socket securityError even when (seemingly) handling it

I Have a problem where I occasionally (i.e. not always) see the below error popup from the Debug Flash Player after launching my app: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://example.com/myApp.swf cannot load data from localhost:4499. at org.mydomain.mypackage::MyClassUsingSocket() ...

Test if an object is defined in actionscript

In actionscript, how can you test if an object is defined, i.e., not null? ...