actionscript-3

Flex Tree, Slelecteditem == XML(node);... BUG??

when i selected a XML node to tree by doing... i am using flex SDK 3.5 it was working fine in SDK 3. tree.selectedItem=XML(node); and then get.. trace(tree.selectedItem.toString()); i get error that object is null... ...

ActionScript3: Load XML located inside .swc

I have written a Flex Library project - a .swc file - which is supposed to read default configuration from a XML file inside .swc. This .swc file would be used by other modules to perform some operation. I am unable to make the URLLoader to load the XML inside the .swc file. When i run this as a normal Flex project, things work fine wi...

360 rotation degrees to 2d object from 3d papervision object in actionscript

Hey guys, Some reason I've been struggling with this for a while. I have a papervision camera of which turns using keyboard input, I have a radar of which I would like to orientate to direction when the camera turns. I have it all working apart from mapping my (camera) DisplayObject3D.rotationY to RadarInterface.rotation correctly. T...

Flex webservice request

I am having a small problem with a soap request in flex. If i use a third part tool like .NET WebService studio the request is: <?xml version="1.0" encoding="utf-16"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchem...

Migration from design to programming, AS3

I've got in over my head trying to learn programming, but love it. How would you teach a designer to migrate from design to object oriented programming? My interest is AS3 in Flash IDE, but any advice is welcome. Looking for a full explanation. THOUGHTS Designers learn differently Designers may need visual cues Designers may have di...

Flash As3 Mute Button problems

Hey guys, I am trying to create a UI movie clip that can be used across different scenes. It uses variables from the root scope to determine states. When i press the mute button is works fine, however when i try to un-mute things go weird. Sometimes it takes 2 clicks to unmute, sometimes more. It seems random. Muting however seems t...

AS3 Loader() - loading multiple images with one loader.

I am attempting to load multiple images in AS3 and I'm exploring different options on how this can be done. I would like to have to only use one Load() instance and handle the various image assignments in the onComplete handler... here is my first attempt: var buttonLdr:Loader = new Loader(); buttonLdr.contentLoaderInfo.addEventListen...

XML, pass values to timer, AS3

My timer has three variables that I can trace to the output window, but don't know how to pass them to the timer. How to I pass the XML values to my timer? Purpose I want to test with an XML document, before I try connecting it to an XML socket. myXML <?xml version="1.0" encoding="utf-8"?> <SESSION> <TIMER TITLE="speed">100</TIMER> <...

Get the "key" of an object in Actionscript-3

Given an Object: myObj = {key : 'value'} How do I get the key? ...

Flex 3 Regular Expression Problem

I've written a url validator for a project I am working on. For my requirements it works great, except when the last part for the url goes longer than 22 characters it breaks. My expression: /((https?):\/\/)([^\s.]+.)+([^\s.]+)(:\d+\/\S+)/i It expects input that looks like "http(s)://hostname:port/location". When I give it the input:...

Streaming audio track from youtube with ActionScript 3

Is it possible to get only the audio track from the youtube AS3 api? Or just parts of it? ...

Flash Builder 'building' html files...

I'm using Flash Builder 3 to edit my Flex app, but I noticed that every time I make a change on the .html files (index.template.html for example), even if it's not in the IDE but with another program, Flash Builder rebuilds the whole project. Is there anyway to stop this? Why would it need to rebuild the workspace everytime a html file ...

Amazon S3 and swfaddress

I recently migrated a large AS3 site (lots of swfs, lots of flvs) to Amazon S3. Pretty much everything but HTML and JS files is being stored/served from Amazon, and it's working well. The only problem I'm having is that I built the site using SWFaddress (actually, via the Gaia framework which uses SWFaddress), and for some reason, SWFa...

AS3 TextField is blank, doesn't accept any of my settings??

Having a strange issue with assigning a TextField to a movie clip. nameFormat = new TextFormat(); nameFormat.size = 14; nameFormat.color = "0x000000"; nameFormat.border = true; nameFormat.font = "Arial"; charName = new TextField(); charName.defaultTextFo...

toggle flash player release / debug

I would like to switch from the debug version of the player to the release without having to uninstall. Is this possible? ...

How to smooth an image loaded with FileReference?

Been trying to smooth images loaded with FileReferece with no luck. Below is the code I'm using: fileRef = new FileReference(); fileRef.addEventListener(Event.COMPLETE, fileLoaded); private function fileLoaded(e:Event):void{ var ldr:Loader = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, funct...

Valid JavaScript code that is NOT valid ActionScript 3.0 code?

Most JavaScript code is also syntactically valid ActionScript 3.0 code. However, there are some exceptions which leads me to my question: Which constructs/features in JavaScript are syntactically invalid in ActionScript 3.0? Please provide concrete examples of JavaScript code (basic JavaScript code without DOM API usage) that is NOT val...

Binding key/value pairs loaded from xml

I want to load key/values configuration pairs stored in XML file. To bind a collection of data i know i need to use the ArrayList class, but the problem is that i want to be able to bind the loaded values using their corresponding keys and not by their indexes in the ArrayList object. For example i want to be able to do this : <mx:Tex...

Is it a bug in Ecmascript - /\S/.test(null) returns true ?

Both in Actionscript3 and Javascript these statements give the same result: /\S/.test(null) => true /null/.test(null) => true /m/.test(null) => false /n/.test(null) => true Seems that null value is converted into string "null" in this case. Is this a known bug in Ecmascript or am I missing something? ...

Creating a variables file in Flex 3...

I am trying to place API variables on ONE class file or mxml file and call these variables in other random class or mxml files... any suggestions? ...