Adobe ActionScript is the open source multiparadigm language supporting object oriented, imperative, structural and functional programming and used within Adobe Flash Platform. ActionScript 3 is a dialect of ECMAScript, targeted for Adobe Flash Player 9 and higher.

learn more… | top users | synonyms (1)

3
votes
1answer
1k views

How many moves to think ahead for chess minimax AI?

I am thinking of making a chess game, and I read up on minimax trees. How many moves should the AI think ahead so that the player doesn't have to wait a long time? If there are 25 possible moves ...
3
votes
2answers
509 views

Incorrect angle calculation?

I'm trying to create a simple topdown game, in which you control the player by WASD keys and use mouse to aim and shoot. So far, I have a player moving and firing, but I think there is something wrong ...
3
votes
3answers
746 views

Required Security Precautions for Flash / AS3 Multiplayer Game

I have created a couple of games in Flash/AS3 and am playing with programming a flash-based multiplayer (possibly mmo?) game where the application will communicate with a server over a socket ...
3
votes
3answers
2k views

Blitting in AS3 with anti-aliasing?

What would be the fastest method for doing anti-aliasing for a flash game that is drawn via blitting to a BitmapObject? A method I thought of would be to make games stage smaller than the ...
3
votes
1answer
941 views

Best practice for organizing/storing character/monster data in an RPG?

Synopsis: Attempting to build a cross-platform RPG app in Adobe Flash Builder and am trying to figure out the best class hierarchy and the best way to store the static data used to build each of the ...
3
votes
1answer
1k views

As3 Flash How to check if a bitmapdata is completely set to transparent using an eraser?

I'm trying to make a window-cleaning game with flash as3 on the timeline. (Sounds boring I know, but I realy have some fun idea's with it) So I have: A dirtywindow movieclip on the bottom layer and ...
3
votes
2answers
460 views

Slow Tower for a Tower Defense Game

I am making a tower defense game in Flash and I have a slow tower that is built directly on the path. I have it setup to use a hitTestObject function. The tower is in its own class and the enemies ...
3
votes
1answer
188 views

How to create a grid based on random shapes?

How to create a "grid" using actionscript like the image below? Basically you have an area of 1100x615 which should be filled with shapes that could be rotated and scaled... Collision detection ...
3
votes
1answer
613 views

Change the tilemap shown on stage in Flixel

I am building a simple platformer using Flixel, beginning with the source code from Flixel creator's EZPlatformer . I would like to adjust the level's tilemap when the player sprite enters/overlaps ...
3
votes
1answer
731 views

Flash AS3 Tower Defense MouseEvents

In my tower defense game and every tile has its own mouse event listener. I am wondering, would it be better to use one event listener (MouseEvent.CLICK) and then when it runs the function, should I ...
3
votes
1answer
525 views

Panning a 3d viewport in 2d direction with rotated camera

I am using below code to pan the viewport (action script 3 code using flare3d framework) _mainCamera.x-= Input3D.mouseXSpeed; _mainCamera.z+= Input3D.mouseYSpeed; Where as Input3D.mouse[X|Y]Speed ...
3
votes
1answer
233 views

Easy road from DisplayObject to Molehill?

I have a finished Flash game which is rendered using the built-in display tree, i.e. Bitmaps contained in Sprites (and a text here and there, few vector graphics, and one bitmap-filled shape). For ...
3
votes
1answer
210 views

Managing depth in actionscript3

I have a 3D field with many MovieClips in it, and seems like the one last added is the one that overlaps others and not the one with highest z value. Is there any property/function that sets z-index? ...
3
votes
1answer
164 views

Detect Car Wheel Position?

I have an image: I want to detect wheel empty position dynamically, is it possible? If not possible please let me know, my work involves PHP/XML/Actionscript where actionscript get image url from ...
3
votes
2answers
203 views

Walk to nearest attackable range node

My game has 3D environment which is partitioned in 2d cells(nodes). I have implemented A* for path finding. Now I am just breaking my head to how to implement the algorithm to move the hero to the ...
3
votes
1answer
1k views

Nape physics - Moving a body

Hey I'm currently getting started with physics engines and I set up a body (box shaped) which represents my character. Question: Which methods can I use to move a Nape.Body aka my char? I tried so ...
3
votes
1answer
169 views

Extract derived 3D scaling from a 3D Sprite to set to a 2D billboard

I am trying to get the derived position and scaling of a 3D Sprite and set them to a 2D Sprite. I have managed to do the first part like this: var p:Point = sprite3d.local3DToGlobal(new ...
3
votes
1answer
785 views

Pixel-perfect collision against rotated sprite in Flixel

I've got a roughly 500x50 graphic of a lockpick that I need to be able to rotate very finely while doing pixel-perfect collision detection against the lock object. There's no way to do pixel perfect ...
3
votes
1answer
454 views

how to draw a dashed curved line to a point in as3?

How can I draw a dashed curved line to a x,y point in as3? Basically I'm creating a game where you have a turret, and I want the arc the turret would fire a projectile along to be displayed as a ...
3
votes
1answer
446 views

Let enemies blink when hit

I would like to know how can I go about with an approach, that lets the enemies blink after they are hit with a shot/particle? Is it better to pre-render colored enemies into an array for a better ...
3
votes
1answer
1k views

How to get local point inside a body where mouse click occurred in box2d?

I need to find out the point inside a body, lets say a rectangular object, where the mouse was clicked on. I'm makin a game where the force will be applied depending on where the mouse was clicked on ...
3
votes
0answers
249 views

Choosing a (browser) game environment [closed]

I apologise in advance if this post is something you've heard a million times already or seems like a trolling attempt. I just want some advice and I'm coming up short with my own Google searches. ...
3
votes
2answers
307 views

How to make it so units don't stack up in one location? [duplicate]

Possible Duplicate: Is there a simple way to stop enemies standing in the same spot? So I'm making a game in AS3, it's a strategy DotA-like game (for flash game equivalent, there's UDE) so ...
3
votes
3answers
1k views

Generating background tiles for a side-scroller with variable player speed

I'm currently working on a side-scroller which lets the player alter their speed and I wondered how should I properly generate and control background tiles for such a kind o game. I'm using Flixel but ...
3
votes
3answers
2k views

Multiplayer API with Unity 3.5 and AS3

On the faq for the current preview release, http://unity3d.com/unity/preview/faq it says that while networking is not currently supported for flash compilation, we can write our own in AS3 using the ...
2
votes
3answers
474 views

How much info can I store in a cookie?

Im developing a flash game and I'd like to know how much info can I store in a browser cookie. The game is simple, but it needs to store several variables in order to save all the details of your ...
2
votes
1answer
841 views

Best way to generate pieces in match-3 games, and then tracking them?

I've been working on a match-3 style game in Actionscript using Flixel, and so far, I've been able to build the core mechanics of the game, including board generation, piece generation, piece swapping ...
2
votes
2answers
3k views

What are the advantages and challenges of using HaXe over ActionScript 3? [closed]

I read this: http://webr3.org/blog/haxe/bitmapdata-vectors-bytearrays-and-optimization/ And this: ...
2
votes
3answers
2k views

Can one develop an application with Bluetooth support on iOS using Flash Builder 4.5?

I have heard about Flash Builder 4.5.1. As I have understood, one can make an application using Flex with Flash Builder 4.5.1 and also export the release build for iOS, Android and Blackberry. Is it ...
2
votes
3answers
1k views

Actionscript 3: Which side of object is hit?

I have a two objects colliding with each other. I am testing for the collision with if(ob1.hitTestObject(ob2)){//do something }. Is there a way to determine which side of the object was hit, i.e. if ...
2
votes
3answers
2k views

Best practices XML data files and xml compression for Flash Games?

I am working on a game, and the xml files are getting to be a few megs, and the final game might have a hundred megs of uncompressed xml. If I zip the xml files up I can get something that is about 3 ...
2
votes
3answers
197 views

Swap Child and Child's Child

Is it possible to use swapChildren() with a child and a child's child? Every time I try, I get this error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. Why ...
2
votes
2answers
1k views

Make object follow mouse angle?

what I'm trying to do is make the paddle follow the mouse position(red dot). I know how to rotate the paddle relatively to the center of the screen, but I'm not sure how to determinate the ...
2
votes
3answers
968 views

Flash AS3 Tower Defense Problem

I am working on a tower defense game in Flash. Right now most towers find the the nearest enemy in range (enemies are in an array), get the enemies coordinates, and fire a bullet. When it hits the ...
2
votes
1answer
1k views

2d games unity vs Flash [closed]

do people find unity better than flash for 2d games while unity is 3d engine , or Flash still better because it's made for 2d games and flash can get the job done faster ,and now flash is better for ...
2
votes
2answers
1k views

Rotate spritesheet graphics in flixel

I am using the flash flixel engine, and have a sprite sheet of a spaceship from top-down view. The sprite sheet includes a bunch of different states and animation frames. Problem is that I have drawn ...
2
votes
2answers
173 views

How to add a ramp in a flash game?

I am a huge novice and this isn't really a programming question, but here I go, say I want to make a game that involves rolling up a ramp like this one: to move upwards, similar to how it would work ...
2
votes
2answers
1k views

Best way to create neon glow line effect in AS3?

What's the best way to create a neon glow line effect in Flash AS3? Say similar to what's going on in the game gravitron360 on the xbox 360? Would it be a good idea to create movieclips with plain ...
2
votes
3answers
458 views

Managing flash animations for a game

Ok, I've been writing C# for a while, but I'm new to ActionScript, so this is a question about best practices. We're developing a simple match game, where the user selects tiles and tries to match ...
2
votes
1answer
804 views

How can I find out what URL my game is executing from in Flash?

I want to upload my game to Kongregate and other sites, but on Kongregate I want to invoke one function and other sites I want run another function. How to check in AS3 where (I want to get host like: ...
2
votes
2answers
2k views

2D Real-Time shadows on level on a level made from a Dynamic Bitmap

The Bitmap has transparency, and only non-transparent pixels are solid and used for hit detection for the physics engine and gameplay. I have seen some versions done with convex hulls, but for ...
2
votes
2answers
293 views

Tiny Wings - Placing items

I'm currently developing a Flash game like 'Tiny Wings'. I have a lot of work done, but i'm currently working on placing the items ( coins and obstacles ) on the terrain. My player it is moving on a ...
2
votes
1answer
1k views

Can anyone explain step-by-step how the as3isolib depth-sorts isometric objects?

The library manages to depth-sort correctly, even when using items of non-1x1 sizes. I took a look through the code but it's a big project to go through line by line! There are some questions about ...
2
votes
2answers
825 views

Pointy top hexagonal A* pathfinding

I'm trying to create a game with a hex based map with the points at the top. I have most of it working, however the path finding is being a little awkward. The heuristic I'm using is called euclidian ...
2
votes
4answers
1k views

Flash framerate reliability

I am working in Flash and a few things have been brought to my attention. Below is some code I have some questions on: addEventListener(Event.ENTER_FRAME, function(e:Event):void { if (KEY_RIGHT) ...
2
votes
2answers
681 views

How to draw a charts by flash cs5

Hey all , I want to make something more interesting in my game some thing like a charts Analysis for a flash game. When THE PLAYER FINISH THE GAME . The score appears in charts . I want to integrate ...
2
votes
1answer
41 views

Why can't I swap fixtures on collision in Box2D?

I'm trying to swap the fixtures associated with a body after colliding with a specific obstacle. I can listen to the collision event by extending b2ContactListener. I tested it with a trace and it's ...
2
votes
1answer
128 views

What is a good approach for making a relationship between the HUD and Environment?

What is an elegant / common way to build a relationship between the game scene / environment / world and the HUD that usually sits on top of it? I have thought about this for a while, and though there ...
2
votes
1answer
198 views

Can't click on a button with startDrag() active on stage

I need to know how can I enable mouse click on a button when I have a MouseEvent listener for the stage. I have an MClip associated with the mouse cursor: Mouse.hide(); scope.startDrag(true); And ...
2
votes
1answer
431 views

How to use Pixel Bender (pbj) in ActionScript3 on large Vectors to make fast calculations?

Remember my old question: 2d game view camera zoom, rotation & offset using 'Filter' / 'Shader' processing? I figured I could use a Pixel Bender Shader to do the computation for ...