Tag Archives: as2

Flash: String Manipulation

After creating this tutorial on text boxes, I’m sure you all would like to know how to edit this string. That’s why I’m here.   First, let’s say we have the following string: “This is a string with commas, periods, and an exclamation point! (It also has parentheses/slashes.)” It’s kinda long but the point is […]

Flash: Getting URL Contents

There is some rather simple code that can, in Flash, allow you to retrieve URL contents similar to PHP.   We’ll create a short example. First, create a new AS2 movie and save it as “test.swf”. Insert two keyframes, placing this code on both: stop(); This essentially stops the animation from playing through the frames. […]

Flash: Pong Game Part 2

Read Part 1.   This section will introduce two things: Score Increasing ball speed There will be no menuing involved, so the score will be unlimited. I might make a tutorial about this…   Gradual Ball Speed Increase First, we need to decide when the ball increases in speed…when it hits the left paddle? hits […]

Flash: Pong Game Part 1

We’ll be creating a two-player pong game like this: Sorry but the score textboxes don’t seem to work. It’s a problem with my program, not the code! Notice how the ball slowly increases in speed. The players’ pads can move as far up and down as they want.     Paddles Let’s start by creating […]

Flash: Random Fill

A short article on setting the fill of movieclips to random colors like this:   Here is the code: newColor = Math.floor(Math.random()*0xffffff); mcToColor = new Color (_root.mymc); mcToColor.setRGB(newColor); The first line creates a variable (newColor) equal to a random number. Notice how the random number is formatted: 0xffffff. It isn’t #ffffff. The second line creates […]