actionscript

Is it possible to create a 'command line' swf?

I'd like to be able to write a .swf file that is runnable as a command line app. In other words, I would be able to create actionscript classes which can interact with stdin and stdout, and could then execute that .swf directly in the command line. I suspect that this isn't really possible. Can anyone confirm that? EDIT: A couple of th...

FlexUnit and callLater

I'm trying to use callLater with FlexUnit v0.9: public function testCallLater():void { Application.application.callLater( addAsync(function():void { assertTrue(true); }, 1000)); } but when it runs I get this error: ArgumentError: Error #1063: Argument count mismatch on flexunit.framework::AsyncTestHelper/handleEvent(). Ex...

Degrafa drawing tools - do they exist?

I'm trying to find an easy way to use degrafa with MXML. I'm no artist and creating graphics using code just seems very wrong when you can't visualise what is needed to make the required art work. What I'm after is a tool that can take an SVG graphic and convert to suitable MXML tags so that I can copy/paste them into a MXML file. There...

tweenlite as2 oncomplete

Hi, I seem to be having trouble with TweenLite in AS2. I've created a class which I call on the main timeline. Within the class I've loaded images and once they are loaded I want to fade between them. I am calling (inside my class) the following code when the images have finished loading: TweenLite.to(_root["loadedimg1"], 1, {_alpha: ...

Flex Remoting Error

Hi , I was trying to connect Flex to Backend Java and I was trying to call a method in one of the classe in the Backend java and it was returning Faultcode:Server.Processing java.lang.NullPointerException : null In the root cause everything is null . .I have checked everything from RemotingConfig to the Flex calling service . roR...

Casting as sub-class in Actionscript

I have the following classes in ActionScript: public class A { } public class B extends A { } and these variables (in another class): public var InstanceOfA:A; public var InstanceOfB:B; How do I cast an instance of A as a class B? I tried: InstanceOfA = new A(); InstanceOfB = InstanceOfA as B; trace(InstanceOfB); I get an obj...

Flash Player magical frame rate

A long time ago (5+ years) I read an article about optimal frame rates for the Flash Player. The article reasoned through some calculations that 31 frames per second was the optimal fps to run your movies at and seemed, at the time, logical to me and have been using 31 fps ever since. However, I have forgotten the reasoning from that ar...

Passing values between functions

Hi All is there any way to locally define a variable in a function and then pass it to the oher function. I mean to say is it possible the pass a local value from one function to other function. Somebody Please suggest me the solution. Thanks in advance ...

Transformation using MovieClip.transform.matrix problem

I have problem when dealing with transform in Flash cs4 .... When I rotate my movieclip and trace the output, my movieclip's width also changed.... ...

loadSound: don't wait for the entire download before play, but not have it start automatically

I am trying to play an MP3 using Actionscript 2. I have the following requirements: I don't want to wait for the MP3 to load before playing it. I want to know when enough of the MP3 has downloaded that I can start playing it. I don't want the MP3 to start playing immediately: I need to control when the play starts. An example scenar...

Event bubbling in Flash

I have a clip that catches the click event using on(release) { .... } In this clip, I have a button that also catches clicks with on(release) {...} The problem is that the button never receives the release event. I believe that the event is not bubbled, being caught and handled by the parent container. How can I bubble it to the button...

WeatherRoom service down need a alternative for a website

OKay I don't use actionscript and trying to help my friend edit a flash website which the layout changes based on a xml feed from weatherroom.com which is now defunk, the dev of this site has also left my friend (his client). This is the current code bellow, is there anyway I can simply swap for another service and not have to hire a pe...

Reliable mocking framework for ActionScript?

I'm looking for a reliable mocking framework for ActionScript. I've been using mock-as3, but I'm annoyed with what I feel is a hack-ish solution for triggering events. There are other a few other reasons why I'd like to have some options, but not sure if I necessarily need to go into them. I've also looked into Mock4AS, but the interface...

How to use the [mixin] tag in AS3 applications?

I have the following two projects in in Flex Builder 3: One AS3 library project (generates a SWC file) One Flex application project (MXML Application) The MXML Application references to the AS3 library project (Flex build path). So far, so good. I now want to run code automatically when an application uses the AS3 library. The [mixin...

Actionscript 3 and dynamic masks

I have a container MovieClip that serves as a content area that I need to mask off. When I create a mask inside this container using a Shape I can't seem to interact with the contents of other containers I create here, like buttons etc. This is what I'm doing in code (I've left out all the import's etc.): class MyContainer extends Movi...

Pass JSON to a Flash movie

What is the best way to pass JSON to and from a Flash movie? Currently to communicate between javascript and Flash : I'm using 'flashvars' to pass data to the flash movie when it initially loads I'm using 'ExternalInterface' at runtime to transfer single values, such as booleans at runtime I want to move to the next level and do th...

Caching in Flex

Hello Community, I have the following problem, I have a flex application that works as a frontend in a client-server-application. In my application I have two sliders and a chart that moves when I drag the sliders, now when I have the following positions slider 1: 10 slider 2: 20 a request is sent to the server and the response back ...

What is the signficance of the _ seen in several variable names in ActionScript?

I'm new to actionscript and I have noticed that many variable names in actionscript begin with an _ and I was wondering what the significance of it is? ...

Alternative to Flex Framework

Is there an alternative ActionScript 3 lightweight framework out there similar to Flex, but not as huge. Flex is fairly large, and SWF's being no less than 150Kb big, I'm just thinking it must be possible to get something that have smaller SWF files as an end result. I've come accross AS Wing, and was curious if there's more. Thanks fo...

How to completely remove a movieclip in AS3

I want the mc to be removed with All its timers, events,... Is there a simple way to do this? ...