actionscript-3

MouseUpEvent stops working while Dragging MovieClip

There is a mouseUpEvent listener attached to the stage in the main class, while dragging the movieClip the mouseUpEvent doesnot trigger the handler and the movieClip gets sticks to the mouse. While the item is being dragged and the mouse is moved away from the movieClip i.e somewhere not on the item but on the stage the mouseUp is detec...

What logic operator to use, AS3?

What operator or expression can I use that will fire on every number, including zero? I want a logic operator that will fire with ever number it receives. My animations pause at zero. This skips on zero if (numberThing> 0); This jitters 'fires quickly and goes back on count' if (numberThing== 0); EXPLANATION I'm catching sp...

Why would bytesTotal increase in a AS3 preloader?

I'm creating a custom preloader for a Flex app and have noticed the following behavior: when loading, the progress bar goes to 100%, then down then back up, and so on until the app is finished loading. When I put a trace in the dowloadprogress listener, I see that while the app is loading, both bytesLoaded and bytesTotal increase, but n...

Flex3 / Air 2: NativeProcess doesn't accepts standard input data (Error #2044 & #3218)

Hi: I'm trying to open cmd.exe on a new process and pass some code to programatically eject a device; but when trying to do this all I get is: "Error #2044: Unhandled IOErrorEvent:. text=Error #3218: Error while writing data to NativeProcess.standardInput." Here's my code: private var NP:NativeProcess = new NativeProcess(); ...

AS3: How can I require a method argument to implement multiple interfaces?

The argument to my method func() must implement the two unrelated interfaces IFoo and IBar. Is there a better way of doing this than declaring another interface only for this purpose that inherits from IFoo and IBar and using that interface as the argument type? public interface IFooBar extends IFoo, IBar { } public function func(arg:I...

Flash CS3/AS3 - How to Mask Nested MovieClips in External Classes

I have a number of external class files that make up (or are trying to build) a portfolio. One of the class files for this project is a Menu.as class I tried extends, but I'm yet to use extends to where it doesn't become a ball of tangled holiday cheer. So my main portfolio class (the one where I'm assembling everything) calls an instan...

How to skew a textfield, still being able to change antialias ? actionscript3

I found out how to skew an textfield using the code in a previous question: link But if I use this technique, I can't change antialias for the text, or I don't know how. My aim is to build a scrollable textfield in a skewed shape: link Because I can't change antialias or pixelhinting there isn't a smooth animation... Any suggestions ? ...

How do I generate (ActionSctipt) classes for a new project?

Whenever I start a new game, I make a whole bunch of classes that extend my base classes, so: com.blah.Game extends com.iainlobb.Game and has some setup code com.blah.Player extends com.iainlobb.Player, and has some setup code etc Now all I need is a way to generate these classes at the start of the project so I don't have to create ea...

Change VBox to HBox dynamically

Hi All, I am in need of a strange solution. I have one requirement in which I am displaying two components in a VBox. But on click of the main container I need to maximize that and need to display the components in horizontal. I was just wondering whether I can change the VBox to HBox and viceversa dynamically using actionscript or some...

LineSeries AreaSeries on AreaChart, How do i get the intersection point?

I am plotting an AreaSeries and a LineSeries on a AreaChart using Flex 3 in built chart components. I want to code a custom item renderer for LineSeries to be shown at the intersection points where LineSeries crosses AreaSeries. ...

mouse events flash - as3

Hi guys, I am no action script expert by any means however I am having a problem with mouse events. I have a map which when you "click" on certain parts of the map (individual movie clips) will load an external movie, this works fine. However I also want to animate the movie clip on mouse over with this code below. MC_STIRLINGSHIRE.bu...

Banner ads, clickTag and transferring variables in the query string - Is there a standard?

Is there a standard way to send variables through a banner ad? A client wants a banner that lets the user enter his mobile number, then receives a code by sms, and then enters the code into the banner. If the code then validates, the user is sent to a page with a login form with the phone number and code filled in. It must be possible to...

what do you expect from flash in the near future?

The recent article of steve jobs link made me think about the future of flash. I'm learning actionscript 3.0 in my studies but is it the right decision still to go for it? I was pretty sure that I will be able to build application in as3 for iphones/ipads in the near future. It seems to me, while I would stay with flash, the market will ...

Drawing line graphics leads Flash to spiral out of control!

Hi, I'm having problems with some AS3 code that simply draws on a Sprite's Graphics object. The drawing happens as part of a larger procedure called on every ENTER_FRAME event of the stage. Flash neither crashes nor returns an error. Instead, it starts running at 100% CPU and grabs all the memory that it can, until I kill the process ma...

Using Fzip lib under Adobe Air App

I'm currently working on a project for Adobe Air (1.5.3) and I need to unzip a file, copy some of its contents to another file. Then I saw people talking about the Fzip (http://codeazur.com.br/lab/fzip) lib. The problem is that I don't know how to "import" or use this library with Javascript and Adobe Air, since Javascript doesn't have...

Flash SWF not initializing until visible - can I force them to initialize?

I have an application that needs to render about 100 flash graphs (as well as other DOM stuff) in a series of rows that vertically extend many times beyond the current visible window - in other words, the users have to scroll down see see all the different graphs. This application is also dynamic and when a user changes a value in the D...

Will duplicate addEventListener calls create duplicate listener entries?

If I have an object that calls addEventListener(Event.ENTER_FRAME, update); addEventListener(Event.ENTER_FRAME, update); will that add 2 listeners? ...

How to insert a script into html pages before they will render? (Adobe Air 2)

So I have a simple HTML pages browser in air (using Default one) I give it a link it renders out Page I use code like this (Flash builder) <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xml...

Flash CS5 screwed up all my textfields - how can I correct this?

Hi - I have an Actionscript project that I was building using Flash CS4. I embedded a font using the follow: [Embed(source="/bin/assets/fonts/MyriadPro-Regular.otf", fontWeight="normal", fontFamily="Myriad Pro")] Then throughout my application in my TextFields I would set embedFonts to true antialiastype to advanced and set the thick...

How to upload binary (audio) data from a Flash AS3 client to .NET server (WCF/REST/HTTP/?)?

Simply stated: I'm trying to record audio in a browser, and get that data back up to the server. I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex). I think I've fig...