unlimited arguments with as3 events..

07.02.08

Filed Under: actionscript with Comments Off

Kudos to this man.

Though rather than accessing the appended data directly through the array, I prefer to use apply() and send it to another function.

event_function.apply(null, e.arg);

we did not invent the algorithm.

06.02.08

Filed Under: random with 1 Comment

The algorithm consistently finds Jesus. The algorithm killed Jeeves.
The algorithm is banned in China. The algorithm is from Jersey. The algorithm constantly finds Jesus.
This is not the algorithm. This is close.

custom classes for assets in as3..

06.02.08

Filed Under: actionscript with Comments Off

I’m way behind with this, but that’s hardly surprising considering I’ve only just been picking up as3.

I used custom classes a fair bit in as2, allow you to bring in an assets from the library with a class already attached was very useful, though trying to emulate that in as3 proved difficult. That is, until i found this.

In short, it describes that by putting this line:

[Embed(source=”library.swf”, symbol=”Star”)]

..above the class definition in your custom class’s .as file, instead of in your main class, it can be initiated as you would any asset (i.e. new Star()).

I wish I knew about this in March.

digitalflipbook

embed xml with mxmlc

04.02.08

Filed Under: actionscript with 1 Comment

Admittedly it’s not often that you’d need to embed an xml file, but it does happen to be a useful format to use when you need to store data. So when a client asks for a swf to drop into a powerpoint (ugh) presentation, and wants no reliance on external files, you’re faced with the need of an internal storage method that is updates as quickly as they change their minds. Embedded xml is the answer!

[Embed(source=”data.xml”, mimeType=”application/octet-stream”)]
private static const MyData:Class;

private function init():void{
var ba:ByteArray = new MyData() as ByteArray;
var myString:String = ba.readUTFBytes(ba.length);
trace(myString);
}

via peterjoel

i just covered myself in..

29.01.08

Filed Under: random with Comments Off

..tea.

no can do

29.01.08

Filed Under: random with 1 Comment

- 14 oz. can salmon, drained, skin and bones removed if desired
- 3/4 cup mayonnaise
- 1/2 cup purchased grated carrots
- 1/4 cup chopped green onion, if desired
- 1-1/2 cups preshredded Swiss or Gruyere cheese
- 16 slices whole grain bread

I was hungry (though perhaps not 16-slices hungry), I had the ingredients, all was ready for a fishy feast. When, as if the universe felt to mock me, I discover I don’t own a tin opener. Nowhere in my flat, nor in the multitude of shops in the vicinity had any hint of such device.

Nightmare.

I had eggs.

netstream.play()

29.01.08

Filed Under: actionscript with Comments Off

Can anyone explain the weird half-documented features of Netstream.play() in the as2.0 help? Undefined arguments!

lakai footwear fully flared intro

29.01.08

more good magazine genius

28.01.08

via Good Magazine

a good magazine production

28.01.08

via Good Magazine

Previous Page Next Page

Categories