Browsing Tag

Tips

Circular Motion in AS3: Make One Moving Object Orbit Another

Circular Motion in AS3: Make One Moving Object Orbit Another

Having one object orbit another is a movement mechanic that’s been used since the early gaming era, and it remains handy to this very day! In this Quick Tip we will explore the mathematical function for orbiting, see how to modify it, and look at practical uses in actual game design.


This entry is part 10 of 10 in the You Do The Math Session
Quick Tip: How to Debug an AS3 Error #1203
basix

Quick Tip: How to Debug an AS3 Error #1203

In this Quick Tip, we’ll discuss the confusing AS3 error 1203, “no constructor found”, which crops up without provocation and is rather unfortunately worded. We’ll examine the scenario in which it will appear, and how to fix it.


This entry is part 10 of 10 in the How to Fix Bugs in Flash Session
Quick Tip: Implementing the Bubble Sort in AS3

Quick Tip: Implementing the Bubble Sort in AS3

In this Quick Tip, I’ll show you how and why the Bubble Sort algorithm works, and how to implement it in AS3. You’ll end up with a class that you can use in any Flash project, for sorting any array.

Quick Tip: Collision Reaction Between a Circle and a Line Segment
basix

Quick Tip: Collision Reaction Between a Circle and a Line Segment

In the previous Quick Tips, we’ve looked at collision detection: essentially, detecting that two shapes have overlapped. Now, we’re ready to look at collision reaction: making something happen due to a collision. In this Quick Tip, we’ll look at the reactions of reflection and sliding.

Quick Tip: Use FZip to Open Zip Files Within AS3

Quick Tip: Use FZip to Open Zip Files Within AS3

In this tutorial I will introduce you to FZip, an AS3 Library that lets you open zip files inside your Flash projects. This can save a lot of bandwidth; in this tutorial we will load an 2.5MB zip file which contains 9.3MB worth of assets.

Quick Tip: Collision Detection Between a Circle and a Line Segment
basix

Quick Tip: Collision Detection Between a Circle and a Line Segment

We covered collision detection between an infinite line and circle in our previous Quick Tip. However, the issue that arose was that the line extends further than the visible line segment; in fact, it extends into a hyperplane. In this Quick Tip, we shall limit our collision detection to that of a line segment only.

Quick Tip: Collision Detection Between a Circle and a Line
basix

Quick Tip: Collision Detection Between a Circle and a Line

In my previous Quick Tip, we looked at the idea of collision detection in general, and specifically at detecting collisions between a pair of circles. In this Quick Tip, we’ll look at detecting a collision between a circle and a line.

Quick Tip: Collision Detection Between Circles
basix

Quick Tip: Collision Detection Between Circles

Collision detection is a branch of algorithms that checks whether two shapes overlap. If you build physics or action games with ActionScript, you will certainly not escape acquaintance with this topic. This is the first of the series regarding collision detection. In this Quick Tip, we shall look at ActionScript’s built-in collision detection method, hitTestObject(), and write our own to detect overlap between two circles.

AS3 Quick Tip: Hacking the Event Flow

AS3 Quick Tip: Hacking the Event Flow

Sometimes you may find yourself needing to modify the behavior of a component for a user input event. This article will explain how to do so by modifying the event object in-flight, before it’s processed by the component. That’s right, you can lie and cheat. In code.

Quick Tip: How to Debug an AS3 Error #1120
basix

Quick Tip: How to Debug an AS3 Error #1120

A very common ActionScript error is Error 1120, the “undefined property” error. In fact, this may be the most common compile-time error. Its cause is very simple, but there are a number of ways it can actually be induced. We’ll take a quick tour of some of the scenarios in which you’ll encounter this error, and how to fix them.


This entry is part 9 of 10 in the How to Fix Bugs in Flash Session
Page 1 of 1112345678...Last »