actionscript-3

Loading ID3 tags without loading sound in AS3

Is there a way to load ID3 tags in AS3 without loading sound? ...

away3d remove from memory

Hello, I am building a website which loads some collada objects for each area. But I couldn't manage to clean the memory. It seems impossible to kill the objects. I've found some samples implementing destroy() methods for away3d internal classes, but they're not working as well. I really don't know if this is a problem with player's g...

Flash AS3 ExternalInterface call to function inside jQuery document ready

From a button in Flash I just want to call a function written in jQuery.When I place the function outside jQuery's $(document).ready it works fine: *btw I use SWFObject to embed Flash. AS3: import flash.external.ExternalInterface; function test_fnc(event:Event):void { ExternalInterface.call("jsFunction", "hello world"); } test_mc.a...

EnterFrame tween calculation returning unexpected result

I have the following bit of code: protected function onEnterFrame(e:Event):void { var diff:Number; // position map/tree if (x != _targetX) { diff = _targetX - x; // get the difference x += diff * 0.2; // tween x position diff = diff < 0 ? -diff : diff; // get absolute value if (diff < 0.05) ...

How to transform a string in function and concatenate with an object?

Hello people, I have the following code in actionscript 3: var async:AsyncToken; async = bridge.retornamenu(); The bridge is a remote object, instantiated. The retornamenu() is the function that I want the remote object open in amfphp. However the retornamenu() is a dynamic function, which turns another function, but I can not run i...

Broken htmlText in Actionscript 3.0 - funky display from incremented display using string.substring

This is an issue with textField.htmlText in actionScript 3.0 and the class I'm making for it. In an attempt not to post my whole class, I've managed to boil down the problem to what seems like a silly and almost impossible-to-overcome issue. It seems that TextFields (specifically, ones created with ActionScript) have an unbearably hard ...

WFS-T in ActionScript 3

My group is working with the GeoServer's GIS server, which provides the WFS service. We are not sure how to make an HTTP POST request in Elips and send the following xml as part of the request: <wfs:Transaction service="WFS" version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:gm...

Dynamically Creating Variables In Actionscript 3.0?

i'm loading several sound files, and want to error check each load. however, instead programming each one with their own complete/error functions, i would like them to all use the same complete/error handler functions. a successfully loaded sound should create a new sound channel variable, while an unsuccessfully loaded sound will prod...

how to load a movie at the end of another movie clip in AS3?

how to load a movie[.swf] at the end of another movie[.swf] in AS3? thanks ...

Flash CS4 <b> tag in with htmlText

Wow, this one is really weird. I have the following setup: Two textfields on the stage with Arial normal and Arial bold, both embedded. I then have another textfield which I am setting like so: tb.htmlText = "Test <b>Test</b>"; For some reason, the bold text is not displaying as bold, but as regular weight. I have tried embedding th...

How to build a game entity list custom data structure

I'm writing a game in Flash (player 10) and need to come up with a good way to manage the list of objects/entities/actors in the game (player character, obstacles, enemies, etc.). It has these requirements: Iterable Objects addable and removable while iterating. Argument to remove() function would be the object to remove, not an index...

Simple flash form, SWF size problem, AS3 and CS4

Hello, I want to do a little form in AS3, with CS4. So I create a new fla, I drop a ComboBox, an InputText, a CheckBox and a Button and the size of the binary (SWF) is 42KB (compressed). It is too much! I want to do a landing page and 42KB just for 4 components is too much. I need to cut the size, I can't stop using any of the componen...

How to create a vertical color gradient (or any other angle besides a flat horizontal gradient)

Hey everyone, my first time trying to draw a multi-color gradient in actionscript 3. So I got this code from the help docs, but I can't seem to get a vertical gradient, whatever formula or number I use for rotate, it stays stuck on the default horizontal gradient :( You can view my gradient here My Code: You can see in the traces the...

AS3 Stop external swf

Hi I'm loading an external swf into a MovieClip, and I want it to stop until I choose to play. Currently it plays upon loading immediately. var mc:MovieClip; var swfLoader:Loader = new Loader(); swfLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, eventLoaded); var request:URLRequest; request = new URLRequest("external.swf");...

counter and displaylist AS3

How can I connect my counter to my display list?I've got a counter and a displaylist working, but I need help with everything in between. Try to explain I finished a Snowflake tutorial. The snowballs are children that are called to the stage. When connected to a dynamic variable, they move around and look like snow. I want my counter to...

Help me design a flex selection list, please.

Let me briefly describe the problem I'm trying to solve, and see if somebody can provide a better solution than I have. At the bottom of it, I'm trying to craft a UI that allows the user to select a subset of a set of columns; there is a set of columns M that the user has to choose from, and they can choose 0..m of these. Additionally,...

Why does flex builder insist on a Main class in the root of the source folder?

Why does FlexBuilder insist on a main class in the root of the source folder? By insist I mean that if I create an Actionscript project called MainTest. A file called MainTest.as will be placed in the root of the src folder. if I now create a package/folder called some/package and place the MainTest.as in it (and adjust the package s...

Actionscript 3.0 Translating HEX to ARGB

i'm studying getPixel32() and the Bitmap and Bitmap Data classes. Basically, i'd like to know how to output a simple trace of an ARGB from a hexadecimal value. as an aside, i'm under the impression, which i assume/hope is wrong, that hexadecimal values can't produce as many colors as RGBA values. perhaps "web safe" has thrown me off...

Trace Function Not Returning XmlList.length in As3

Hello, I'm looking to populate an array with bitmapdata based on some xml I load. The problem I'm having is I can't seem to get the length of my XMLList... var path:String = "http://mydomain.com/"; var bDataArray:Array = new Array(); var xmlLoader:URLLoader = new URLLoader(new URLRequest(path + "includes/categoryOutput.php")); xmlLo...

Unit testing a library with AsUnit in Flex Builder

I've been trying to setup a working method for unit testing flex libraries using Flex Builder. I have tried setting up a standard flex lib project and using Ant to compile and run the units tests. But this means that when something does go wrong and I want to use the flex builder debugger I cannot do so. So my next plan is to setup the...