actionscript

Actionscript 2 Recalling variables outside of a function.

Hi, I'm having a little trouble recalling variables set within a frame from a function. I'm using Action Script 2.0 using Adobe Flash CS4, but am getting in practice of not placing codes on movie clips and keeping it on the main stage. On a frame on the time line I have the following: var mcJumping:Boolean = false; function isJump()...

ActionScript MovieClip moves to the left, but not the right

I have a stage with a movie clip with the instance name of "mc". Currently I have a code that is suppose to move the player left and right, and when the left or right key is released, the "mc" slides a little bit. The problem I'm having is that making the "mc" move to the left works, but the exact some code used for the right doesn't. A...

Flex Import Class from a Module within a sub directory

I put some modules in a module folder. How do I import classes with the import statement when I'm in a sub folder? This won't work, not like classes which are in packages. modules/SomeModule.mxml <?xml version="1.0"?> <mx:Module> <mx:Script> <![CDATA[ import Fruit.Apple; ]]> </mx:Script> </mx:Module> D...

Drawing Quadratic Bezier circles with a given radius: how to determine control points

Just to clarify; the code below works, but I don't understand where the formula for the variable "controlRadius" comes from. I wrote this function by dissecting an example I found elsewhere, but I can't find any explanation and the original code comments were not able to be translated. Thanks in advance //returns an array of quadrati...

Text-based one-on-one chat with Flash interface: what to power the backend?

Hey guys. I'm building a website where I hook people up so that they can anonymously vent to strangers. You either choose to be a listener, or a talker, and then you get catapulted into a one-on-one chat room. The reason for the app's construction is because you often can't vent to friends, because your deepest vulnerabilities can oft...

how to avoid the error due to missing element from an XML file in Flash Action Script

Hi, I have a code which is written for read the xml data. and the xml file contains the optional values, so some time the elements are present there some times not. In this case how can i set a default value for that in action script 3.0. When i tried to trace the value that area is skipping. So is there any other method to trace-out ...

Preloading a .swf from multiple sources

Hi, i have a rather big (34 MB) Flash CS4 AS3 swf being loaded as a whole into a preloader like l.load(new URLRequest("sample.swf")); What are my options to minimize loading time? Can i split the swf and load from several servers? I'm dynamically loading images from the library: var myBitmapDataObject:myBitmapData = new myBitmapDat...

In ActionScript, Is there a way to check if an input argument is a valid Vector of any type?

In the following code: var a:Vector.<int> ... var b:Vector.<String> ... var c:Vector.<uint> ... var c:Vector.<MyOwnClass> ... function verifyArrayLike(arr:*):Boolean { return (arr is Array || arr is Vector) } verifyArrayLike(a); verifyArrayLike(b); ... What I'm looking for is something like _var is Vector.<*> But Vector.<*> is n...

How to convert actionscript code into c code?

Hi there, Can anybody suggest how to convert actionscript to c code? ...

Make a POST request with parameters and an attached file.

Can anyone give me an example of how to do that? ...

Generate UML from Flex Projects

Are there any good tools to generate UML class diagrams using the source code from a Flex Builder project? I have been trying IntelliJ but for some reason it generates the inherited class structure from the SDK and not everything below my main app. ...

Flash as3 smooth threshold

hello, I'm building a flash app that pulls images from flickr and removes the white background I'm dong this using threshold and i get a really ragged outcome is there any way to get a better and smoother color key? thanks photoNumber = Math.floor(Math.random() * (photos.length)); loader.load(new URLRequest(photos[photoNumber].path)...

Flex Drawing Library

Do you know any simple drawing libraries with align support (one component to other, also align to grid) I would like to implement simple editor of wall configuration in the apartments, by the way. Or, may be, there is no such component and is better to use Graphics class? ...

change button appearance on click

I wahnt to change button appearance when it was clicked. <?xml version="1.0" encoding="utf-8"?> <s:Button xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()"> <fx:Script> <![CDATA[ ...

Actionscript 3 return types - is a * return type ok to use?

Hi, I have a function in which I'd like to return an Object or false. Is a return type of * ok to use? are there any downfalls to this? (besides it being a bit lazy in some cases). ...

possible to recreate xml out of ActionScript?

Hi, I got stuck with an SWF which has ActionScript in it and should use some xml. The problem is, I cannot edit the SWF by decompiling it and compile it again, it simply doesn't work... Adobe Flash CS4 rebuilds the thing, but after I press CTRL+ENTER I get a lot of runtime errors (probably something to do with AS <-> AS2 <-> AS3 and don...

Whats a valid strategy for a secure image upload from a flash client?

Hi all - I'm creating a flash application that will post images to a url for saving to disk/display later. I was wondering what are some suggested strategies for making this secure enough so that the upload is verified as coming from the application and not just some random form post. Is it reliable enough to check referring location r...

can you override an override in actionscript 3

Just curious, can you override an override in actionscript 3 ...

php socket servers, actionscript 3 and multiplayer

So I am thinking about creating a multiplayer game and I was wanting to use php because I already have a php server. Is it possible to make a socket server that will be able to handle a actionscript multiplayer game. The game won't be big. so we wont need any huge amount of data pushing through. just some software that is probably reliab...

Actionscript Noobie: how to overlay/load HTML

i want to write a flash applet that loads an html or an overlay of html. how to do this ? where do i begin with actionscript btw ? ...