Archive

Posts Tagged ‘Flash’

Even More Recommended ActionScript Resources

December 20th, 2011 1 comment

If Adobe’s recent clusterfuck hasn’t sent you running into the arms of html5 here are some nice resources you might like…
Read more…

P2P Flash On A Local Network Part 3

November 25th, 2011 1 comment

Following on from part one and two, we now deal with sending messages to specific peers in a large group (where large means 15+ members).
Read more…

P2P Flash On A Local Network Part 2

November 3rd, 2011 2 comments

Following on from part 1, i have adapted the code to to enable message sending to specific peers (or in p2p jargon, direct routing). I have added a label to display the instances’ (truncated) ID and a dropdown list to select the recipient of the message:
Read more…

P2P Flash On A Local Network Part 1

October 31st, 2011 4 comments

Flash Player has provided an API for peer-to-peer communication since 10.1 (and in AIR since 2.0). P2P over the Internet requires some server-side technology (such as Flash Media Server) but on a local network it’s really easy; no server stuff and it can be set up in a few lines of code.
Read more…

JavaScript for Flashers Part 3: ExternalInterface

August 22nd, 2011 3 comments

In parts one and two, i dealt with specific JavaScript libraries but this time i will cover general communication between Flash and JavaScript. Namely, calling Flash methods from JavaScript and JavaScript methods from Flash.
Read more…

JavaScript for Flashers Part 2: SWFAddress

August 19th, 2011 No comments

SWFAddress is a JavaScript and ActionScript library for adding deep-linking functionality to Flash websites; allowing users to navigate using the browser back and next buttons in the same way as an HTML website. It’s dead easy to use so let’s dive in…
Read more…

JavaScript for Flashers Part 1: SWFObject

July 25th, 2011 2 comments

As fantastic as Flash is, it can’t do everything; sometimes we need to use other technologies to get results. For Flash running in a browser, JavaScript is a useful (and sometimes essential) tool.

I categorise my use of JavaScript into three areas: 1. Essential: embedding Flash in HTML (and providing alternative content), 2. Semi-essential: deep-linking (using browser back/next buttons for Flash navigation) and 3. Optional: everything else. I will cover 2 & 3 in later posts, but first…
Read more…

Get Pixel Colour Below Mouse Pointer

June 9th, 2011 No comments

I’ve noticed that this question pops up from time to time on forums, and it’s very straight-forward to do; we can use the draw() method of BitmapData to copy any visual element (in this case, the stage itself) into a BitmapData object. Then we can use the getPixel() method to extract the colour.
Read more…

Drawing Bezier Curves

April 8th, 2011 7 comments

For the un-initiated, Bezier Curves are curves defined by a set of (at least 2) points in space (usually defined by x and y coordinates). By setting appropriate sets of points, complex curving paths can easily be defined. These could be simply drawn to the screen or used as paths for visual objects (eg a game character) to follow.

The simplest case is a curve defined by 2 points – which is just a straight line. As more points are added the curvature can become more complex. The curveTo method of the Graphics class uses a Bezier Curve of 3 points (1 point defined by the current drawing position and 2 points passed into the method).

So, if we want to draw a 2 or 3 point Bezier Curve, Flash can do the work for us, but for 4 points or more we need to handle it ourselves. Also, if we are using a Bezier Curve as a path for an object to follow, we need to know the coordinates at all positions along the path and the drawing methods of Flash wont help us with that.
Read more…

Beep And Other Sounds Part 2

March 28th, 2011 3 comments

If you’ve read part 1, you already know how to generate sound – just pass some values into a ByteArray when a SampleDataEvent event fires – so now let’s see what kind of noises we can make.
Read more…