actionscript-3

E4X: grab nodes with namespaces?

I want to learn how to process XML with namespaces in E4X so basically here is what I want to learn, say I have some XML like this: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"&gt; <rdf:item value="5"/> <item value="10"/> </rdf:RDF> How could I assign < rdf:item /> to a v...

A bug in CSS identifiers for AS3?

I'm not sure if it's a bug, but is there any way to target the "class" or "id" identifier to style heading tags (h1 to h6) using ActionScript 3.0 CSS? It works fine with all the other tags. eg.: <p class="style1">text</p> // I can use .style1 or p in the CSS <h1 class="style2">text</h1> // I can't use .style2 in the CSS, only h1 ...

How do I convert WebService result typed as ObjectProxy to XML?

I have a WebService that returns XML in a SOAP response: <?xml version="1.0" encoding="utf-8" ?> <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/XMLSchema"&gt; <soap:Body> <GetConfigResponse xmlns="Web.Services"> ...

Flex 3 Tooltip

I am using a custom advanced auto-complete component. Selected items do not have a tooltip by default, but I would like to use the label as my tooltip. The arraylist allQuestions is the dataprovider to my component. <components:AdvancedAutoComplete id="addQuizQuestions_txt" width="800" height="300" dataProvider="{allQuestions}" labelF...

How do I make an auto-scrolling dynamic txt field with actionscript 3?

I'm trying to add scrolling text to a small mp3 player application I'm working on and I'm running across some problems. Namely, that I'm not that well versed in movie clips. I was wondering if anyone knew of any good actionscipt 3 tutorials for auto-scrolling text or basic movie clips stuff (frames etc.). I've found lots of tutorials b...

In as/flex, Is it possible to find all Classes in a package that implement a certain interface?

In as/flex, Is it possible to find all Classes in a package that implement a certain interface? ...

Flash Tab Order changes

Hi, I'm trying to add some accessibility for screen readers into a Flash application, and am running up against a sticky point. The order for tabbing through elements is set by those elements' tabIndex property. The difficulty is, the tab list constructed from these seems to be permanent, but the content of the application is dynamic (b...

Flex TextArea Keep focus/selection when a button is clicked.

Hi I am wondering how I would keep the focus/selection on a TextArea even when a button outside is clicked. Like how the RichTextEditor does it. ...

Mouse position on screen in flex

I am trying to obtain the actual mouse co-ordinates on the screen so I can create a Native Window at that position but I dont seem to be able to find the right way to do this correctly. I have tried various things, the closest thing I have at the moment is: this.contentMouseX and this.contentMouseY This gives me the coords on the cur...

How to go to URL once button bitmap img on Flash is clicked - Action Script

Good day. I have little usage of Flash CS4, however i have to build a small animation. It as six different bitmap images, each one with a effect on rollover. However i want to each one of them to open a URL in a new Tab/Window when clicked. And if someone know how to load each one of those URLs from a textfile. I would be very than...

URLLoader fails randomly without throwing an error or dispatching any events

In Adobe AIR 1.5, I'm using URLLoader to upload a video in 1 MB chunks. It uploads 1 MB, waits for the Event.COMPLETE event, and then uploads the next chunk. The server-side code knows how to construct the video from these chunks. Usually, it works fine. However, sometimes it just stops without throwing any errors or dispatching any eve...

Flex Warning: Unable to bind to property 'foo' on class 'Object' (class is not an IEventDispatcher)

I know this is a fairly simple question, but I'm sure I'm not the first to have it, and won't be the last, so I thought it might be a good idea to get the answer in Stack Overflow for the benefit of everyone else, as well as not bugging my local Flex guru. I've got an object that contains a dozen or so fields I want to bind to form elem...

flash event listener for global events

I have a series of MovieClips, held within several MovieClips, that dispatch a custom move event that I would like the stage to listen for and interact with. Is there a way to add to the stage (or any Object) an event listener for any event of one type, regardless of where it was dispatched from? For instance, could I add to the stage a...

How do I get rid of a null StyleProtoChain object reference?

Hi Guys! Here is the error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.styles::StyleProtoChain$/initProtoChainForUIComponentStyleName()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\styles\StyleProtoChain.as:72] at mx.core::UIComponent/http://www.adobe.com/2...

Pass Image from Flash to ASP.NET

Quick version: How do I get an image that was generated on the users browser back to the server? The current plan is this: 1.) The Flash developer will convert the bitmap to JPEG 2.) He will then POST the JPEG to a page on the site. 3.) I'm thinking I can create a WebService which will use a StreamReader to read the post and save it off...

ActionScript 3: Measuring elapsed time between enterFrame events.

I have an EnterFrame event, and I want to know the exact time between calls, so I will be able to animate objects more smoothly when the computer can't produce the desired framerate. ...

ActionScript 3: Smooth programmatic animation

I want to animate MoviveClips/Sprite objects as smootly as possible. However so far the only method that works is placing the movement code into the EnterFrame event handler. There is one problem with this approach: when the framerate on a specific machine is below the desired framerate then the whole game slows down. I want to be able t...

Syncing Frames to Audio and channel.position Acuracy

Calling channel.position on an ENTER_FRAME event, I notice that it's not being updated every frame, but it looks more like every frame and a half. var sound:Sound = new Sound(new URLRequest('music.mp3')); var channel:SoundChannel = sound.play(); // assume the sound is completely, // totally, 100...

AS3 Project - Mouse Move Listener Reacting Outside of Application

I'm getting an unusual behavior that I can't seem to get to the bottom of. When I run this, if I move in the swf area it traces normally on mouse move. To be expected. But it's tracing for the move event when I click anywhere on screen. If I click and drag, it traces as if I were moving in the swf area of the browser. Here's the code. ...

move data from progress event to another class

in Flex if i have a loader class (i.e., XMLLoader) and a document class (document.as) and in document.as I'm instantiating XMLLoader var ldr:XMLLoader = new XMLLoader(url); ... and on the document.as class I have a text box, which I would like updated with the progress from that XMLLoader is making by using URLLoaders progress event, ...