Archive for the 'flash 8' Category
As2 functions in as3 – some examples

Had a student ask me how to add a movieclip from the library to the stage,

pre-as3 this was easily done via the excellent attachMovie function, it was a simple yet powerful function which did the job properly good,

Unfortunately like many function which were properly good yet quite were based on analogies which were IDE specific these were removed in as3, and those wishing to replicate their functionality were left in a ditch on fire to read adobe’s frankly awful documentation, or buy one of the many as3 bibles which have become essiessenal reading in this post-as2 age.

So basically i give you the simple attachMovie function (for were you are working with libraries object which are not in child swfs):

(more…)

Hack Day Webcam Fun

Me trying to lose wieght

These are some experiments me, Jon Howard, and did for hackday, it turned out to be hackhours as we talked and ate pizza for most of the day.

DISCLAIMER: All this code was based on Jon Howards examples, the man is a genius, whenever i’m down in london I make sure I pop by to see whatever he’s been working on last,

last time it was a small movie of his kid running behind a tree in a forest, no biggie right, then he starts panning in 3D.

.

.

I’ve cleaned up the code, basically the idea was to create 3 flash appilcations which would sit on a website and provide the following apis for the javascript on the html page. All the setup for the webcam was to be one line of code.

here’s what we came up with…

BUTTON WEBCAM API

nudge.jpgmulti_nudge.jpg

source and api docs here

1. Nudge API this was for buttons hit by the person on the webcam:

callback_obj.onWebcamNudgeUp(NUDGE_DIRECTION_CONSTANTS)

callback_obj.onWebcamNudgeDown(NUDGE_DIRECTION_CONSTANTS)

.

MOUSE WEBCAM API

Would of put pictures for the demos did i mention the lack of webcam/Admin Rights I’ve been having

1 pointer demo   multi pointer demo   source and api docs here

2. Mouse API this was for objects moved by the person on the webcam (it would try to find a finger and follow it):

onWebcamPointerMove(x:Number,y:Number, pointer_index:Number)

.

MINORITY REPORT 2 HANDED MOUSE WEBCAM API

here’s a link to jon’s excellent example, didn’t quite manage to get this one done… demo1 demo2

And lastly the ambious minority report style where the code would try to understand where hands are, and we they are crasped together for the onDown and apart for the onUp:

onWebcamGrabMove(x:Number,y:Number)

onWebcamGrabUp()

onWebcamGrabDown()

.

I would of done more cleanup but due to the unique way the IT is setup in PQ, I can’t install a webcam to continue my experiments… alas the pictures/demo movies taken are from a macbook plugged in under someone’s desk (don’t ask)

The “HTML with SWF — through Localconnection To —> HTML with SWF — external interface —> JS on same HTML Page” examples included in source

source and api docs here

Ant

Spotlight Stylee Debugger

Built this today as an example of a quite cool, debugger with spotlight stylee message sorting

The Debugger

Debugger Client

Message Sender App

Source

Basically open up the sender and the debugger in different browser windows, send a few messages, then try sorting through them

Ant

Zap the Text Adventure Language

Zap the Language

link

source

site

Built this text adventure engine for gaiden, actually got used, ended up building my own xml based language, which functions and objects, if statements etc,

I quite proud when I think it only took 3 days to make this one part markup, one part lisp, one part procedural, crazy little text adventure language, was hoping to show it off on the site and get the fans to make their own games etc, but we didn’t have time… alas such is life

also the producer deleted my crash command, I mean come on, who it their right mind types “crash” into a text adventure game, and doesn’t expect the 4th wall to come crashing down with their os.

Needless to say I got a bit carried away, everything is dynamic and pretty, ended writting alot of the AS2 zap engine code well in zap, so in the codes there loads of xml strings that are being ran at runtime.

It was also fun learning about english grammer and how messy it is, after reading this really old book about ad-verbs and conjunctions etc just ended up implementing a simple verb noun matching system, with a substuition table to swap ambuious terms, eg bread food munchies all subtiue to the same term.

If anyone can be bothered i recommend downloading the source and making your own game, it’s dead easy and quite fun, left some of my tests in there for a bit of a basis, the go north/south mechanism is a bit clunky you need to create a item in the room called north which has the verbs “go” “head” “walk” etc, which the absolute sutitues of “go n” “n” subtiuting to “go north” etc but it works, if i was to work with it again, that would be the first place to optomoise the writing process

Ant

Papervision AS 2.0 Experiments

Hello CubeInverted CubeInverted Cubic Movie

Hello SphereInverted SphereInverted Sphereical Movie

Multi Cube

source

site

Heres some more experiments I did for the “captain fight hard forever” game, wanted to make a panoramic fps shooter, using fish eye on the panoramic movies for side stepping,

Unfortunately project as with the rest of the gaiden experiments, development time was cut so I could go on html duty to help out that side of things, alas the experiments went unused…

however we’ve got a 3d camera, so perhaps these experiments will see the light of day in another project,

Note:

I apoligise for the shoody cubic panoramic movies, attached 4 digital cameras to myself to test the effect much to the confusion of my colleagues , also the 3d spherical panormaic test movie is stolen from some other website cant remember which, sorry to who ever shot the movie

Binary Ring Studies

source

site

Did a particle study for videogaiden for preloaders and stuff

Disclaimer: All of these are based on processing script done by other people, i’ve then ported to AS2 and tweaked

Acidwarp AS 2.0 Port + gaidenVision Bitmap Filters

acidwarp

Acid Stone ThrowingPixellated Stone ThrowingInverted Stone Throwing

Stone ThrowingCaptain Fight Hard 1 (Coder Art)Captain Fight Hard 2 (Coder Art)

acidwarp source

other effects source

site

Did a study of different screen effects for a game for the video gaiden site, was fun

this was based on the old pc classic acidwarp, it’s a complete c to AS2 port

basically it’s a static bitmap which has it’s RGB pallette mapped to a new pallette, then that new pallette, gets messed around with, to a majorly hypnotic effect, the other examples are just some of my earlier experiments with using a bitmaps layer to modify the apperance of the swf below it. All examples enable by one line of code with is pretty cool

//acid warp

bbc.io.screen_filter_manager.acidwarp_filter ()

//pixellate effect

bbc.io.screen_filter_manager.apply_pixelated_filter (0.33)

//inversion effect

bbc.io.screen_filter_manager.apply_inverted_filter()

Trippy Gradients

trippy gradientboring gradient

wavy gradientbouncy gradient

source

site

Did a study of different graident effects for a screen saver for the video gaiden site, was fun

Akamai Connection Tester

akamai tester

link

source

site

Developing apps video on akamai servers, having connection issues ?

run this app to test internet connection, this will tell you if your problems are down to:

a) old/badly setup routers

b) port blocking

c) very old squid proxy servers

d) or all of the above

had to use this app to prove to tech support, the net connection was blocking flash streams,

Ant

Merdi – the AS2 Profanity Checker/Corrector

merdi

link

source

site

Nice little client side profanity checker, has escape words such as essex and such, starring so it can do f**k, profanity counting, all nicely xml configured

Notes: called merdi because i mispelt merde and couldn’t be bothered renaming the class