actionscript

AS3: declaring an "undefined" parameter for int, uint or Number

I'd like to implement the following logic: function setMyValue (myVar:int = undefined):void { if (myVar == undefined) { /* Generate a value for myVar */ } else { /* Use the supplied value for myVar */ } } So if the value is supplied, use it. If not, generate it. Seems simple enough. Problem is that A...

Easily access an array based on its dimensions

Lets say I have an array which has n dimensions. Now in order to access a slot you typically use: array [1][0] What if the number of dimensions are not known at compile-time, is there an easy access like: slot = "1,0" array [slot] // accessing 1,0 Which means I can also easily navigate back and forth slot += ",2" array [slo...

Dynamic alignment in ActionScript 2.0

Hello people, I'd like to be able to press a button and get a set of movie clips arranged in a row, how would I go about this? ...

How to access an html element in flash?

I have an html page with a flash movie embded in it, that flash movie contains a button. I want to pass the id of an element on the containing html page to the flash movie so that when the button is clicked, I get the text of that element in flash (i.e. innerHTML). So, my question is basically two questions: How to pass something from...

How do I generate SWX data files serverside?

By storing data in SWX files on the server, it can be interpreted automatically like loading one SWF into another. Now I'd like this data to be modified by server side code, how can I do this? Are there any SWX libraries for PHP that I can use? ...

Getting Computer information using Flash

Is it possible to retrieve computer information (RAM, hard drive size, cpu speed, etc.) using Adobe Flash? If so, can someone point me to a web site showing me how? ...

arbitrary number of anonymous Loader handers with individual data ?

I have an arbitrary number of files that I need to load in an AIR app. I want to iterate through an array of File object and create and launch Loaders for each one's File.url. When they are done (event COMPLETED or IOErrorEvent.IO_ERROR), I want to stuff their data somewhere. If they fail, I want to make an exception report. I cannot f...

actionscript to java (red5)

I'm trying to migrate an existing actionscript program (server part) to java (red5). However, I'm blocked with the following code : Client.prototype.requestInterview = function () { }; Does anyone know what is the equivalent of Client.prototype in red5 ? Thanks in advance, Massi ...

Can't get ExternalInterface in flash to work...

Hello all, very new to flash. I'm using the XSPF music player (the slim version found here (http://musicplayer.sourceforge.net/), written in AS2) to play through a list of mp3s on a website. I need to make a javascript call each time it loads a track. I'm attempting to do this through ExternalInterface, but so far with no luck. Here's my...

See trace() of Flash when running in browser

Whats an easy way to see the trace() of Flash/Flex movies when running in any browser? ...

AS2: Case of the lost reference

Hello, I have a problem with a lost reference in a project where one SWF is loaded into another. Here's a description of what the program looks like and how it functions. I have a Container flash-project+SWF-file that functions as a window around another flash-project+swf. In the outer-window I create pop-up movieclips triggered by an ...

red5 actionscript

Hi all, How to get a parameter encode in the url ? for exemple, if we have an html file containning : how to get the value of a from application.java class ? Thanks ...

red5 actionscript and LoadVars

is there any equivalent of LoadVars class for red5 ? if there is no equivalent, how to have a have same behaviour as functions load and sendandload of LoadVars ? ...

ActionScript 3 dynamically call buttons

Hi, I've tried to access buttons in my menu. I only want to add listeners to the items that is in the XML file im loading. The thing is, i dont know how to call a button i've named "Var1_btn" when i've got a string "Var1". Does anyone know how to call buttons from a for-loop? for each(var chapter in presentation_xml.*) { chapter ...

compiling actionscript from command line using MXMLC

I have a tiny actionscript "project" consisting of two files, call them foo.as and bar.as. For reasons I won't go into, I really really want to build the .SWF from the command line, without setting up a formal project of any kind. Every compiler I've ever used lets you do this, but for the life of me I can't figure out how to coerce MXML...

Datagrid item rendering

Hi All , I was trying to render a html text of some where around 10 strings concatenated together with with in a Datagrigd column . I am able to render it but not to the size of the cell . Im trying to embed this in a HBox and then place it in the cell . But Iam not able to resize to the cell as i see that the HBox is getting shrunk eve...

Yahoo Messenger API For Flex

Is there an API to implement Yahoo chat in Flex? Or at least some calls? ...

Drawing back to transparent in actionscript

When I have a movie clip, it starts out s transparent. I can draw on this movie clip, producing essentially a transparent image. That is, wherever I have not yet drawn, shows the layer below, and where I have drawn, it shows what I have just drawn. Question is, how to "undraw" things in this movie clip, so that I can see what is behin...

Referencing movie clip class instances immediately in Actionscript 2

Here's a really frustrating Actionscript 2 problem I have with movie clips associated with classes that are created on the timeline and need to be referenced in code right away: -- I have a movie clip "C" in my library associated with a class "C". -- Class "C" extends MovieClip. -- I have a movie clip on the stage with frame labels "o...

How can an AS3 swf hosting an AS2 swf share the same array?

I have an AS2 swf that has an array that is updated when a user clicks on items on the screen. The array stores the currently selected items. This As2 swf is hosted by an AS3 swf loaded in using Loader class and a local connection between them is managed by swfBridge. I want to know what the best way for both AS3 and AS2 swfs to share ...