actionscript

Flex: How to add horizontal axes to a chart?

I have a dynamically created chart and I need to add a horizontal and vertical axis in a script. I can't put the chart into MXML because I'm dynamically changing the chart type, deleting and creating a new chart. Therefore, the variable that I use to create the chart, an instance of chartBase, doesn't have either a horizontalAxis or vert...

Changing Colours Dynamically in AS1

I can't get this to work in my AS1 application. I am using the Color.setTransform method. Am I correct in thinking the following object creation should result in transforming a colour to white? var AColorTransform = {ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:255}; And this one to black? AColorTransform = {ra:100, rb:...

FLV Playback - scaling and smoothing vs. hi-res?

Hi guys, I'm building a flash site (as3) with large videos that act as transitions from section to section. The videos don't scale; in order to accommodate users with large monitors, we're planning on playing back HD video and only showing users the center of the frame (depending on their screen size). That is, there will be a central...

loadin components through xml

How to load flex components through xml? ...

loading flex components using xml

How to load flex components using XML. The scenario is simple as like this, i need three buttons to appear in my panel, but the option true or false whether to appear should be in xml. ...

NetConnect fails silently in Flash when called from SilverLight

This is a complex question, because there are a lot of moving parts. My apologies in advance. I'm trying to write a Silverlight control that hosts a Flash camera and microphone (since Silverlight doesn't support these things natively, worse luck). I've written a short little Flex application ("WLocalWebCam.swf") which handles the came...

Find the word the mouse is over for Text component (Flex/Actionscript)

Is it possible (if so how) to find out what word the cursor/mouse is over when it is moving over a < mx:Text > component? So for example as the user moves the mouse along a sentence (inside text component), each word will highlight as they go (I know you can highlight while pressing the mouse button down - but that not how I wish to do i...

MovieClip inside another MovieClip for a drawing applet. Why and how?

I'm trying to figure out a simple drawing program in Flash and it's giving me trouble. The main drawing area is a MovieClip named drawZone. However, when displaying something, the author uses another MovieClip embedded in the drawZone Symbol named zone. The drawZone Symbol has 2 layers, a mask layer and a masked sublayer that contains th...

How do I wait for an external .txt file to load in ActionScript 3?

How do I wait for an external .txt file to load in ActionScript 3? If I use URLLoader, I have no guarantee that the file has loaded, since it dispatches an event when it's complete. I'm calling the loader function from another class, so I can't simply stick the next actions into the event listener. ...

Using ExternalInterface in Flash

Hello all, I'm trying to edit some flash to make an external javascript function call, but with no success. Here's my actionscript 2.0 code: //testing external .js calls import flash.external.ExternalInterface; //attempting to make external js call ExternalInterface.call("createPlaylist","It's my Life!"); and here's my javascript; ...

AS3: How can I fire events when a property is changed in a über class?

I have a TextField inside a Sprite and I always want the alpha of the TextField to be equal to the alpha of the sprite. How can i subscribe to the changes made in the Sprite? I guess i need to fire a PropertychangeEvent some how, but I can't see that sprite supports this out of the box? class TextWidget extends Sprite{ private var t...

Linear tree in Flex

<mx:Script> <![CDATA[ private function openAllNodes():void { tree.openItems = dp..node; } private function closeAllNodes():void { tree.openItems = []; } ]]> </mx:Script> <mx:XML id="dp"> <root> <node label="Parent 1"> <node label="Child 1" /...

Adding events to menu options

//ActionScript code import mx.controls.Menu; import flash.events.MouseEvent; private var menu12:Menu; private function init():void { menu12 = new Menu(); menu12.labelField = "@label"; menu12.dataProvider = xmlDP; menu12.showRoot = false; menu12.width...

Flash trace output in firefox, linux

I'm developing an applications which I've got running on a server on my linux desktop. Due to the shortcomings of Flash on Linux (read: too hard) I'm developing the (small) flash portion of the app in Windows, which means there's a lot of frustrating back and forth. Now I'm trying to capture the output of the flash portion using flash tr...

How do these vars get initialised?

The following code is a combination of samples taken from red5. Basically I am trying to combine a live stream subscriber with a chat box based on shared objects. I'm not a flash developer and have a very limited understanding of what is going on here. // ** AUTO-UI IMPORT STATEMENTS ** import org.red5.utils.Connector; import org.re...

erasing sprite graphics?

If I have a sprite, with which I have drawn some stuff, how do I erase part of what I have drawn? Preferably I could use drawRect with some "alpha=0" paint. However, I don't believe beginFill lets you set an rgba color (like you can in bitmapdata). Setting alpha = 0 in beginFill doesn't really do anything -- it just draws nothing. In...

Beginner Actionscript reference

My eight years old son asks to "teach him programming in Flash". Can somebody refer on good Actionscript learning resource online? The Flash version we have is "Flash MX". Thank you in advance. ...

Actionscript 3.0 Best Option for Subclassing Vector Class (Flash Player 10)

I would like to take advantage of all the goodness of the newer Vector class for FP10, but it seems it is marked as final. I am doing some intensive mathematical processing in Actionscript, and repeatedly process arrays of Numbers. I have previously been using my own subclass of Array(I call it NumericArray), with added functions such a...

Get the most average position of X objects on a path with Y available positions

Hi, Its friday, and in local time the clock is 3.22pm, so my brain wont give me a solution, so i ask: Im trying to write a function/algorithm in Actionscript 3.0 that gives me the most average positions of x number of positions along a path of y number of available positions. Y is always larger than X of course. The background is, I ...

Why isn't flash updating the display while the mouse is clicked and moving?

I have a flash clip that moves a movieclip when the mouse is clicked on the movieclip. Something very basic. I'm not using drag (since the MC doesn't move with the mouse all the time), but rather using onMouseMove to update the MC location according to _xmouse, _ymouse and some other calculations. The problem was that under internet ex...